Compare commits
2
Commits
7ffc756b36
...
780f8a606d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
780f8a606d | ||
|
|
61912a7df4 |
No files matched your search
@@ -9,3 +9,4 @@ var cassets = 0
|
|||||||
var doing_puzzle: bool = false
|
var doing_puzzle: bool = false
|
||||||
var hurtable = false
|
var hurtable = false
|
||||||
var weapon = 1
|
var weapon = 1
|
||||||
|
var level = 1
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
GloblaData.doing_puzzle = false
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://c0kr0eqjtde28
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[gd_scene format=3 uid="uid://b6tcpqx0h3qpy"]
|
||||||
|
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cmtdq6tedv1mm" path="res://scenes/player.tscn" id="1_3bmlt"]
|
||||||
|
[ext_resource type="Script" uid="uid://c0kr0eqjtde28" path="res://scenes/level_2.gd" id="1_jm1iu"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_aqe1g"]
|
||||||
|
size = Vector2(2007, 149)
|
||||||
|
|
||||||
|
[node name="level2" type="Node2D" unique_id=1987596250]
|
||||||
|
script = ExtResource("1_jm1iu")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="." unique_id=426446834]
|
||||||
|
offset_left = 8.0
|
||||||
|
offset_top = 865.0
|
||||||
|
offset_right = 2003.0
|
||||||
|
offset_bottom = 989.0
|
||||||
|
|
||||||
|
[node name="StaticBody2D" type="StaticBody2D" parent="." unique_id=471962104]
|
||||||
|
collision_layer = 2
|
||||||
|
collision_mask = 5
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D" unique_id=1096663356]
|
||||||
|
position = Vector2(1010, 942)
|
||||||
|
shape = SubResource("RectangleShape2D_aqe1g")
|
||||||
|
|
||||||
|
[node name="player" parent="." unique_id=1596338883 instance=ExtResource("1_3bmlt")]
|
||||||
@@ -6,7 +6,8 @@ extends Node2D
|
|||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
pass
|
if GloblaData.doing_puzzle == true:
|
||||||
|
$player.global_position = $Marker2D2.global_position
|
||||||
|
|
||||||
|
|
||||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
func _on_area_2d_body_entered(body: Node2D) -> void:
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
[ext_resource type="Script" uid="uid://c7fhd1eqlgwr4" path="res://scripts/Phonephreak.gd" id="1_knn0u"]
|
[ext_resource type="Script" uid="uid://c7fhd1eqlgwr4" path="res://scripts/Phonephreak.gd" id="1_knn0u"]
|
||||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="2_bg4gc"]
|
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="2_bg4gc"]
|
||||||
[ext_resource type="Texture2D" uid="uid://hbkkhhlechol" path="res://assets/sprites/phonephreak.png" id="3_ba2os"]
|
[ext_resource type="Texture2D" uid="uid://hbkkhhlechol" path="res://assets/sprites/phonephreak.png" id="3_ba2os"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://ddm6ojsaiq20b" path="res://assets/fonts/PixelOperator8-Bold.ttf" id="4_35g6u"]
|
||||||
|
|
||||||
[node name="Phonephreak" type="Node2D" unique_id=1830177910]
|
[node name="Phonephreak" type="Node2D" unique_id=1830177910]
|
||||||
position = Vector2(0, 1)
|
|
||||||
script = ExtResource("1_knn0u")
|
script = ExtResource("1_knn0u")
|
||||||
|
|
||||||
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." unique_id=519900134]
|
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="." unique_id=519900134]
|
||||||
@@ -40,3 +40,13 @@ offset_right = 49.0
|
|||||||
offset_bottom = 50.0
|
offset_bottom = 50.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
color = Color(1, 1, 1, 0)
|
color = Color(1, 1, 1, 0)
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="." unique_id=1513678322]
|
||||||
|
visible = false
|
||||||
|
offset_left = 18.0
|
||||||
|
offset_top = 298.0
|
||||||
|
offset_right = 606.0
|
||||||
|
offset_bottom = 399.0
|
||||||
|
theme_override_fonts/font = ExtResource("4_35g6u")
|
||||||
|
theme_override_font_sizes/font_size = 100
|
||||||
|
text = "WRONG!"
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
extends Control
|
||||||
|
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_pressed() -> void:
|
||||||
|
get_tree().change_scene_to_file("res://scenes/levels/level%s.tscn" % GloblaData.level)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dcbdrv8y15dtu
|
||||||
+14
-10
@@ -1,6 +1,7 @@
|
|||||||
[gd_scene format=3 uid="uid://btktv5aqpafau"]
|
[gd_scene format=3 uid="uid://btktv5aqpafau"]
|
||||||
|
|
||||||
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="1_4ignj"]
|
[ext_resource type="FontFile" uid="uid://dkytywan8eapf" path="res://assets/fonts/PixelOperator8.ttf" id="1_4ignj"]
|
||||||
|
[ext_resource type="Script" uid="uid://dcbdrv8y15dtu" path="res://scenes/title.gd" id="1_wosw1"]
|
||||||
|
|
||||||
[node name="Title" type="Control" unique_id=715100706]
|
[node name="Title" type="Control" unique_id=715100706]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
@@ -9,29 +10,32 @@ anchor_right = 1.0
|
|||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
|
script = ExtResource("1_wosw1")
|
||||||
|
|
||||||
[node name="ColorRect" type="ColorRect" parent="." unique_id=1504521213]
|
[node name="ColorRect" type="ColorRect" parent="." unique_id=1504521213]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_right = 1152.0
|
offset_right = 2013.0
|
||||||
offset_bottom = 648.0
|
offset_bottom = 1007.0
|
||||||
color = Color(0, 0, 0, 1)
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="." unique_id=1433094765]
|
[node name="Label" type="Label" parent="." unique_id=1433094765]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 107.0
|
offset_left = 491.0
|
||||||
offset_top = 50.0
|
offset_top = 83.0
|
||||||
offset_right = 1013.0
|
offset_right = 1397.0
|
||||||
offset_bottom = 301.0
|
offset_bottom = 334.0
|
||||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||||
theme_override_font_sizes/font_size = 250
|
theme_override_font_sizes/font_size = 250
|
||||||
text = "title"
|
text = "title"
|
||||||
|
|
||||||
[node name="Button" type="Button" parent="." unique_id=963162220]
|
[node name="Button" type="Button" parent="." unique_id=963162220]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 149.0
|
offset_left = 556.0
|
||||||
offset_top = 375.0
|
offset_top = 536.0
|
||||||
offset_right = 982.0
|
offset_right = 1389.0
|
||||||
offset_bottom = 583.0
|
offset_bottom = 744.0
|
||||||
theme_override_fonts/font = ExtResource("1_4ignj")
|
theme_override_fonts/font = ExtResource("1_4ignj")
|
||||||
theme_override_font_sizes/font_size = 150
|
theme_override_font_sizes/font_size = 150
|
||||||
text = "start"
|
text = "start"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||||
@@ -22,6 +22,7 @@ const PhoneSounds = [
|
|||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
GloblaData.level += 1
|
||||||
var origin = Vector2(150, 225)
|
var origin = Vector2(150, 225)
|
||||||
var offset = Vector2(135, 120)
|
var offset = Vector2(135, 120)
|
||||||
$Button0.position.y = origin.y + 3 * offset.y + 3 * -10
|
$Button0.position.y = origin.y + 3 * offset.y + 3 * -10
|
||||||
@@ -40,7 +41,7 @@ func _ready() -> void:
|
|||||||
b.position.x = origin.x + row * offset.x + col+1 * -5
|
b.position.x = origin.x + row * offset.x + col+1 * -5
|
||||||
b.pressed.connect(_on_button_pressed.bind(i+1))
|
b.pressed.connect(_on_button_pressed.bind(i+1))
|
||||||
buttons.append(b)
|
buttons.append(b)
|
||||||
b.name = "Button%i" %(i)
|
b.name = "Button%s" %(i)
|
||||||
add_child(b)
|
add_child(b)
|
||||||
$Button0.pressed.connect(_on_button_pressed.bind(0))
|
$Button0.pressed.connect(_on_button_pressed.bind(0))
|
||||||
|
|
||||||
@@ -53,9 +54,9 @@ func _ready() -> void:
|
|||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if guessed.size() >= pieces.size():
|
if guessed.size() >= pieces.size():
|
||||||
if guessed == pieces:
|
if guessed == pieces:
|
||||||
print("Got it")
|
get_tree().change_scene_to_file("res://scenes/level_%s.tscn" % GloblaData.level)
|
||||||
else:
|
else:
|
||||||
print("Nope")
|
_ready()
|
||||||
|
|
||||||
if !$AudioStreamPlayer2D.playing and !to_play.is_empty():
|
if !$AudioStreamPlayer2D.playing and !to_play.is_empty():
|
||||||
actuate_button(to_play.pop_front())
|
actuate_button(to_play.pop_front())
|
||||||
|
|||||||
@@ -330,24 +330,22 @@ func _physics_process(delta):
|
|||||||
if Input.is_action_just_pressed("gun"):
|
if Input.is_action_just_pressed("gun"):
|
||||||
weapon = 2
|
weapon = 2
|
||||||
GloblaData.weapon = 2
|
GloblaData.weapon = 2
|
||||||
if GloblaData.doing_puzzle == true:
|
|
||||||
$".".global_position = $"../Marker2D2".global_position
|
|
||||||
$Label.text = str(int(GloblaData.cassets))
|
$Label.text = str(int(GloblaData.cassets))
|
||||||
if Input.is_action_just_pressed("right"):
|
|
||||||
dir = 1
|
|
||||||
$ColorRect5.global_position = $Marker2D3.global_position
|
|
||||||
$ColorRect5.rotation = 130
|
|
||||||
if Input.is_action_just_pressed("left"):
|
|
||||||
$ColorRect5.global_position = $Marker2D2.global_position
|
|
||||||
$ColorRect5.rotation = -130
|
|
||||||
dir = 0
|
|
||||||
if GloblaData.doing_puzzle == false:
|
if GloblaData.doing_puzzle == false:
|
||||||
|
if Input.is_action_just_pressed("right"):
|
||||||
|
$ColorRect5.global_position = $Marker2D3.global_position
|
||||||
|
$ColorRect5.rotation = 130
|
||||||
|
dir = 1
|
||||||
|
if Input.is_action_just_pressed("left"):
|
||||||
|
$ColorRect5.global_position = $Marker2D2.global_position
|
||||||
|
$ColorRect5.rotation = -130
|
||||||
|
dir = 0
|
||||||
if Input.is_action_just_pressed("fire") and weapon == 2:
|
if Input.is_action_just_pressed("fire") and weapon == 2:
|
||||||
var instance = projectile.instantiate()
|
var instance = projectile.instantiate()
|
||||||
if !dir:
|
if !dir:
|
||||||
instance.speed = -instance.speed
|
instance.speed = -instance.speed
|
||||||
instance.position = $Marker2D.global_position
|
instance.position = $Marker2D.global_position
|
||||||
GloblaData.level_1.add_child(instance)
|
$"..".add_child(instance)
|
||||||
elif Input.is_action_just_pressed("fire") and weapon == 1:
|
elif Input.is_action_just_pressed("fire") and weapon == 1:
|
||||||
$ColorRect5.rotation -= slash
|
$ColorRect5.rotation -= slash
|
||||||
slash = -slash
|
slash = -slash
|
||||||
|
|||||||
Reference in new issue
Block a user