forked from team-sg/hero-mark-2
added bow
This commit is contained in:
parent
5d01f40535
commit
2d3fc72ebe
50 changed files with 610 additions and 151 deletions
|
@ -1,6 +1,7 @@
|
|||
extends Node2D
|
||||
|
||||
export var can_be_killed_by_sword = true
|
||||
export var can_be_killed_by_arrow = true
|
||||
export var can_be_squashed = true
|
||||
export var score_for_killing = 0
|
||||
|
||||
|
@ -13,6 +14,16 @@ func _on_Area2D_area_entered(area):
|
|||
if can_be_killed_by_sword:
|
||||
die()
|
||||
else:
|
||||
#Block text
|
||||
Game.instance_node(Game.block_text,global_position.x,global_position.y,get_parent())
|
||||
#Die from arrow
|
||||
if area.is_in_group("arrow"):
|
||||
if can_be_killed_by_arrow:
|
||||
Game.arrows -= 1
|
||||
area.get_parent().queue_free()
|
||||
die()
|
||||
else:
|
||||
#Block text
|
||||
Game.instance_node(Game.block_text,global_position.x,global_position.y,get_parent())
|
||||
#Die from rock/ get squashed
|
||||
if area.is_in_group("squash"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue