forked from team-sg/hero-mark-2
added skelarcher
This commit is contained in:
parent
9827e2d9b4
commit
14c1f4e7e7
3 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=9 format=2]
|
||||
|
||||
[ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://maps/map.gd" type="Script" id=2]
|
||||
|
@ -6,6 +6,8 @@
|
|||
[ext_resource path="res://tilesets/t_canopy.tres" type="TileSet" id=4]
|
||||
[ext_resource path="res://objects/enemy/skelarcher.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=6]
|
||||
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=7]
|
||||
[ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=8]
|
||||
|
||||
[node name="Map" type="Node2D" groups=["map"]]
|
||||
script = ExtResource( 2 )
|
||||
|
@ -28,3 +30,8 @@ position = Vector2( 24, 166 )
|
|||
|
||||
[node name="Skelarcher" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 70, 166 )
|
||||
|
||||
[node name="CanvasLayer" parent="." instance=ExtResource( 7 )]
|
||||
|
||||
[node name="Arrow" parent="." instance=ExtResource( 8 )]
|
||||
position = Vector2( 43, 167 )
|
||||
|
|
|
@ -49,5 +49,7 @@ func _on_Hitbox_area_entered(area):
|
|||
else:
|
||||
# kill targeted node
|
||||
target.die()
|
||||
Game.arrows = max(0, Game.arrows - 1) # clamp arrows above 0
|
||||
#decrease arrows if enemy killed
|
||||
if target_group == "enemy_hitbox":
|
||||
Game.arrows = max(0, Game.arrows - 1) # clamp arrows above 0
|
||||
queue_free()
|
||||
|
|
|
@ -201,7 +201,7 @@ func check_jump():
|
|||
#Detach ladder
|
||||
if current_state == State.CLIMB:
|
||||
Game.ac_climb.set_stream(null) # stop climb sound
|
||||
position.x -= sprite.scale.x * 5
|
||||
position.x -= sprite.scale.x * 4
|
||||
else:
|
||||
dust_particles.restart()
|
||||
anims.set_speed_scale(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue