Cleanup #14
No files matched your search
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -6,7 +6,7 @@ var points = 0
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$AnimatedSprite2D.play()
|
$AnimatedSprite2D.play()
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(_body: Node2D) -> void:
|
||||||
queue_free()
|
queue_free()
|
||||||
GlobalData.cassets += 1
|
GlobalData.cassettes += 1
|
||||||
print("1 point")
|
print("1 point")
|
||||||
@@ -157,7 +157,7 @@ animations = [{
|
|||||||
"speed": 15.0
|
"speed": 15.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
[node name="casset" type="Area2D" unique_id=918954585]
|
[node name="cassette" type="Area2D" unique_id=918954585]
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
script = ExtResource("1_e33mb")
|
script = ExtResource("1_e33mb")
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ func _on_timer_timeout() -> void:
|
|||||||
$Timer.start()
|
$Timer.start()
|
||||||
|
|
||||||
|
|
||||||
func _on_area_2d_area_entered(area: Area2D) -> void:
|
func _on_area_2d_area_entered(_area: Area2D) -> void:
|
||||||
if GlobalData.hurtable:
|
if GlobalData.hurtable:
|
||||||
death_counter -= 1
|
death_counter -= 1
|
||||||
elif GlobalData.weapon == 2:
|
elif GlobalData.weapon == 2:
|
||||||
death_counter -= 1
|
death_counter -= 1
|
||||||
|
|
||||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
func _on_area_2d_body_entered(_body: Node2D) -> void:
|
||||||
GlobalData.death_counter -= 1
|
GlobalData.death_counter -= 1
|
||||||
@@ -6,23 +6,16 @@ func _ready() -> void:
|
|||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
func _on_area_2d_body_entered(body: Node2D) -> void:
|
func _on_area_2d_body_entered(_body: Node2D) -> void:
|
||||||
if get_parent().get_tree().get_nodes_in_group("Cassets").is_empty():
|
if get_parent().get_tree().get_nodes_in_group("Cassettes").is_empty():
|
||||||
if $CanvasLayer.get_children().is_empty():
|
if $CanvasLayer.get_children().is_empty():
|
||||||
var inst: Control = phonephreak.instantiate()
|
var inst: Control = phonephreak.instantiate()
|
||||||
$CanvasLayer.add_child(inst)
|
$CanvasLayer.add_child(inst)
|
||||||
print("== IMMEDIATE ==")
|
|
||||||
_dump(inst)
|
|
||||||
await get_tree().process_frame
|
|
||||||
await get_tree().process_frame
|
|
||||||
print("== AFTER 2 FRAMES ==")
|
|
||||||
_dump(inst)
|
|
||||||
GlobalData.doing_puzzle = true
|
GlobalData.doing_puzzle = true
|
||||||
$CanvasLayer.add_child(inst)
|
|
||||||
inst.set_anchors_and_offsets_preset(Control.PRESET_CENTER, Control.PRESET_MODE_KEEP_SIZE)
|
inst.set_anchors_and_offsets_preset(Control.PRESET_CENTER, Control.PRESET_MODE_KEEP_SIZE)
|
||||||
inst.grow_vertical = Control.GROW_DIRECTION_BOTH
|
inst.grow_vertical = Control.GROW_DIRECTION_BOTH
|
||||||
inst.grow_horizontal = Control.GROW_DIRECTION_BOTH
|
inst.grow_horizontal = Control.GROW_DIRECTION_BOTH
|
||||||
@@ -32,22 +25,3 @@ func _on_area_2d_body_entered(body: Node2D) -> void:
|
|||||||
get_parent().get_parent().get_node("player").SpeechMarker,
|
get_parent().get_parent().get_node("player").SpeechMarker,
|
||||||
5.0
|
5.0
|
||||||
)
|
)
|
||||||
|
|
||||||
func _dump(inst: Control) -> void:
|
|
||||||
var vp := get_viewport()
|
|
||||||
print("window size: ", get_window().size, " content_scale_mode: ", get_window().content_scale_mode)
|
|
||||||
print("visible_rect: ", vp.get_visible_rect(), " -> screen center: ", vp.get_visible_rect().size / 2.0)
|
|
||||||
print("layer: offset=", $CanvasLayer.offset, " scale=", $CanvasLayer.scale, " rotation=", $CanvasLayer.rotation,
|
|
||||||
" follow_viewport=", $CanvasLayer.follow_viewport_enabled)
|
|
||||||
print("root: type=", inst.get_class(), " pos=", inst.position, " size=", inst.size,
|
|
||||||
" min=", inst.get_combined_minimum_size(), " scale=", inst.scale, " pivot=", inst.pivot_offset)
|
|
||||||
print("root anchors L/T/R/B: ", inst.anchor_left, " ", inst.anchor_top, " ", inst.anchor_right, " ", inst.anchor_bottom,
|
|
||||||
" offsets: ", inst.offset_left, " ", inst.offset_top, " ", inst.offset_right, " ", inst.offset_bottom)
|
|
||||||
print("root global_rect: ", inst.get_global_rect(), " -> its center: ", inst.get_global_rect().get_center())
|
|
||||||
print("root parent: ", inst.get_parent().name, " (", inst.get_parent().get_class(), ")")
|
|
||||||
for c in inst.get_children():
|
|
||||||
if c is Control:
|
|
||||||
print(" child ", c.name, " (", c.get_class(), ") global_rect=", c.get_global_rect(),
|
|
||||||
" visible=", c.visible, " anchors preset-ish: ", c.anchor_left, ",", c.anchor_top, ",", c.anchor_right, ",", c.anchor_bottom)
|
|
||||||
else:
|
|
||||||
print(" child ", c.name, " (", c.get_class(), ")")
|
|
||||||
@@ -326,14 +326,13 @@ func _process(_delta):
|
|||||||
var dir: bool = 1
|
var dir: bool = 1
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
print(GlobalData.death_counter)
|
|
||||||
if Input.is_action_just_pressed("slash_weapon"):
|
if Input.is_action_just_pressed("slash_weapon"):
|
||||||
weapon = 1
|
weapon = 1
|
||||||
GlobalData.weapon = 1
|
GlobalData.weapon = 1
|
||||||
if Input.is_action_just_pressed("gun"):
|
if Input.is_action_just_pressed("gun"):
|
||||||
weapon = 2
|
weapon = 2
|
||||||
GlobalData.weapon = 2
|
GlobalData.weapon = 2
|
||||||
$Label.text = str(int(GlobalData.cassets))
|
$Label.text = str(int(GlobalData.cassettes))
|
||||||
if Input.is_action_just_pressed("right"):
|
if Input.is_action_just_pressed("right"):
|
||||||
dir = 1
|
dir = 1
|
||||||
$ColorRect5.global_position = $Marker2D3.global_position
|
$ColorRect5.global_position = $Marker2D3.global_position
|
||||||
@@ -695,7 +694,7 @@ func _wallJump():
|
|||||||
var horizontalWallKick = abs(jumpMagnitude * cos(wallKickAngle * (PI / 180)))
|
var horizontalWallKick = abs(jumpMagnitude * cos(wallKickAngle * (PI / 180)))
|
||||||
var verticalWallKick = abs(jumpMagnitude * sin(wallKickAngle * (PI / 180)))
|
var verticalWallKick = abs(jumpMagnitude * sin(wallKickAngle * (PI / 180)))
|
||||||
velocity.y = -verticalWallKick
|
velocity.y = -verticalWallKick
|
||||||
var dir = 1
|
dir = 1
|
||||||
if wallLatchingModifer and latchHold:
|
if wallLatchingModifer and latchHold:
|
||||||
dir = -1
|
dir = -1
|
||||||
if wasMovingR:
|
if wasMovingR:
|
||||||
@@ -754,8 +753,7 @@ func _endGroundPound():
|
|||||||
gravityActive = true
|
gravityActive = true
|
||||||
|
|
||||||
func _placeHolder():
|
func _placeHolder():
|
||||||
print("")
|
pass
|
||||||
|
|
||||||
|
|
||||||
func shoot():
|
func shoot():
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -62,10 +62,10 @@ metadata/_edit_use_anchors_ = true
|
|||||||
position = Vector2(112, 38)
|
position = Vector2(112, 38)
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="." unique_id=519077191]
|
[node name="Label" type="Label" parent="." unique_id=519077191]
|
||||||
offset_left = -687.0
|
offset_left = -642.0
|
||||||
offset_top = -389.0
|
offset_top = -387.0
|
||||||
offset_right = -654.0
|
offset_right = -609.0
|
||||||
offset_bottom = -355.0
|
offset_bottom = -353.0
|
||||||
theme_override_fonts/font = ExtResource("2_g2els")
|
theme_override_fonts/font = ExtResource("2_g2els")
|
||||||
theme_override_font_sizes/font_size = 25
|
theme_override_font_sizes/font_size = 25
|
||||||
text = "0"
|
text = "0"
|
||||||
@@ -77,7 +77,7 @@ offset_right = -637.0
|
|||||||
offset_bottom = -356.0
|
offset_bottom = -356.0
|
||||||
theme_override_fonts/font = ExtResource("2_g2els")
|
theme_override_fonts/font = ExtResource("2_g2els")
|
||||||
theme_override_font_sizes/font_size = 25
|
theme_override_font_sizes/font_size = 25
|
||||||
text = "cassets:"
|
text = "cassettes:"
|
||||||
|
|
||||||
[node name="ColorRect5" type="ColorRect" parent="." unique_id=823301403]
|
[node name="ColorRect5" type="ColorRect" parent="." unique_id=823301403]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -107,7 +107,7 @@ position = Vector2(107, 48)
|
|||||||
physics_interpolation_mode = 1
|
physics_interpolation_mode = 1
|
||||||
top_level = true
|
top_level = true
|
||||||
position = Vector2(5, 5)
|
position = Vector2(5, 5)
|
||||||
offset = Vector2(0.899438, 1.7079604)
|
offset = Vector2(1.7197182, -1.6673563)
|
||||||
|
|
||||||
[node name="PhantomCameraHost" type="Node" parent="Camera2D" unique_id=134961787]
|
[node name="PhantomCameraHost" type="Node" parent="Camera2D" unique_id=134961787]
|
||||||
process_priority = 300
|
process_priority = 300
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ func _ready() -> void:
|
|||||||
|
|
||||||
|
|
||||||
# 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
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ func _ready() -> void:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# 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:
|
||||||
if !get_tree().paused or Input.is_action_just_pressed("pause"):
|
if !get_tree().paused or Input.is_action_just_pressed("pause"):
|
||||||
queue_free()
|
queue_free()
|
||||||
get_tree().paused = false
|
get_tree().paused = false
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ position = Vector2(413, -189)
|
|||||||
|
|
||||||
[node name="Cassettes" type="Node" parent="." unique_id=257762099]
|
[node name="Cassettes" type="Node" parent="." unique_id=257762099]
|
||||||
|
|
||||||
[node name="cassette" parent="Cassettes" unique_id=918954585 groups=["Cassets"] instance=ExtResource("7_kj3bt")]
|
[node name="cassette" parent="Cassettes" unique_id=918954585 groups=["Cassettes"] instance=ExtResource("7_kj3bt")]
|
||||||
z_index = 1
|
z_index = 1
|
||||||
position = Vector2(268, -57)
|
position = Vector2(268, -57)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ extends Node2D
|
|||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if Input.is_action_just_pressed("pause"):
|
if Input.is_action_just_pressed("pause"):
|
||||||
toggle_paused()
|
toggle_paused()
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ func _ready() -> void:
|
|||||||
buttons.append($Button0)
|
buttons.append($Button0)
|
||||||
for i in range(0, 9):
|
for i in range(0, 9):
|
||||||
var row = i % 3
|
var row = i % 3
|
||||||
|
@warning_ignore("integer_division")
|
||||||
var col = i / 3
|
var col = i / 3
|
||||||
var b: Button = $Button0.duplicate()
|
var b: Button = $Button0.duplicate()
|
||||||
var label: Label = b.get_child(0)
|
var label: Label = b.get_child(0)
|
||||||
@@ -72,7 +73,7 @@ func right():
|
|||||||
get_tree().change_scene_to_file("res://scenes/levels/level_%s.tscn" % GlobalData.level)
|
get_tree().change_scene_to_file("res://scenes/levels/level_%s.tscn" % GlobalData.level)
|
||||||
|
|
||||||
# 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:
|
||||||
if guessed.size() >= pieces.size():
|
if guessed.size() >= pieces.size():
|
||||||
if guessed == pieces:
|
if guessed == pieces:
|
||||||
right()
|
right()
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
|
|
||||||
@onready var test_level = $"../scenes/test_scene"
|
|
||||||
@onready var projectile = $"../scenes/projectile"
|
|
||||||
@onready var level_1 = $"../levels/Level1"
|
|
||||||
var death_counter = 3
|
var death_counter = 3
|
||||||
var cassets = 0
|
var cassettes = 0
|
||||||
var doing_puzzle: bool = false
|
var doing_puzzle: bool = false
|
||||||
var hurtable = false
|
var hurtable = false
|
||||||
var weapon = 1
|
var weapon = 1
|
||||||
|
|||||||
Reference in new issue
Block a user