tomato-dungeon

a game made in 1 day
git clone git://git.vgx.fr/tomato-dungeon
Log | Files | Refs | README

throw.gd (606B)


      1 extends Monstre
      2 
      3 var spell_scene
      4 
      5 func _ready():
      6 	target_dist = 150
      7 	orbe_type = 2
      8 	
      9 	spell_scene = load("res://Spell.tscn")
     10 	path_provider = get_node("../AlternativeNavigation")
     11 	z_index = 3
     12 
     13 func attack():
     14 	var newspell = spell_scene.instance()
     15 	newspell.position = $Sprite/SpellSpawn.global_position
     16 	var mov = mage.position - newspell.position
     17 	newspell.movement = mov.normalized() * newspell.speed
     18 	
     19 	newspell.thrower = get_node(".")
     20 	
     21 	get_node("..").add_child(newspell)
     22 	
     23 	attacking = false
     24 
     25 
     26 # Called every frame. 'delta' is the elapsed time since the previous frame.
     27 #func _process(delta):
     28 #	pass