Code cleanup and minor fixes to Level 3
This commit is contained in:
@@ -8,33 +8,33 @@ var health: int = 2
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
|
@@ -10,44 +10,44 @@ var health: int = 1
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if player:
|
||||
if position.distance_to(player.position) < 40:
|
||||
velocity = position.direction_to(player.position).normalized() * -SPEED
|
||||
elif position.distance_to(player.position) > 41:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
if player:
|
||||
if position.distance_to(player.position) < 40:
|
||||
velocity = position.direction_to(player.position).normalized() * -SPEED
|
||||
elif position.distance_to(player.position) > 41:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
|
||||
|
||||
func _on_projectile_timer_timeout() -> void:
|
||||
if player:
|
||||
var projectile: Node = creepy_hand.instance()
|
||||
projectile.init($Sprite.global_position, player.position)
|
||||
get_tree().get_current_scene().get_node('Projectiles').add_child(projectile)
|
||||
return
|
||||
if player:
|
||||
var projectile: Node = creepy_hand.instance()
|
||||
projectile.init($Sprite.global_position, player.position)
|
||||
get_tree().get_current_scene().get_node('Projectiles').add_child(projectile)
|
||||
return
|
||||
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
|
@@ -10,49 +10,49 @@ var counter: int = 0
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
|
||||
|
||||
if hit == true:
|
||||
if counter < 15:
|
||||
if counter % 5 == 0:
|
||||
$AnimatedSprite.visible = false
|
||||
else:
|
||||
$AnimatedSprite.visible = true
|
||||
counter += 1
|
||||
velocity = Vector2.ZERO
|
||||
else:
|
||||
counter = 0
|
||||
hit = false
|
||||
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
if hit == true:
|
||||
if counter < 15:
|
||||
if counter % 5 == 0:
|
||||
$AnimatedSprite.visible = false
|
||||
else:
|
||||
$AnimatedSprite.visible = true
|
||||
counter += 1
|
||||
velocity = Vector2.ZERO
|
||||
else:
|
||||
counter = 0
|
||||
hit = false
|
||||
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
return
|
||||
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
hit = true
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
hit = true
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
hit = true
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
hit = true
|
||||
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
|
@@ -10,65 +10,65 @@ var counter: int = 0
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
velocity = Vector2.ZERO
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
var angle = position.angle_to_point(player.position)
|
||||
if abs(angle) > PI/2:
|
||||
$AnimatedSprite1.scale.x = -0.563
|
||||
else:
|
||||
$AnimatedSprite1.scale.x = 0.563
|
||||
|
||||
if hit == true:
|
||||
if counter < 15:
|
||||
if counter % 5 == 0:
|
||||
$AnimatedSprite1.visible = false
|
||||
else:
|
||||
$AnimatedSprite1.visible = true
|
||||
counter += 1
|
||||
velocity = Vector2.ZERO
|
||||
else:
|
||||
counter = 0
|
||||
hit = false
|
||||
if player and position.distance_to(player.position) > 1:
|
||||
velocity = position.direction_to(player.position).normalized() * SPEED
|
||||
var angle = position.angle_to_point(player.position)
|
||||
if abs(angle) > PI/2:
|
||||
$AnimatedSprite1.scale.x = -0.563
|
||||
else:
|
||||
$AnimatedSprite1.scale.x = 0.563
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
if hit == true:
|
||||
if counter < 15:
|
||||
if counter % 5 == 0:
|
||||
$AnimatedSprite1.visible = false
|
||||
else:
|
||||
$AnimatedSprite1.visible = true
|
||||
counter += 1
|
||||
velocity = Vector2.ZERO
|
||||
else:
|
||||
counter = 0
|
||||
hit = false
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Running'
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Running'
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
$AnimatedSprite1.animation = 'Idle'
|
||||
return
|
||||
if body.is_in_group('player'):
|
||||
player = null
|
||||
$AnimatedSprite1.animation = 'Idle'
|
||||
return
|
||||
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
hit = true
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
hit = true
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
hit = true
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
hit = true
|
||||
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
|
||||
func _on_Player_Detector__Attack_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Jump'
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Jump'
|
||||
|
||||
|
||||
func _on_Player_Detector__Attack_body_exited(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Running'
|
||||
if body.is_in_group('player'):
|
||||
player = body
|
||||
$AnimatedSprite1.animation = 'Running'
|
||||
|
@@ -9,58 +9,58 @@ var health: int = 2
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
move = Vector2.ZERO
|
||||
move = Vector2.ZERO
|
||||
|
||||
if player != null:
|
||||
move = position.direction_to(player.position) * speed
|
||||
else:
|
||||
move = Vector2.ZERO
|
||||
if player != null:
|
||||
move = position.direction_to(player.position) * speed
|
||||
else:
|
||||
move = Vector2.ZERO
|
||||
|
||||
move = move.normalized()
|
||||
move = move_and_collide(move)
|
||||
move = move.normalized()
|
||||
move = move_and_collide(move)
|
||||
|
||||
|
||||
|
||||
func _on_Area2D_body_entered(body: Node) -> void:
|
||||
if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")):
|
||||
player = body
|
||||
if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")):
|
||||
player = body
|
||||
|
||||
|
||||
func _on_Area2D_body_exited(body: Node) -> void:
|
||||
if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")):
|
||||
player = null
|
||||
if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")):
|
||||
player = null
|
||||
|
||||
|
||||
func fire():
|
||||
var snowball = SNOWBALL_SCENE.instance()
|
||||
snowball.position = get_global_position()
|
||||
snowball.player = player
|
||||
get_parent().add_child(snowball)
|
||||
$Timer.set_wait_time(1)
|
||||
var snowball = SNOWBALL_SCENE.instance()
|
||||
snowball.position = get_global_position()
|
||||
snowball.player = player
|
||||
get_parent().add_child(snowball)
|
||||
$Timer.set_wait_time(1)
|
||||
|
||||
|
||||
func _on_Timer_timeout() -> void:
|
||||
if player != null:
|
||||
fire()
|
||||
if player != null:
|
||||
fire()
|
||||
|
||||
|
||||
func _on_player_detector_area_entered(area: Area2D) -> void:
|
||||
if area.get_parent().name == 'Player':
|
||||
player = area.get_parent()
|
||||
return
|
||||
if area.get_parent().name == 'Player':
|
||||
player = area.get_parent()
|
||||
return
|
||||
|
||||
|
||||
func _on_player_detector_area_exited(_area: Area2D):
|
||||
player = null
|
||||
return
|
||||
player = null
|
||||
return
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
print("HIT")
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
print("HIT")
|
||||
if area.is_in_group('player_weapon_1'):
|
||||
health -= 1
|
||||
elif area.is_in_group('player_weapon_2'):
|
||||
health -= 2
|
||||
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
if health <= 0:
|
||||
call_deferred('queue_free')
|
||||
return
|
||||
|
@@ -1,10 +1,12 @@
|
||||
extends Label
|
||||
|
||||
signal timer_end
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
var time_seconds: int = int($Timer.get_time_left())
|
||||
set_text('%02d:%02d' % [time_seconds, int(($Timer.get_time_left() - time_seconds) * 100)])
|
||||
|
||||
|
||||
if $Timer.get_time_left() == 0:
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://GUI/Countdown Timer.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Fonts/AtariClassic.ttf" type="DynamicFontData" id=2]
|
||||
[ext_resource path="res://Fonts/AtariClassicSmooth.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 40
|
||||
@@ -14,8 +14,8 @@ margin_right = 335.0
|
||||
margin_bottom = 41.0
|
||||
rect_min_size = Vector2( 200, 0 )
|
||||
rect_scale = Vector2( 0.25, 0.25 )
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
align = 1
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Levels/Interactives/Coin.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Levels/Interactables/Coin.gd" type="Script" id=1]
|
||||
[ext_resource path="res://Sprites/Assets/coin.png" type="Texture" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
@@ -8,7 +8,7 @@ extends Node2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -17,8 +17,8 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_finished(anim_name: String) -> void:
|
||||
$GemSprite.visible = false
|
||||
$GemSprite.visible = false
|
||||
|
||||
|
||||
func _on_AnimationPlayer_animation_started(anim_name: String) -> void:
|
||||
$GemSprite.visible = true
|
||||
$GemSprite.visible = true
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Assets/resources_basic.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Assets/Resources_Basic.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Levels/Interactables/Gem.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="Animation" id=3]
|
||||
|
@@ -13,7 +13,7 @@ signal gem_collected
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
@@ -22,12 +22,12 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _on_Player_Detector_area_entered(area: Area2D) -> void:
|
||||
if area.get_parent().name == 'Player':
|
||||
if is_opened == false:
|
||||
$chestClosed.visible = false
|
||||
$chestOpened.visible = true
|
||||
$Gem.visible = true
|
||||
$Gem/AnimationPlayer.play('rise')
|
||||
is_opened = true
|
||||
has_gem = false
|
||||
emit_signal('gem_collected')
|
||||
if area.get_parent().name == 'Player':
|
||||
if is_opened == false:
|
||||
$chestClosed.visible = false
|
||||
$chestOpened.visible = true
|
||||
$Gem.visible = true
|
||||
$Gem/AnimationPlayer.play('rise')
|
||||
is_opened = true
|
||||
has_gem = false
|
||||
emit_signal('gem_collected')
|
||||
|
@@ -1,52 +1,56 @@
|
||||
extends Node2D
|
||||
|
||||
onready var coin = preload("res://Levels/Interactives/Coin.tscn")
|
||||
onready var coin_container = get_node("coin_container")
|
||||
onready var score_label = get_node('Level 3 HUD/Label')
|
||||
#have event for timer to run out
|
||||
|
||||
onready var coin = preload('res://Levels/Interactables/Coin.tscn')
|
||||
|
||||
var screensize
|
||||
var score = 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$YSort/Player.load_hud($HUD)
|
||||
screensize = get_viewport_rect().size
|
||||
spawn_coins(8)
|
||||
return
|
||||
$YSort/Player.load_hud($HUD)
|
||||
screensize = get_viewport_rect().size
|
||||
spawn_coins(8)
|
||||
return
|
||||
|
||||
|
||||
func spawn_coins(num):
|
||||
for i in range(num):
|
||||
var g = coin.instance()
|
||||
$'coin_container'.add_child(g)
|
||||
g.connect("coin_grabbed", self, "_on_coin_grabbed")
|
||||
#g.set_pos(Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40)))
|
||||
g.position = Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40))
|
||||
func spawn_coins(num: int) -> void:
|
||||
for _i in range(num):
|
||||
var g: Node = coin.instance()
|
||||
$'coin_container'.add_child(g)
|
||||
g.connect('coin_grabbed', self, '_on_coin_grabbed')
|
||||
#g.set_pos(Vector2(rand_range(0, screensize.x - 40), rand_range(0, screensize.y - 40)))
|
||||
g.position = Vector2(rand_range(0, screensize.x - 40), rand_range(0, screensize.y - 40))
|
||||
return
|
||||
|
||||
func _on_coin_grabbed():
|
||||
score+=1
|
||||
print(score)
|
||||
score_label.set_text(str(score) + "/5")
|
||||
|
||||
func _timer_out():
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
func _on_coin_grabbed() -> void:
|
||||
score += 1
|
||||
print(score)
|
||||
$'Level 3 HUD/Label'.set_text(str(score) + '/5')
|
||||
return
|
||||
|
||||
|
||||
func _timer_out() -> void:
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
|
||||
|
||||
func _on_TreasureChest_ice_key_collected() -> void:
|
||||
$YSort/Door/doorClosed.visible = false
|
||||
$YSort/Door/doorOpened.visible = true
|
||||
$YSort/DoorCollision.layers = 5
|
||||
|
||||
$YSort/Door/doorClosed.visible = false
|
||||
$YSort/Door/doorOpened.visible = true
|
||||
$YSort/DoorCollision.layers = 5
|
||||
return
|
||||
|
||||
|
||||
func _on_DoorDetector_body_entered(body: Node) -> void:
|
||||
if body.get_parent().name == 'Player':
|
||||
print('WIN WIN WIN')
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
if body.is_in_group('player'):
|
||||
print('WIN WIN WIN')
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
|
||||
|
||||
func _on_DoorDetector_area_entered(area: Area2D) -> void:
|
||||
if area.get_parent().name == 'Player':
|
||||
print('WIN WIN WIN')
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn') # Replace with function body.
|
||||
if area.get_parent().name == 'Player':
|
||||
print('WIN WIN WIN')
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
|
@@ -177,6 +177,11 @@ position = Vector2( -49.6063, 34.526 )
|
||||
position = Vector2( 0, -4.25 )
|
||||
shape = SubResource( 5 )
|
||||
|
||||
[node name="Effects" type="Node" parent="."]
|
||||
|
||||
[node name="SlowTime" type="Node" parent="Effects"]
|
||||
script = ExtResource( 16 )
|
||||
|
||||
[node name="coin_container" type="Control" parent="."]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
@@ -184,18 +189,6 @@ __meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Countdown Timer" parent="." instance=ExtResource( 12 )]
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource( 9 )]
|
||||
|
||||
[node name="Pause Screen" parent="." instance=ExtResource( 10 )]
|
||||
|
||||
[node name="BGM" type="AudioStreamPlayer" parent="."]
|
||||
pause_mode = 2
|
||||
stream = ExtResource( 11 )
|
||||
volume_db = -12.0
|
||||
autoplay = true
|
||||
|
||||
[node name="Level 3 HUD" type="Control" parent="."]
|
||||
margin_left = 0.28064
|
||||
margin_top = -12.9083
|
||||
@@ -216,10 +209,17 @@ __meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Effects" type="Node" parent="."]
|
||||
[node name="HUD" parent="." instance=ExtResource( 9 )]
|
||||
|
||||
[node name="SlowTime" type="Node" parent="Effects"]
|
||||
script = ExtResource( 16 )
|
||||
[node name="Countdown Timer" parent="HUD" instance=ExtResource( 12 )]
|
||||
|
||||
[node name="Pause Screen" parent="." instance=ExtResource( 10 )]
|
||||
|
||||
[node name="BGM" type="AudioStreamPlayer" parent="."]
|
||||
pause_mode = 2
|
||||
stream = ExtResource( 11 )
|
||||
volume_db = -12.0
|
||||
autoplay = true
|
||||
|
||||
[connection signal="area_entered" from="YSort/DoorDetector" to="." method="_on_DoorDetector_area_entered"]
|
||||
[connection signal="ice_key_collected" from="YSort/TreasureChest" to="." method="_on_TreasureChest_ice_key_collected"]
|
||||
|
@@ -3,22 +3,22 @@ extends Node2D
|
||||
var gems: int = 4
|
||||
|
||||
func _ready() -> void:
|
||||
#$YSort/Player.position = get_viewport_rect().size / 2
|
||||
$YSort/Player.load_hud($HUD)
|
||||
return
|
||||
#$YSort/Player.position = get_viewport_rect().size / 2
|
||||
$YSort/Player.load_hud($HUD)
|
||||
return
|
||||
|
||||
|
||||
func _on_TreasureChest_gem_collected() -> void:
|
||||
gems -= 1
|
||||
gems -= 1
|
||||
|
||||
if gems == 0:
|
||||
$YSort/Items/Door/doorClosed.visible = false
|
||||
$YSort/Items/Door/doorOpened.visible = true
|
||||
$DoorCollision.layers = 5
|
||||
if gems == 0:
|
||||
$YSort/Items/Door/doorClosed.visible = false
|
||||
$YSort/Items/Door/doorOpened.visible = true
|
||||
$DoorCollision.layers = 5
|
||||
|
||||
|
||||
|
||||
func _on_NextArea_area_entered(area: Area2D) -> void:
|
||||
if area.get_parent().name == 'Player':
|
||||
$YSort/Player.position.x = 195
|
||||
$YSort/Player.position.y = -335
|
||||
if area.get_parent().name == 'Player':
|
||||
$YSort/Player.position.x = 195
|
||||
$YSort/Player.position.y = -335
|
||||
|
@@ -1,18 +1,18 @@
|
||||
[gd_scene load_steps=31 format=2]
|
||||
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_12.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_12.png" type="Texture" id=1]
|
||||
[ext_resource path="res://Enemies/Hellhound.tscn" type="PackedScene" id=2]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_03.png" type="Texture" id=3]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_09.png" type="Texture" id=4]
|
||||
[ext_resource path="res://Levels/Objects/Door.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_10.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_10.png" type="Texture" id=6]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_04.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_06.png" type="Texture" id=8]
|
||||
[ext_resource path="res://Levels/Level 4.gd" type="Script" id=9]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_01.png" type="Texture" id=10]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_13.png" type="Texture" id=11]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_14.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/fire_column_medium_11.png" type="Texture" id=13]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_13.png" type="Texture" id=11]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_14.png" type="Texture" id=12]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_11.png" type="Texture" id=13]
|
||||
[ext_resource path="res://Sprites/Levels/Environment/Fire_Column_Medium_08.png" type="Texture" id=14]
|
||||
[ext_resource path="res://Resources/Level_4_Tileset.tres" type="TileSet" id=15]
|
||||
[ext_resource path="res://Levels/Interactables/Treasure Chest.tscn" type="PackedScene" id=16]
|
||||
@@ -86,21 +86,21 @@ tile_data = PoolIntArray( -2686978, 0, 5, -2686977, 0, 196610, -2752512, 0, 1966
|
||||
[node name="Fire3" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -607.628, -210.601 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 2
|
||||
frame = 12
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
[node name="Fire2" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -543.25, -212.563 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 5
|
||||
frame = 1
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
[node name="Fire1" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( -479.806, -214.167 )
|
||||
frames = SubResource( 1 )
|
||||
frame = 12
|
||||
frame = 8
|
||||
playing = true
|
||||
offset = Vector2( 679.819, 333.222 )
|
||||
|
||||
|
@@ -1,17 +1,16 @@
|
||||
extends Node
|
||||
|
||||
const END_VALUE = 1
|
||||
|
||||
signal unfreeze
|
||||
|
||||
var is_active = false
|
||||
var time_start
|
||||
var duration_ms
|
||||
var start_value
|
||||
const END_VALUE: int = 1
|
||||
|
||||
var is_active: bool = false
|
||||
var time_start: int
|
||||
var duration_ms: int
|
||||
var start_value: float
|
||||
|
||||
|
||||
|
||||
func start(duration = 1, strength = 0.9):
|
||||
func start(duration: int = 1, strength: float = 0.9):
|
||||
time_start = OS.get_ticks_msec()
|
||||
duration_ms = duration * 1000
|
||||
start_value = 1 - strength
|
||||
@@ -19,7 +18,7 @@ func start(duration = 1, strength = 0.9):
|
||||
is_active = true
|
||||
|
||||
|
||||
func _process(delta):
|
||||
func _process(_delta: float) -> void:
|
||||
if is_active:
|
||||
var current_time = OS.get_ticks_msec() - time_start
|
||||
var value = circl_ease_in(current_time, start_value, END_VALUE, duration_ms)
|
||||
@@ -28,7 +27,9 @@ func _process(delta):
|
||||
value = END_VALUE
|
||||
emit_signal('unfreeze')
|
||||
Engine.time_scale = value
|
||||
|
||||
return
|
||||
|
||||
|
||||
func circl_ease_in(t, b, c, d):
|
||||
t /=d
|
||||
t /= d
|
||||
return -c * (sqrt(1 - t * t) - 1) + b
|
||||
|
@@ -7,7 +7,7 @@ export var relative_y_tiles: int
|
||||
|
||||
func _on_spawn_trap_body_entered(body: Node) -> void:
|
||||
if body.is_in_group('player'):
|
||||
set_deferred('monitoring', false)
|
||||
$Tile.set_deferred('disabled', true)
|
||||
|
||||
var enemy: KinematicBody2D = load(enemy_path).instance()
|
||||
enemy.position.x = position.x + (relative_x_tiles * 16 + 8)
|
||||
|
90
Main.gd
90
Main.gd
@@ -7,73 +7,73 @@ export var world_path: String
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
randomize()
|
||||
var splash_screen: Node = play_splash_screen()
|
||||
yield(splash_screen, 'complete')
|
||||
splash_screen = null
|
||||
randomize()
|
||||
var splash_screen: Node = play_splash_screen()
|
||||
yield(splash_screen, 'complete')
|
||||
splash_screen = null
|
||||
|
||||
var main_menu: Node = play_main_menu()
|
||||
yield(main_menu, 'complete')
|
||||
free_connected_node(main_menu, 'main_menu_option')
|
||||
main_menu = null
|
||||
return
|
||||
var main_menu: Node = play_main_menu()
|
||||
yield(main_menu, 'complete')
|
||||
free_connected_node(main_menu, 'main_menu_option')
|
||||
main_menu = null
|
||||
return
|
||||
|
||||
|
||||
func play_splash_screen() -> Node:
|
||||
var splash_screen: Node = load(splash_screen_path).instance()
|
||||
if splash_screen.connect('complete', self, 'free_connected_node',
|
||||
[splash_screen, 'free_connected_node']) != OK:
|
||||
print('ERROR: Splash Screen "complete" signal already connected.')
|
||||
var splash_screen: Node = load(splash_screen_path).instance()
|
||||
if splash_screen.connect('complete', self, 'free_connected_node',
|
||||
[splash_screen, 'free_connected_node']) != OK:
|
||||
print('ERROR: Splash Screen "complete" signal already connected.')
|
||||
|
||||
add_child(splash_screen)
|
||||
return splash_screen
|
||||
add_child(splash_screen)
|
||||
return splash_screen
|
||||
|
||||
|
||||
func play_main_menu() -> Node:
|
||||
var main_menu: Node = load(main_menu_path).instance()
|
||||
if main_menu.connect('complete', self, 'main_menu_option') != OK:
|
||||
print('ERROR: Main Menu "complete" signal already connected.')
|
||||
var main_menu: Node = load(main_menu_path).instance()
|
||||
if main_menu.connect('complete', self, 'main_menu_option') != OK:
|
||||
print('ERROR: Main Menu "complete" signal already connected.')
|
||||
|
||||
add_child(main_menu)
|
||||
return main_menu
|
||||
add_child(main_menu)
|
||||
return main_menu
|
||||
|
||||
|
||||
func main_menu_option(option: String) -> void:
|
||||
if option == 'new game':
|
||||
var level_select_menu: Node = play_level_select_menu()
|
||||
yield(level_select_menu, 'complete')
|
||||
free_connected_node(level_select_menu, 'level_select_menu_option')
|
||||
level_select_menu = null
|
||||
return
|
||||
if option == 'new game':
|
||||
var level_select_menu: Node = play_level_select_menu()
|
||||
yield(level_select_menu, 'complete')
|
||||
free_connected_node(level_select_menu, 'level_select_menu_option')
|
||||
level_select_menu = null
|
||||
return
|
||||
|
||||
|
||||
func play_level_select_menu() -> Node:
|
||||
var level_select_menu: Node = load(level_select_menu_path).instance()
|
||||
if level_select_menu.connect('complete', self, 'level_select_menu_option') != OK:
|
||||
print('ERROR: Level Select Menu "complete" signal already connected.')
|
||||
var level_select_menu: Node = load(level_select_menu_path).instance()
|
||||
if level_select_menu.connect('complete', self, 'level_select_menu_option') != OK:
|
||||
print('ERROR: Level Select Menu "complete" signal already connected.')
|
||||
|
||||
add_child(level_select_menu)
|
||||
return level_select_menu
|
||||
add_child(level_select_menu)
|
||||
return level_select_menu
|
||||
|
||||
|
||||
func level_select_menu_option(option: String) -> void:
|
||||
var level: String = 'res://Levels/'
|
||||
if option == 'H':
|
||||
level += 'Hub World.tscn'
|
||||
else:
|
||||
level += 'Level ' + option + '.tscn'
|
||||
var level: String = 'res://Levels/'
|
||||
if option == 'H':
|
||||
level += 'Hub World.tscn'
|
||||
else:
|
||||
level += 'Level ' + option + '.tscn'
|
||||
|
||||
new_game(level)
|
||||
return
|
||||
new_game(level)
|
||||
return
|
||||
|
||||
func free_connected_node(node: Node, connected_function: String) -> void:
|
||||
node.disconnect('complete', self, connected_function)
|
||||
node.queue_free()
|
||||
return
|
||||
node.disconnect('complete', self, connected_function)
|
||||
node.queue_free()
|
||||
return
|
||||
|
||||
|
||||
func new_game(level: String) -> void:
|
||||
if get_tree().change_scene(level) != OK:
|
||||
print('ERROR: Main failed to change scene to Level.')
|
||||
queue_free()
|
||||
return
|
||||
if get_tree().change_scene(level) != OK:
|
||||
print('ERROR: Main failed to change scene to Level.')
|
||||
queue_free()
|
||||
return
|
||||
|
196
Player/Player.gd
196
Player/Player.gd
@@ -1,10 +1,10 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
signal frozen
|
||||
|
||||
export var ACCELERATION: int = 1000
|
||||
export var MAX_SPEED: int = 120
|
||||
export var FRICTION: int = 1000
|
||||
signal frozen
|
||||
|
||||
|
||||
const HEALTH_SLICES: Array = [0, 18, 35, 50, 65, 82, 100]
|
||||
var health_index: int = 6
|
||||
@@ -14,157 +14,135 @@ var velocity: Vector2 = Vector2.ZERO
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
set_weapon_position(Vector2(1, 0))
|
||||
return
|
||||
set_weapon_position(Vector2(1, 0))
|
||||
return
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var input_vector: Vector2 = Vector2.ZERO
|
||||
var input_vector: Vector2 = Vector2.ZERO
|
||||
|
||||
input_vector.x = Input.get_action_strength('player_right') \
|
||||
- Input.get_action_strength('player_left')
|
||||
input_vector.y = Input.get_action_strength('player_down') \
|
||||
- Input.get_action_strength('player_up')
|
||||
input_vector = input_vector.normalized()
|
||||
input_vector.x = Input.get_action_strength('player_right') \
|
||||
- Input.get_action_strength('player_left')
|
||||
input_vector.y = Input.get_action_strength('player_down') \
|
||||
- Input.get_action_strength('player_up')
|
||||
input_vector = input_vector.normalized()
|
||||
|
||||
if input_vector != Vector2.ZERO:
|
||||
$AnimationTree.set('parameters/Idle/blend_position', input_vector)
|
||||
velocity = velocity.move_toward(input_vector * MAX_SPEED, ACCELERATION * delta)
|
||||
set_weapon_position(input_vector)
|
||||
else:
|
||||
velocity = velocity.move_toward(Vector2.ZERO, FRICTION * delta)
|
||||
if input_vector != Vector2.ZERO:
|
||||
$AnimationTree.set('parameters/Idle/blend_position', input_vector)
|
||||
velocity = velocity.move_toward(input_vector * MAX_SPEED, ACCELERATION * delta)
|
||||
set_weapon_position(input_vector)
|
||||
else:
|
||||
velocity = velocity.move_toward(Vector2.ZERO, FRICTION * delta)
|
||||
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
velocity = move_and_slide(velocity)
|
||||
return
|
||||
|
||||
|
||||
func load_hud(node: CanvasLayer) -> void:
|
||||
hud = node
|
||||
if hud.connect('add_currency', self, 'add_currency') != OK:
|
||||
print('ERROR: HUD "add_currency" signal already connected.')
|
||||
hud = node
|
||||
if hud.connect('add_currency', self, 'add_currency') != OK:
|
||||
print('ERROR: HUD "add_currency" signal already connected.')
|
||||
|
||||
hud.update_health(HEALTH_SLICES[health_index])
|
||||
hud.update_currency($Inventory.get_currency())
|
||||
return
|
||||
hud.update_health(HEALTH_SLICES[health_index])
|
||||
hud.update_currency($Inventory.get_currency())
|
||||
return
|
||||
|
||||
|
||||
func set_weapon_position(pos: Vector2) -> void:
|
||||
# facing left
|
||||
if pos[0] < 0:
|
||||
$Sword.rotation_degrees = -90
|
||||
$Javelin.rotation_degrees = -90
|
||||
# Facing left
|
||||
if pos[0] < 0:
|
||||
$Sword.rotation_degrees = -90
|
||||
$Javelin.rotation_degrees = -90
|
||||
|
||||
# facing right
|
||||
elif pos[0] > 0:
|
||||
$Sword.rotation_degrees = 90
|
||||
$Javelin.rotation_degrees = 90
|
||||
# Facing right
|
||||
elif pos[0] > 0:
|
||||
$Sword.rotation_degrees = 90
|
||||
$Javelin.rotation_degrees = 90
|
||||
|
||||
# facing up
|
||||
elif pos[1] < 0:
|
||||
$Sword.rotation_degrees = 0
|
||||
$Javelin.rotation_degrees = 0
|
||||
# Facing up
|
||||
elif pos[1] < 0:
|
||||
$Sword.rotation_degrees = 0
|
||||
$Javelin.rotation_degrees = 0
|
||||
|
||||
# facing down
|
||||
elif pos[1] > 0:
|
||||
$Sword.rotation_degrees = 180
|
||||
$Javelin.rotation_degrees = 180
|
||||
return
|
||||
# Facing down
|
||||
elif pos[1] > 0:
|
||||
$Sword.rotation_degrees = 180
|
||||
$Javelin.rotation_degrees = 180
|
||||
return
|
||||
|
||||
|
||||
func add_currency(amount: int) -> void:
|
||||
$Inventory.add_currency(amount)
|
||||
return
|
||||
$Inventory.add_currency(amount)
|
||||
return
|
||||
|
||||
|
||||
func has_item(item: String) -> bool:
|
||||
return $Inventory.contains(item)
|
||||
return $Inventory.contains(item)
|
||||
|
||||
|
||||
func add_item(item: String) -> void:
|
||||
$Inventory.add(item)
|
||||
return
|
||||
$Inventory.add(item)
|
||||
return
|
||||
|
||||
|
||||
func remove_item(item: String) -> void:
|
||||
$Inventory.remove(item)
|
||||
return
|
||||
$Inventory.remove(item)
|
||||
return
|
||||
|
||||
|
||||
func _on_Inventory_update_currency(amount: int) -> void:
|
||||
hud.update_currency(amount)
|
||||
return
|
||||
hud.update_currency(amount)
|
||||
return
|
||||
|
||||
|
||||
func _on_hitbox_area_entered(area: Area2D) -> void:
|
||||
var hit: int = 0
|
||||
var hit: int = 0
|
||||
|
||||
if area.is_in_group('enemy_hitbox_1') or area.is_in_group('enemy_projectile_1'):
|
||||
hit = 1
|
||||
elif area.is_in_group('enemy_hitbox_2') or area.is_in_group('enemy_projectile_2'):
|
||||
hit = 2
|
||||
elif area.is_in_group('enemy_hitbox_3') or area.is_in_group('enemy_projectile_3'):
|
||||
hit = 3
|
||||
elif area.is_in_group('freeze'):
|
||||
emit_signal('frozen')
|
||||
modulate = Color(0,.5,1)
|
||||
else:
|
||||
return
|
||||
if area.is_in_group('enemy_hitbox_1') or area.is_in_group('enemy_projectile_1'):
|
||||
hit = 1
|
||||
elif area.is_in_group('enemy_hitbox_2') or area.is_in_group('enemy_projectile_2'):
|
||||
hit = 2
|
||||
elif area.is_in_group('enemy_hitbox_3') or area.is_in_group('enemy_projectile_3'):
|
||||
hit = 3
|
||||
elif area.is_in_group('freeze'):
|
||||
emit_signal('frozen')
|
||||
$Sprite.self_modulate = Color(0, 0.5, 1)
|
||||
else:
|
||||
return
|
||||
|
||||
if health_index != 0:
|
||||
health_index -= hit
|
||||
if health_index < 0:
|
||||
health_index = 0
|
||||
|
||||
hud.update_health(HEALTH_SLICES[health_index])
|
||||
else:
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
|
||||
return
|
||||
if health_index != 0:
|
||||
health_index -= hit
|
||||
if health_index < 0:
|
||||
health_index = 0
|
||||
|
||||
hud.update_health(HEALTH_SLICES[health_index])
|
||||
else:
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed('player_attack'):
|
||||
if hud.weapon == 'sword':
|
||||
$'Sword/Sword Animation'.play('swing')
|
||||
elif hud.weapon == 'javelin':
|
||||
$'Javelin/Javelin Animation'.play('swing')
|
||||
if event.is_action_pressed('player_attack'):
|
||||
if hud.weapon == 'sword':
|
||||
$'Sword/Sword Animation'.play('swing')
|
||||
elif hud.weapon == 'javelin':
|
||||
$'Javelin/Javelin Animation'.play('swing')
|
||||
|
||||
if event.is_action_pressed('screenshot'):
|
||||
var img: Image = get_viewport().get_texture().get_data()
|
||||
yield(get_tree(), 'idle_frame')
|
||||
yield(get_tree(), 'idle_frame')
|
||||
elif event.is_action_pressed('screenshot'):
|
||||
var img: Image = get_viewport().get_texture().get_data()
|
||||
yield(get_tree(), 'idle_frame')
|
||||
yield(get_tree(), 'idle_frame')
|
||||
|
||||
img.flip_y()
|
||||
img.flip_y()
|
||||
|
||||
var time: Dictionary = OS.get_datetime_from_unix_time(OS.get_unix_time())
|
||||
var time_msecs: int = OS.get_system_time_msecs()
|
||||
var time: Dictionary = OS.get_datetime_from_unix_time(OS.get_unix_time())
|
||||
var time_msecs: int = OS.get_system_time_msecs()
|
||||
|
||||
|
||||
if img.save_png('user://Screenshot_%d%d%d_%d.png' % [time.year, time.month, time.day, time_msecs]) != OK:
|
||||
print('ERROR: Failed saving screenshot.')
|
||||
return
|
||||
|
||||
|
||||
func _on_Hitbox_area_entered(area: Area2D) -> void:
|
||||
print(area.name)
|
||||
|
||||
if area.name == 'detection':
|
||||
return
|
||||
|
||||
if 'freeze' in area.get_parent().get_groups():
|
||||
emit_signal('frozen')
|
||||
return
|
||||
|
||||
if 'enemies' in area.get_parent().get_groups() or area.name != 'detection' or 'damage' in area.get_groups():
|
||||
if health_index != 0:
|
||||
health_index -= 1
|
||||
hud.update_health(HEALTH_SLICES[health_index])
|
||||
else:
|
||||
get_tree().change_scene('res://Levels/Hub World.tscn')
|
||||
return
|
||||
if img.save_png('user://Screenshot_%d%d%d_%d.png' % [time.year, time.month, time.day, time_msecs]) != OK:
|
||||
print('ERROR: Failed saving screenshot.')
|
||||
return
|
||||
|
||||
|
||||
func _on_SlowTime_unfreeze() -> void:
|
||||
modulate = Color(1,1,1)
|
||||
|
||||
$Sprite.self_modulate = Color(1, 1, 1)
|
||||
return
|
||||
|
@@ -10,9 +10,9 @@
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "look_left",
|
||||
"name": "look_up",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
@@ -20,15 +20,15 @@ animations = [ {
|
||||
"name": "look_right",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": false,
|
||||
"name": "look_up",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": false,
|
||||
"name": "look_down",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 2 ) ],
|
||||
"loop": false,
|
||||
"name": "look_left",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
@@ -182,9 +182,7 @@ graph_offset = Vector2( -3591.37, -302.6 )
|
||||
|
||||
[sub_resource type="AnimationNodeStateMachinePlayback" id=14]
|
||||
|
||||
[node name="Player" type="KinematicBody2D" groups=[
|
||||
"player",
|
||||
]]
|
||||
[node name="Player" type="KinematicBody2D" groups=["player"]]
|
||||
collision_layer = 2
|
||||
script = ExtResource( 1 )
|
||||
|
||||
@@ -200,12 +198,10 @@ visible = false
|
||||
rotation = 1.5708
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=[
|
||||
"player_hitbox",
|
||||
]]
|
||||
input_pickable = false
|
||||
[node name="Hitbox" type="Area2D" parent="." groups=["player_hitbox"]]
|
||||
collision_layer = 2
|
||||
collision_mask = 4
|
||||
input_pickable = false
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Hitbox"]
|
||||
visible = false
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/resources_basic.png-128bab182945611297ec1bda48bed0c4.stex"
|
||||
path="res://.import/Resources_Basic.png-ace2281282b93b7ae48cda9c52d377ad.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Assets/resources_basic.png"
|
||||
dest_files=[ "res://.import/resources_basic.png-128bab182945611297ec1bda48bed0c4.stex" ]
|
||||
source_file="res://Sprites/Assets/Resources_Basic.png"
|
||||
dest_files=[ "res://.import/Resources_Basic.png-ace2281282b93b7ae48cda9c52d377ad.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/fire_column_medium_10.png-9ae78a0f5ef8531c3b56d09574ecd317.stex"
|
||||
path="res://.import/Fire_Column_Medium_10.png-505d756e8645c45b6fb339fbb6f8add5.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Environment/fire_column_medium_10.png"
|
||||
dest_files=[ "res://.import/fire_column_medium_10.png-9ae78a0f5ef8531c3b56d09574ecd317.stex" ]
|
||||
source_file="res://Sprites/Levels/Environment/Fire_Column_Medium_10.png"
|
||||
dest_files=[ "res://.import/Fire_Column_Medium_10.png-505d756e8645c45b6fb339fbb6f8add5.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/fire_column_medium_11.png-f6c2ac8f20428aebca0febd0f65a5806.stex"
|
||||
path="res://.import/Fire_Column_Medium_11.png-cb278dde504fd6f8f415eda7091cfa9a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Environment/fire_column_medium_11.png"
|
||||
dest_files=[ "res://.import/fire_column_medium_11.png-f6c2ac8f20428aebca0febd0f65a5806.stex" ]
|
||||
source_file="res://Sprites/Levels/Environment/Fire_Column_Medium_11.png"
|
||||
dest_files=[ "res://.import/Fire_Column_Medium_11.png-cb278dde504fd6f8f415eda7091cfa9a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/fire_column_medium_12.png-25bc0d063fd42a44b6e9e423e3bf2656.stex"
|
||||
path="res://.import/Fire_Column_Medium_12.png-1e7c2da6903b243f73d7ed4b50d90f8a.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Environment/fire_column_medium_12.png"
|
||||
dest_files=[ "res://.import/fire_column_medium_12.png-25bc0d063fd42a44b6e9e423e3bf2656.stex" ]
|
||||
source_file="res://Sprites/Levels/Environment/Fire_Column_Medium_12.png"
|
||||
dest_files=[ "res://.import/Fire_Column_Medium_12.png-1e7c2da6903b243f73d7ed4b50d90f8a.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/fire_column_medium_13.png-6f8490642f9a7a3884a31ae3975deb08.stex"
|
||||
path="res://.import/Fire_Column_Medium_13.png-a147b7694df1cdf05d373697c6a4ede3.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Environment/fire_column_medium_13.png"
|
||||
dest_files=[ "res://.import/fire_column_medium_13.png-6f8490642f9a7a3884a31ae3975deb08.stex" ]
|
||||
source_file="res://Sprites/Levels/Environment/Fire_Column_Medium_13.png"
|
||||
dest_files=[ "res://.import/Fire_Column_Medium_13.png-a147b7694df1cdf05d373697c6a4ede3.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
@@ -2,15 +2,15 @@
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/fire_column_medium_14.png-81452b14764f0dd97e4008c5f9448c38.stex"
|
||||
path="res://.import/Fire_Column_Medium_14.png-205dacf8251c335e3becb65b0df84941.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Sprites/Levels/Environment/fire_column_medium_14.png"
|
||||
dest_files=[ "res://.import/fire_column_medium_14.png-81452b14764f0dd97e4008c5f9448c38.stex" ]
|
||||
source_file="res://Sprites/Levels/Environment/Fire_Column_Medium_14.png"
|
||||
dest_files=[ "res://.import/Fire_Column_Medium_14.png-205dacf8251c335e3becb65b0df84941.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
|
Reference in New Issue
Block a user