1 parent
adb3d8d345
commit
e39b9eaeb7
7 files changed
+33
-13
No files matched your search
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 MiB After Width: | Height: | Size: 2.0 MiB |
+10
-12
@@ -5,9 +5,7 @@ const DASH_SPEED = 600
|
||||
const HORIZONTAL_DASH_MULT = 1.8
|
||||
const FRICTION = 100
|
||||
const GRAVITY_MULT = 0.8
|
||||
|
||||
const JUMP_VELOCITY = -410.0
|
||||
|
||||
const DASH_LENGTH = 0.2
|
||||
|
||||
var fall_timer = 0.0
|
||||
@@ -28,7 +26,6 @@ func refresh_dash(new_dashes):
|
||||
dashes = 1
|
||||
if dashes > 0:
|
||||
$Jetpack/DashIndicator.show()
|
||||
|
||||
|
||||
func refresh_jump(new_jumps):
|
||||
if new_jumps:
|
||||
@@ -44,6 +41,7 @@ func on_teleport():
|
||||
$Camera2D.position_smoothing_enabled = true
|
||||
await get_tree().create_timer(1).timeout
|
||||
teleport_cooldown = 0
|
||||
|
||||
func spawn_ghost(position):
|
||||
var ghost = preload("res://ghost.tscn")
|
||||
ghost = ghost.instantiate()
|
||||
@@ -98,16 +96,16 @@ func _process(delta: float) -> void:
|
||||
elif direction > 0:
|
||||
$Sprite2D.flip_h = false
|
||||
$Sprite2D/HatSprite.flip_h = false
|
||||
|
||||
if Input.is_action_pressed("dash_down") and is_on_floor():
|
||||
print("Crouching")
|
||||
$Sprite2D.play("crouch")
|
||||
print("MODULATE: " + str($Parallax2D/Sprite2D.modulate))
|
||||
$Parallax2D/Sprite2D.modulate = $Parallax2D/Sprite2D.modulate - Color(
|
||||
move_toward(Color.GREEN.r,$Parallax2D/Sprite2D.modulate.r,0.001),
|
||||
move_toward(Color.GREEN.g,$Parallax2D/Sprite2D.modulate.g,0.001),
|
||||
move_toward(Color.GREEN.b,$Parallax2D/Sprite2D.modulate.b,0.001)
|
||||
)
|
||||
$Parallax2D/Sprite2D.modulate = Color.CYAN
|
||||
|
||||
for hidden_object in get_tree().get_nodes_in_group("Hidden"):
|
||||
hidden_object.show()
|
||||
|
||||
elif Input.is_action_just_pressed("dash") and dashes > 0:
|
||||
dashing = true
|
||||
dashes -= 1
|
||||
@@ -129,11 +127,11 @@ func _process(delta: float) -> void:
|
||||
velocity.x = move_toward(velocity.x, 0, FRICTION)
|
||||
$Sprite2D.play("idle")
|
||||
$Sprite2D/HatSprite.play("idle")
|
||||
$Parallax2D/Sprite2D.modulate = Color(1,1,1,1)
|
||||
$Parallax2D/Sprite2D.modulate = Color.CORAL
|
||||
|
||||
|
||||
|
||||
#print("PLAYER X POSITION: " + str(position.y))
|
||||
for hidden_object in get_tree().get_nodes_in_group("Hidden"):
|
||||
hidden_object.hide()
|
||||
|
||||
#Falling to death.
|
||||
if position.y >= death_threshold:
|
||||
print("SLASH KILL")
|
||||
|
||||
+3
-1
@@ -158,7 +158,7 @@ position = Vector2(0, 2)
|
||||
sprite_frames = SubResource("SpriteFrames_fvyjh")
|
||||
animation = &"crouch"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.95473504
|
||||
frame_progress = 0.44028828
|
||||
|
||||
[node name="HatSprite" type="AnimatedSprite2D" parent="Sprite2D" unique_id=1954184475]
|
||||
visible = false
|
||||
@@ -169,6 +169,8 @@ animation = &"running"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.8061519
|
||||
|
||||
[node name="DaydreamSprite" type="Sprite2D" parent="Sprite2D" unique_id=67766652]
|
||||
|
||||
[node name="Jetpack" type="AnimatedSprite2D" parent="." unique_id=657113514]
|
||||
position = Vector2(0, 1)
|
||||
sprite_frames = SubResource("SpriteFrames_5s8kx")
|
||||
|
||||
@@ -22,6 +22,10 @@ window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/stretch/mode="canvas_items"
|
||||
|
||||
[global_group]
|
||||
|
||||
Hidden=""
|
||||
|
||||
[gui]
|
||||
|
||||
common/auto_focus_strategy=1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
extends RigidBody2D
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
add_to_group("Hidden")
|
||||
#pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
@@ -0,0 +1 @@
|
||||
uid://0o8303qahgvi
|
||||
@@ -1,11 +1,14 @@
|
||||
[gd_scene format=3 uid="uid://bos6oh7nwyeca"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://0o8303qahgvi" path="res://vertical_long_block.gd" id="1_23eij"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckqable762x8v" path="res://block.tscn" id="1_noju1"]
|
||||
|
||||
[node name="VerticalLongBlock" type="RigidBody2D" unique_id=925152188]
|
||||
visible = false
|
||||
rotation = 1.5707964
|
||||
gravity_scale = 0.0
|
||||
freeze = true
|
||||
script = ExtResource("1_23eij")
|
||||
|
||||
[node name="Block" parent="." unique_id=1409784601 instance=ExtResource("1_noju1")]
|
||||
|
||||
|
||||
Reference in new issue
Block a user