4.6, new attack, enemy spawning, shaders, bunch of stuff
This commit is contained in:
parent
e08e3ebb13
commit
19517a3176
84 changed files with 13348 additions and 91399 deletions
25
scripts/mask_ability.gd
Normal file
25
scripts/mask_ability.gd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
class_name MaskAbility extends Node2D
|
||||
|
||||
var from_player : bool = false
|
||||
var target_position : Vector2
|
||||
var start_position : Vector2
|
||||
|
||||
func mask_ready():
|
||||
set_from_player(from_player)
|
||||
|
||||
func _get_all_children(node) -> Array:
|
||||
var nodes : Array = []
|
||||
for N in node.get_children():
|
||||
if N.get_child_count() > 0:
|
||||
nodes.append(N)
|
||||
nodes.append_array(_get_all_children(N))
|
||||
else:
|
||||
nodes.append(N)
|
||||
return nodes
|
||||
|
||||
func set_from_player(val):
|
||||
from_player = val
|
||||
var children = _get_all_children(self)
|
||||
for c in children:
|
||||
if c is Hitbox:
|
||||
c.from_player = from_player
|
||||
Loading…
Add table
Add a link
Reference in a new issue