Implemented wall jumping and a dash
This commit is contained in:
parent
16dc64c66c
commit
b598337fde
8 changed files with 304 additions and 43 deletions
Binary file not shown.
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 13 KiB |
|
@ -55,7 +55,6 @@ config/icon="res://icon.png"
|
||||||
|
|
||||||
window/size/width=480
|
window/size/width=480
|
||||||
window/size/height=270
|
window/size/height=270
|
||||||
window/size/fullscreen=true
|
|
||||||
window/stretch/mode="viewport"
|
window/stretch/mode="viewport"
|
||||||
window/stretch/aspect="keep"
|
window/stretch/aspect="keep"
|
||||||
|
|
||||||
|
@ -110,6 +109,12 @@ pause={
|
||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":80,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":80,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
dash={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777238,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[layer_names]
|
[layer_names]
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,14 @@
|
||||||
extends KinematicBody2D
|
extends KinematicBody2D
|
||||||
class_name Player
|
class_name Player
|
||||||
|
|
||||||
export var speed: Vector2 = Vector2(150.0, 195.0)
|
export var run_speed := 100
|
||||||
export var gravity: = 410.0
|
export var jump_power := 180
|
||||||
export var max_gravity:= 450.0
|
export var gravity: = 500
|
||||||
|
export var max_gravity:= 500
|
||||||
export var respawn_position:=Vector2.ZERO
|
export var respawn_position:=Vector2.ZERO
|
||||||
|
export var wall_slide_friction:=.2
|
||||||
|
export var wall_jump_speed_factor := Vector2(2.5 ,.85)
|
||||||
|
export var dash_thrust = 500
|
||||||
|
|
||||||
|
|
||||||
signal landed
|
signal landed
|
||||||
|
@ -14,46 +18,88 @@ signal died
|
||||||
var _velocity: Vector2 = Vector2.ZERO
|
var _velocity: Vector2 = Vector2.ZERO
|
||||||
var _landing_position:Vector2 = Vector2.ZERO
|
var _landing_position:Vector2 = Vector2.ZERO
|
||||||
var _in_air = false;
|
var _in_air = false;
|
||||||
|
var _is_wall_jumping := false
|
||||||
var _alive := false;
|
var _alive := false;
|
||||||
|
var _is_wall_sliding := false;
|
||||||
|
var _is_dashing := false;
|
||||||
|
var _can_dash := true;
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
$AnimationPlayer.play("fade_in")
|
$AnimationPlayer.play("fade_in")
|
||||||
respawn_position = position
|
respawn_position = position
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
if _alive:
|
if _alive:
|
||||||
var is_jump_canceled: = Input.is_action_just_released("jump") and _velocity.y < 0.0
|
var is_jump_canceled: = Input.is_action_just_released("jump") and !_is_wall_jumping and _velocity.y < 0.0
|
||||||
var direction: = get_direction()
|
var direction: = get_direction()
|
||||||
_velocity = calculate_move_velocity(_velocity, direction, speed, is_jump_canceled, delta)
|
_is_wall_sliding = _velocity.y >=0 and is_on_wall() and !is_on_floor()
|
||||||
|
_velocity = calculate_move_velocity(direction,is_jump_canceled, delta)
|
||||||
_velocity = move_and_slide(_velocity, Vector2.UP)
|
_velocity = move_and_slide(_velocity, Vector2.UP)
|
||||||
update_sprite(direction)
|
update_sprite(direction)
|
||||||
if is_on_floor() and _in_air:
|
if is_on_floor() and !_is_dashing: _can_dash = true;
|
||||||
|
if is_on_floor() and _in_air and !_is_dashing:
|
||||||
_in_air = false
|
_in_air = false
|
||||||
|
_is_wall_jumping = false
|
||||||
emit_signal("landed", position)
|
emit_signal("landed", position)
|
||||||
|
if _is_wall_sliding:
|
||||||
#func get_class(): return "Player"
|
_is_wall_jumping = false
|
||||||
|
|
||||||
func get_direction() -> Vector2:
|
func get_direction() -> Vector2:
|
||||||
return Vector2(
|
return Vector2(
|
||||||
Input.get_action_strength("direction_right") - Input.get_action_strength("direction_left"),
|
Input.get_action_strength("direction_right") - Input.get_action_strength("direction_left"),
|
||||||
-1.0 if Input.is_action_just_pressed("jump") and is_on_floor() else 1.0
|
-1.0 if Input.is_action_just_pressed("jump") and (is_on_floor() or is_on_wall()) else 1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
func calculate_move_velocity(linear_velosity:Vector2, direction:Vector2, speed:Vector2, is_jump_canceled:bool, delta:float)->Vector2:
|
func calculate_move_velocity(direction:Vector2, is_jump_canceled:bool, delta:float)->Vector2:
|
||||||
var output: = linear_velosity
|
var output: = _velocity
|
||||||
output.x = speed.x * direction.x
|
|
||||||
output.y += gravity * delta
|
var current_gravity = gravity * wall_slide_friction if _is_wall_sliding else gravity
|
||||||
if direction.y == -1.0:
|
|
||||||
|
output.x = lerp(_velocity.x, run_speed * direction.x, .09 if _in_air else .5)
|
||||||
|
|
||||||
|
output.y += current_gravity * delta
|
||||||
|
|
||||||
|
if direction.y == -1.0: # we are jumping
|
||||||
_in_air = true
|
_in_air = true
|
||||||
output.y = speed.y * direction.y
|
if _is_wall_sliding:
|
||||||
|
# wall jump
|
||||||
|
_is_wall_jumping = true
|
||||||
|
var desired = -(run_speed * wall_jump_speed_factor.x * direction.x)
|
||||||
|
output.x = desired
|
||||||
|
output.y = jump_power * wall_jump_speed_factor.y * direction.y
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
#jump
|
||||||
|
output.y = jump_power * direction.y
|
||||||
|
|
||||||
emit_signal("jumping", position)
|
emit_signal("jumping", position)
|
||||||
|
|
||||||
|
if not _is_dashing:
|
||||||
if is_jump_canceled:
|
if is_jump_canceled:
|
||||||
output.y = 0
|
output.y = 0
|
||||||
if output.y < max_gravity*-1:
|
if output.y < max_gravity*-1:
|
||||||
output.y = max_gravity
|
output.y = max_gravity
|
||||||
if output.y > 0 and !is_on_floor():
|
if output.y > 0 and !is_on_floor():
|
||||||
_in_air = true;
|
_in_air = true;
|
||||||
|
if _is_dashing:
|
||||||
|
return _velocity
|
||||||
|
|
||||||
|
var dash_velocity := Vector2(
|
||||||
|
(-1 if $Sprite.flip_h else 1) * dash_thrust,
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("dash") and _can_dash and !_is_wall_sliding:
|
||||||
|
output = dash_velocity
|
||||||
|
_can_dash = false
|
||||||
|
_is_dashing = true # turn off gravity while dashing
|
||||||
|
$DashParticles.emitting = true
|
||||||
|
$DashParticles.position = Vector2(
|
||||||
|
position.x,
|
||||||
|
position.y - 8
|
||||||
|
)
|
||||||
|
$DashParticles.set_as_toplevel(true)
|
||||||
|
$DashTimeout.start()
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
|
||||||
func _respawn():
|
func _respawn():
|
||||||
|
@ -66,16 +112,25 @@ func _revive():
|
||||||
|
|
||||||
func update_sprite(direction:Vector2)->void:
|
func update_sprite(direction:Vector2)->void:
|
||||||
var air_animation = "jump" if _velocity.y <= 0 else "fall"
|
var air_animation = "jump" if _velocity.y <= 0 else "fall"
|
||||||
if direction.x > 0:
|
if _velocity.x > .5 and not _is_wall_sliding:
|
||||||
$AnimationPlayer.play("run" if is_on_floor() else air_animation)
|
$AnimationPlayer.play("run" if is_on_floor() else air_animation)
|
||||||
$Sprite.flip_h = false
|
$Sprite.flip_h = false
|
||||||
elif direction.x < 0:
|
elif _velocity.x < -.5 and not _is_wall_sliding:
|
||||||
$AnimationPlayer.play("run" if is_on_floor() else air_animation)
|
$AnimationPlayer.play("run" if is_on_floor() else air_animation)
|
||||||
$Sprite.flip_h = true
|
$Sprite.flip_h = true
|
||||||
else:
|
else:
|
||||||
$AnimationPlayer.play("idle")
|
if not _in_air: $AnimationPlayer.play("idle")
|
||||||
if !is_on_floor():
|
|
||||||
|
if _is_wall_sliding:
|
||||||
|
$AnimationPlayer.play("wall_slide")
|
||||||
|
return
|
||||||
|
if _in_air:
|
||||||
$AnimationPlayer.play(air_animation)
|
$AnimationPlayer.play(air_animation)
|
||||||
|
return
|
||||||
|
|
||||||
|
if _is_dashing:
|
||||||
|
return
|
||||||
|
$AnimationPlayer.play("jump")
|
||||||
|
|
||||||
func _on_die_animation_done():
|
func _on_die_animation_done():
|
||||||
emit_signal("died")
|
emit_signal("died")
|
||||||
|
@ -85,4 +140,8 @@ func die():
|
||||||
_alive = false
|
_alive = false
|
||||||
$AnimationPlayer.play("die")
|
$AnimationPlayer.play("die")
|
||||||
|
|
||||||
|
func _on_DashTimeout_timeout() -> void:
|
||||||
|
$DashParticles.emitting = false
|
||||||
|
_velocity.x = run_speed * _velocity.normalized().x;
|
||||||
|
_is_dashing = false
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=12 format=2]
|
[gd_scene load_steps=18 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://src/Actors/Player.gd" type="Script" id=2]
|
[ext_resource path="res://src/Actors/Player.gd" type="Script" id=2]
|
||||||
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=7]
|
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=7]
|
||||||
|
@ -235,6 +235,61 @@ tracks/1/keys = {
|
||||||
"values": [ Color( 0, 0, 0, 0 ) ]
|
"values": [ Color( 0, 0, 0, 0 ) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=9]
|
||||||
|
resource_name = "wall_slide"
|
||||||
|
length = 0.3
|
||||||
|
loop = true
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Sprite:frame")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.1, 0.2 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ 45, 46, 47 ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("ScreenOverlay/CanvasModulate:color")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Color( 0, 0, 0, 0 ) ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Gradient" id=10]
|
||||||
|
offsets = PoolRealArray( 0, 0.668103, 1 )
|
||||||
|
colors = PoolColorArray( 0.6, 0.713726, 1, 1, 0, 0.12549, 0.380392, 0.760784, 1, 1, 1, 0 )
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture" id=11]
|
||||||
|
gradient = SubResource( 10 )
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id=12]
|
||||||
|
max_value = 2.0
|
||||||
|
_data = [ Vector2( 0, 2 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.0835871 ), 0.0, 0.0, 0, 0 ]
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id=13]
|
||||||
|
curve = SubResource( 12 )
|
||||||
|
|
||||||
|
[sub_resource type="ParticlesMaterial" id=14]
|
||||||
|
trail_size_modifier = SubResource( 13 )
|
||||||
|
trail_color_modifier = SubResource( 11 )
|
||||||
|
emission_shape = 2
|
||||||
|
emission_box_extents = Vector3( 20, 4, 1 )
|
||||||
|
flag_disable_z = true
|
||||||
|
gravity = Vector3( 0, 200, 0 )
|
||||||
|
initial_velocity_random = 0.11
|
||||||
|
orbit_velocity = 0.0
|
||||||
|
orbit_velocity_random = 0.0
|
||||||
|
linear_accel = 1.48
|
||||||
|
|
||||||
[node name="Player" type="KinematicBody2D"]
|
[node name="Player" type="KinematicBody2D"]
|
||||||
collision_mask = 30
|
collision_mask = 30
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
|
@ -261,6 +316,7 @@ position = Vector2( 0, -8 )
|
||||||
texture = ExtResource( 8 )
|
texture = ExtResource( 8 )
|
||||||
vframes = 13
|
vframes = 13
|
||||||
hframes = 8
|
hframes = 8
|
||||||
|
frame = 45
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
|
@ -271,6 +327,7 @@ anims/idle = SubResource( 5 )
|
||||||
anims/jump = SubResource( 6 )
|
anims/jump = SubResource( 6 )
|
||||||
anims/pre_jump = SubResource( 7 )
|
anims/pre_jump = SubResource( 7 )
|
||||||
anims/run = SubResource( 8 )
|
anims/run = SubResource( 8 )
|
||||||
|
anims/wall_slide = SubResource( 9 )
|
||||||
|
|
||||||
[node name="ScreenOverlay" type="CanvasLayer" parent="."]
|
[node name="ScreenOverlay" type="CanvasLayer" parent="."]
|
||||||
layer = 128
|
layer = 128
|
||||||
|
@ -282,3 +339,17 @@ color = Color( 0, 0, 0, 0 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[node name="DashTimeout" type="Timer" parent="."]
|
||||||
|
wait_time = 0.1
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="DashParticles" type="Particles2D" parent="."]
|
||||||
|
position = Vector2( 0, -7 )
|
||||||
|
emitting = false
|
||||||
|
amount = 30
|
||||||
|
lifetime = 0.2
|
||||||
|
one_shot = true
|
||||||
|
explosiveness = 0.5
|
||||||
|
process_material = SubResource( 14 )
|
||||||
|
[connection signal="timeout" from="DashTimeout" to="." method="_on_DashTimeout_timeout"]
|
||||||
|
|
|
@ -8,13 +8,21 @@ export var activated:=false
|
||||||
|
|
||||||
func deactivate() -> void:
|
func deactivate() -> void:
|
||||||
activated = false
|
activated = false
|
||||||
|
$Particles2D.emitting = false
|
||||||
$AnimationPlayer.play("idle")
|
$AnimationPlayer.play("idle")
|
||||||
|
|
||||||
func activate() -> void:
|
func activate() -> void:
|
||||||
|
if activated: return
|
||||||
activated = true
|
activated = true
|
||||||
$AnimationPlayer.play("activated")
|
$AnimationPlayer.play("activated")
|
||||||
|
$Particles2D.amount = 200
|
||||||
|
$Particles2D.emitting = true
|
||||||
emit_signal("activated", self)
|
emit_signal("activated", self)
|
||||||
|
|
||||||
|
func _on_activated_animation_finished():
|
||||||
|
$Particles2D.amount = 5
|
||||||
|
$AnimationPlayer.play("active")
|
||||||
|
|
||||||
|
|
||||||
func _on_Area2D_body_entered(body: Node) -> void:
|
func _on_Area2D_body_entered(body: Node) -> void:
|
||||||
if body.name == "Player":
|
if body.name == "Player":
|
||||||
|
|
|
@ -1,14 +1,117 @@
|
||||||
[gd_scene load_steps=7 format=2]
|
[gd_scene load_steps=15 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/Items/save_point_anim_strip_9.png" type="Texture" id=1]
|
[ext_resource path="res://assets/Items/save_point_anim_strip_9.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2]
|
[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2]
|
||||||
[ext_resource path="res://src/Items/CheckPoint.gd" type="Script" id=3]
|
[ext_resource path="res://src/Items/CheckPoint.gd" type="Script" id=3]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="Gradient" id=1]
|
||||||
|
colors = PoolColorArray( 0.145098, 1, 1, 1, 0.941176, 0.713726, 0, 0.870588 )
|
||||||
|
|
||||||
|
[sub_resource type="GradientTexture" id=2]
|
||||||
|
gradient = SubResource( 1 )
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id=3]
|
||||||
|
min_value = -200.0
|
||||||
|
max_value = 200.0
|
||||||
|
_data = [ Vector2( 0, 200 ), 0.0, -253.551, 0, 0, Vector2( 1, -200 ), 74.3008, 0.0, 0, 0 ]
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id=4]
|
||||||
|
curve = SubResource( 3 )
|
||||||
|
|
||||||
|
[sub_resource type="Curve" id=5]
|
||||||
|
_data = [ Vector2( 0.00784314, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.0772727 ), 0.0, 0.0, 0, 0 ]
|
||||||
|
|
||||||
|
[sub_resource type="CurveTexture" id=6]
|
||||||
|
curve = SubResource( 5 )
|
||||||
|
|
||||||
|
[sub_resource type="ParticlesMaterial" id=7]
|
||||||
|
emission_shape = 2
|
||||||
|
emission_box_extents = Vector3( 4, 1, 1 )
|
||||||
|
flag_disable_z = true
|
||||||
|
direction = Vector3( 0, -1, 0 )
|
||||||
|
gravity = Vector3( 0, -1, 0 )
|
||||||
|
initial_velocity = 100.0
|
||||||
|
initial_velocity_random = 0.5
|
||||||
|
orbit_velocity = 0.0
|
||||||
|
orbit_velocity_random = 0.0
|
||||||
|
linear_accel = 100.0
|
||||||
|
linear_accel_random = 0.2
|
||||||
|
linear_accel_curve = SubResource( 4 )
|
||||||
|
scale = 1.5
|
||||||
|
scale_random = 0.06
|
||||||
|
scale_curve = SubResource( 6 )
|
||||||
|
color_ramp = SubResource( 2 )
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id=8]
|
||||||
extents = Vector2( 10, 11 )
|
extents = Vector2( 10, 11 )
|
||||||
|
|
||||||
[sub_resource type="Animation" id=2]
|
[sub_resource type="Animation" id=9]
|
||||||
resource_name = "activated"
|
length = 0.7
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/path = NodePath("Light2D:enabled")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PoolRealArray( 0 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ true ]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/path = NodePath("Light2D:position")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 0, -16 ), Vector2( 0, -17 ), Vector2( 0, -17 ), Vector2( 0, -16 ), Vector2( 0, -16 ), Vector2( 0, -14 ) ]
|
||||||
|
}
|
||||||
|
tracks/2/type = "value"
|
||||||
|
tracks/2/path = NodePath("Sprite:frame")
|
||||||
|
tracks/2/interp = 1
|
||||||
|
tracks/2/loop_wrap = true
|
||||||
|
tracks/2/imported = false
|
||||||
|
tracks/2/enabled = true
|
||||||
|
tracks/2/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ),
|
||||||
|
"update": 1,
|
||||||
|
"values": [ 1, 2, 3, 4, 5, 6, 7, 8 ]
|
||||||
|
}
|
||||||
|
tracks/3/type = "value"
|
||||||
|
tracks/3/path = NodePath("Light2D:scale")
|
||||||
|
tracks/3/interp = 1
|
||||||
|
tracks/3/loop_wrap = true
|
||||||
|
tracks/3/imported = false
|
||||||
|
tracks/3/enabled = true
|
||||||
|
tracks/3/keys = {
|
||||||
|
"times": PoolRealArray( 0, 0.3, 0.5, 0.6 ),
|
||||||
|
"transitions": PoolRealArray( 1, 1, 1, 1 ),
|
||||||
|
"update": 0,
|
||||||
|
"values": [ Vector2( 1, 1 ), Vector2( 1.63405, 1.63405 ), Vector2( 2.21172, 2.21172 ), Vector2( 2.11387, 2.11387 ) ]
|
||||||
|
}
|
||||||
|
tracks/4/type = "method"
|
||||||
|
tracks/4/path = NodePath(".")
|
||||||
|
tracks/4/interp = 1
|
||||||
|
tracks/4/loop_wrap = true
|
||||||
|
tracks/4/imported = false
|
||||||
|
tracks/4/enabled = true
|
||||||
|
tracks/4/keys = {
|
||||||
|
"times": PoolRealArray( 0.7 ),
|
||||||
|
"transitions": PoolRealArray( 1 ),
|
||||||
|
"values": [ {
|
||||||
|
"args": [ ],
|
||||||
|
"method": "_on_activated_animation_finished"
|
||||||
|
} ]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id=11]
|
||||||
|
resource_name = "active"
|
||||||
length = 0.7
|
length = 0.7
|
||||||
loop = true
|
loop = true
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
|
@ -60,8 +163,7 @@ tracks/3/keys = {
|
||||||
"values": [ Vector2( 1, 1 ), Vector2( 1.63405, 1.63405 ), Vector2( 2.21172, 2.21172 ), Vector2( 2.11387, 2.11387 ) ]
|
"values": [ Vector2( 1, 1 ), Vector2( 1.63405, 1.63405 ), Vector2( 2.21172, 2.21172 ), Vector2( 2.11387, 2.11387 ) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
[sub_resource type="Animation" id=3]
|
[sub_resource type="Animation" id=10]
|
||||||
resource_name = "idle"
|
|
||||||
length = 0.7
|
length = 0.7
|
||||||
loop = true
|
loop = true
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
|
@ -104,12 +206,22 @@ tracks/2/keys = {
|
||||||
[node name="CheckPoint" type="Node2D"]
|
[node name="CheckPoint" type="Node2D"]
|
||||||
script = ExtResource( 3 )
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
|
[node name="Particles2D" type="Particles2D" parent="."]
|
||||||
|
position = Vector2( 0, -5 )
|
||||||
|
emitting = false
|
||||||
|
amount = 5
|
||||||
|
lifetime = 0.4
|
||||||
|
speed_scale = 0.5
|
||||||
|
explosiveness = 0.22
|
||||||
|
process_material = SubResource( 7 )
|
||||||
|
|
||||||
[node name="Area2D" type="Area2D" parent="."]
|
[node name="Area2D" type="Area2D" parent="."]
|
||||||
collision_layer = 16
|
collision_layer = 16
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||||
|
visible = false
|
||||||
position = Vector2( 0, -11 )
|
position = Vector2( 0, -11 )
|
||||||
shape = SubResource( 1 )
|
shape = SubResource( 8 )
|
||||||
|
|
||||||
[node name="Sprite" type="Sprite" parent="."]
|
[node name="Sprite" type="Sprite" parent="."]
|
||||||
position = Vector2( 0, -10 )
|
position = Vector2( 0, -10 )
|
||||||
|
@ -128,6 +240,7 @@ shadow_item_cull_mask = -2147483639
|
||||||
|
|
||||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||||
autoplay = "idle"
|
autoplay = "idle"
|
||||||
anims/activated = SubResource( 2 )
|
anims/activated = SubResource( 9 )
|
||||||
anims/idle = SubResource( 3 )
|
anims/active = SubResource( 11 )
|
||||||
|
anims/idle = SubResource( 10 )
|
||||||
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=47 format=2]
|
[gd_scene load_steps=48 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=1]
|
[ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://assets/Tiles/root_props.png" type="Texture" id=2]
|
[ext_resource path="res://assets/Tiles/root_props.png" type="Texture" id=2]
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=7]
|
[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=7]
|
||||||
[ext_resource path="res://assets/Tiles/SemiSolidsTileMap.tscn" type="PackedScene" id=8]
|
[ext_resource path="res://assets/Tiles/SemiSolidsTileMap.tscn" type="PackedScene" id=8]
|
||||||
[ext_resource path="res://src/Hazards/Spike.tscn" type="PackedScene" id=9]
|
[ext_resource path="res://src/Hazards/Spike.tscn" type="PackedScene" id=9]
|
||||||
|
[ext_resource path="res://src/Actors/Player.tscn" type="PackedScene" id=10]
|
||||||
|
|
||||||
[sub_resource type="TileSet" id=1]
|
[sub_resource type="TileSet" id=1]
|
||||||
0/name = "tileset.png 0"
|
0/name = "tileset.png 0"
|
||||||
|
@ -385,7 +386,7 @@ collision_layer = 8
|
||||||
[node name="SolidsTileMap" parent="World" instance=ExtResource( 7 )]
|
[node name="SolidsTileMap" parent="World" instance=ExtResource( 7 )]
|
||||||
position = Vector2( -1, 0 )
|
position = Vector2( -1, 0 )
|
||||||
tile_set = SubResource( 36 )
|
tile_set = SubResource( 36 )
|
||||||
tile_data = PoolIntArray( 65535, 0, 0, 0, 0, 2, 28, 0, 0, 29, 0, 1, 30, 0, 2, 131071, 0, 65541, 65536, 0, 65538, 65564, 0, 65536, 65565, 0, 65537, 65566, 0, 65539, 196607, 0, 65536, 131072, 0, 65538, 131100, 0, 65536, 131101, 0, 65537, 131102, 0, 65539, 262143, 0, 65536, 196608, 0, 65539, 196636, 0, 65536, 196637, 0, 65537, 196638, 0, 65538, 327679, 0, 65541, 262144, 0, 65539, 262172, 0, 65541, 262173, 0, 65537, 262174, 0, 65539, 393215, 0, 65541, 327680, 0, 65539, 327708, 0, 65541, 327709, 0, 65537, 327710, 0, 65538, 458751, 0, 65541, 393216, 0, 65538, 393244, 0, 65541, 393245, 0, 65537, 393246, 0, 65538, 524287, 0, 65541, 458752, 0, 65539, 458780, 0, 65536, 458781, 0, 65537, 458782, 0, 65539, 589823, 0, 65541, 524288, 0, 65539, 524316, 0, 65536, 524317, 0, 65537, 524318, 0, 65538, 655359, 0, 65536, 589824, 0, 65538, 589852, 0, 65541, 589853, 0, 65537, 589854, 0, 65538, 720895, 0, 65541, 655360, 0, 65539, 655388, 0, 65536, 655389, 0, 65537, 655390, 0, 65539, 786431, 0, 65541, 720896, 0, 65538, 720924, 0, 65541, 720925, 0, 65537, 720926, 0, 65538, 851967, 0, 65536, 786432, 0, 65539, 786460, 0, 65536, 786461, 0, 65537, 786462, 0, 65538, 917503, 0, 65536, 851968, 0, 65539, 851996, 0, 65541, 851997, 0, 65537, 851998, 0, 65539, 983039, 0, 65536, 917504, 0, 65539, 917532, 0, 65536, 917533, 0, 65537, 917534, 0, 65538, 1048575, 0, 65541, 983040, 0, 65539, 983068, 0, 65541, 983069, 0, 65537, 983070, 0, 65539, 1114111, 0, 65536, 1048576, 0, 131075, 1048577, 0, 131076, 1048578, 0, 131076, 1048579, 0, 131076, 1048580, 0, 131076, 1048581, 0, 1, 1048582, 0, 1, 1048583, 0, 1, 1048584, 0, 1, 1048585, 0, 1, 1048586, 0, 1, 1048587, 0, 131076, 1048588, 0, 1, 1048589, 0, 131076, 1048590, 0, 131076, 1048591, 0, 131076, 1048592, 0, 131076, 1048593, 0, 131076, 1048594, 0, 1, 1048595, 0, 131076, 1048596, 0, 131076, 1048597, 0, 131076, 1048598, 0, 131076, 1048599, 0, 131076, 1048600, 0, 131076, 1048601, 0, 1, 1048602, 0, 1, 1048603, 0, 131076, 1048604, 0, 131077, 1048605, 0, 65537, 1048606, 0, 65539, 1179647, 0, 65541, 1114112, 0, 65537, 1114113, 0, 65537, 1114114, 0, 65537, 1114115, 0, 65537, 1114116, 0, 65537, 1114117, 0, 65537, 1114118, 0, 65537, 1114119, 0, 65537, 1114120, 0, 65537, 1114121, 0, 65537, 1114122, 0, 65537, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65537, 1114126, 0, 65537, 1114127, 0, 65537, 1114128, 0, 65537, 1114129, 0, 65537, 1114130, 0, 65537, 1114131, 0, 65537, 1114132, 0, 65537, 1114133, 0, 65537, 1114134, 0, 65537, 1114135, 0, 65537, 1114136, 0, 65537, 1114137, 0, 65537, 1114138, 0, 65537, 1114139, 0, 65537, 1114140, 0, 65537, 1114141, 0, 65537, 1114142, 0, 65539, 1245183, 0, 131072, 1179648, 0, 131073, 1179649, 0, 131073, 1179650, 0, 4, 1179651, 0, 4, 1179652, 0, 4, 1179653, 0, 131073, 1179654, 0, 4, 1179655, 0, 131073, 1179656, 0, 4, 1179657, 0, 4, 1179658, 0, 131073, 1179659, 0, 4, 1179660, 0, 4, 1179661, 0, 131073, 1179662, 0, 131073, 1179663, 0, 4, 1179664, 0, 131073, 1179665, 0, 4, 1179666, 0, 4, 1179667, 0, 131073, 1179668, 0, 4, 1179669, 0, 4, 1179670, 0, 131073, 1179671, 0, 131073, 1179672, 0, 4, 1179673, 0, 131073, 1179674, 0, 131073, 1179675, 0, 4, 1179676, 0, 4, 1179677, 0, 131073, 1179678, 0, 131074 )
|
tile_data = PoolIntArray( 28, 0, 0, 29, 0, 1, 30, 0, 2, 131071, 0, 65541, 65536, 0, 65538, 65564, 0, 65536, 65565, 0, 65537, 65566, 0, 65539, 196607, 0, 65536, 131072, 0, 65538, 131076, 0, 0, 131077, 0, 0, 131078, 0, 1, 131079, 0, 2, 131083, 0, 0, 131084, 0, 0, 131085, 0, 1, 131086, 0, 2, 131100, 0, 65536, 131101, 0, 65537, 131102, 0, 65539, 262143, 0, 65536, 196608, 0, 65539, 196612, 0, 65536, 196613, 0, 65536, 196614, 0, 65537, 196615, 0, 65539, 196619, 0, 65536, 196620, 0, 65536, 196621, 0, 65537, 196622, 0, 65539, 196636, 0, 65536, 196637, 0, 65537, 196638, 0, 65538, 327679, 0, 65541, 262144, 0, 65539, 262148, 0, 65541, 262149, 0, 65541, 262150, 0, 65537, 262151, 0, 65539, 262155, 0, 65541, 262156, 0, 65536, 262157, 0, 65537, 262158, 0, 65539, 262172, 0, 65541, 262173, 0, 65537, 262174, 0, 65539, 393215, 0, 65541, 327680, 0, 65539, 327684, 0, 65541, 327685, 0, 65541, 327686, 0, 65537, 327687, 0, 65539, 327691, 0, 65541, 327692, 0, 65536, 327693, 0, 65537, 327694, 0, 65538, 327708, 0, 65541, 327709, 0, 65537, 327710, 0, 65538, 458751, 0, 65541, 393216, 0, 65538, 393220, 0, 65536, 393221, 0, 65536, 393222, 0, 65537, 393223, 0, 65538, 393227, 0, 65536, 393228, 0, 65536, 393229, 0, 65537, 393230, 0, 65539, 393244, 0, 65541, 393245, 0, 65537, 393246, 0, 65538, 524287, 0, 65541, 458752, 0, 65539, 458756, 0, 65541, 458757, 0, 65541, 458758, 0, 65537, 458759, 0, 65538, 458763, 0, 65541, 458764, 0, 65536, 458765, 0, 65537, 458766, 0, 65539, 458780, 0, 65536, 458781, 0, 65537, 458782, 0, 65539, 589823, 0, 65541, 524288, 0, 65539, 524292, 0, 65541, 524293, 0, 65541, 524294, 0, 65537, 524295, 0, 65539, 524299, 0, 65541, 524300, 0, 65536, 524301, 0, 65537, 524302, 0, 65539, 524316, 0, 65536, 524317, 0, 65537, 524318, 0, 65538, 655359, 0, 65536, 589824, 0, 65538, 589828, 0, 65536, 589829, 0, 65536, 589830, 0, 65537, 589831, 0, 65538, 589835, 0, 65536, 589836, 0, 65536, 589837, 0, 65537, 589838, 0, 65538, 589852, 0, 65541, 589853, 0, 65537, 589854, 0, 65538, 720895, 0, 65541, 655360, 0, 65539, 655364, 0, 65541, 655365, 0, 65541, 655366, 0, 65537, 655367, 0, 65539, 655371, 0, 65541, 655372, 0, 65541, 655373, 0, 65537, 655374, 0, 65538, 655388, 0, 65536, 655389, 0, 65537, 655390, 0, 65539, 786431, 0, 65541, 720896, 0, 65538, 720900, 0, 65536, 720901, 0, 65536, 720902, 0, 65537, 720903, 0, 65538, 720907, 0, 65536, 720908, 0, 65536, 720909, 0, 65537, 720910, 0, 65538, 720924, 0, 65541, 720925, 0, 65537, 720926, 0, 65538, 851967, 0, 65536, 786432, 0, 65539, 786436, 0, 65536, 786437, 0, 65536, 786438, 0, 65537, 786439, 0, 65539, 786443, 0, 65536, 786444, 0, 65536, 786445, 0, 65537, 786446, 0, 65538, 786460, 0, 65536, 786461, 0, 65537, 786462, 0, 65538, 917503, 0, 65536, 851968, 0, 65539, 851972, 0, 131072, 851973, 0, 131072, 851974, 0, 4, 851975, 0, 131074, 851979, 0, 131072, 851980, 0, 131072, 851981, 0, 4, 851982, 0, 131074, 851996, 0, 65541, 851997, 0, 65537, 851998, 0, 65539, 983039, 0, 65536, 917504, 0, 65539, 917532, 0, 65536, 917533, 0, 65537, 917534, 0, 65538, 1048575, 0, 65541, 983040, 0, 65539, 983068, 0, 65541, 983069, 0, 65537, 983070, 0, 65539, 1114111, 0, 65536, 1048576, 0, 131075, 1048577, 0, 131076, 1048578, 0, 131076, 1048579, 0, 131076, 1048580, 0, 131076, 1048581, 0, 1, 1048582, 0, 1, 1048583, 0, 1, 1048584, 0, 1, 1048585, 0, 1, 1048586, 0, 1, 1048587, 0, 131076, 1048588, 0, 1, 1048589, 0, 131076, 1048590, 0, 131076, 1048591, 0, 131076, 1048592, 0, 131076, 1048593, 0, 131076, 1048594, 0, 1, 1048595, 0, 131076, 1048596, 0, 131076, 1048597, 0, 131076, 1048598, 0, 131076, 1048599, 0, 131076, 1048600, 0, 131076, 1048601, 0, 1, 1048602, 0, 1, 1048603, 0, 131076, 1048604, 0, 131077, 1048605, 0, 65537, 1048606, 0, 65539, 1179647, 0, 65541, 1114112, 0, 65537, 1114113, 0, 65537, 1114114, 0, 65537, 1114115, 0, 65537, 1114116, 0, 65537, 1114117, 0, 65537, 1114118, 0, 65537, 1114119, 0, 65537, 1114120, 0, 65537, 1114121, 0, 65537, 1114122, 0, 65537, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65537, 1114126, 0, 65537, 1114127, 0, 65537, 1114128, 0, 65537, 1114129, 0, 65537, 1114130, 0, 65537, 1114131, 0, 65537, 1114132, 0, 65537, 1114133, 0, 65537, 1114134, 0, 65537, 1114135, 0, 65537, 1114136, 0, 65537, 1114137, 0, 65537, 1114138, 0, 65537, 1114139, 0, 65537, 1114140, 0, 65537, 1114141, 0, 65537, 1114142, 0, 65539, 1245183, 0, 131072, 1179648, 0, 131073, 1179649, 0, 131073, 1179650, 0, 4, 1179651, 0, 4, 1179652, 0, 4, 1179653, 0, 131073, 1179654, 0, 4, 1179655, 0, 131073, 1179656, 0, 4, 1179657, 0, 4, 1179658, 0, 131073, 1179659, 0, 4, 1179660, 0, 4, 1179661, 0, 131073, 1179662, 0, 131073, 1179663, 0, 4, 1179664, 0, 131073, 1179665, 0, 4, 1179666, 0, 4, 1179667, 0, 131073, 1179668, 0, 4, 1179669, 0, 4, 1179670, 0, 131073, 1179671, 0, 131073, 1179672, 0, 4, 1179673, 0, 131073, 1179674, 0, 131073, 1179675, 0, 4, 1179676, 0, 4, 1179677, 0, 131073, 1179678, 0, 131074 )
|
||||||
|
|
||||||
[node name="Decorations" type="TileMap" parent="World"]
|
[node name="Decorations" type="TileMap" parent="World"]
|
||||||
tile_set = SubResource( 37 )
|
tile_set = SubResource( 37 )
|
||||||
|
@ -398,3 +399,6 @@ position = Vector2( 1.37535, 6 )
|
||||||
[node name="WaterfallsFG" type="Node2D" parent="World"]
|
[node name="WaterfallsFG" type="Node2D" parent="World"]
|
||||||
|
|
||||||
[node name="Torches" type="Node2D" parent="World"]
|
[node name="Torches" type="Node2D" parent="World"]
|
||||||
|
|
||||||
|
[node name="Player" parent="." instance=ExtResource( 10 )]
|
||||||
|
position = Vector2( 83, 19 )
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue