blob: f0cbd969c07afeb0593b1465f58057f3a697f218 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var timer = 0
#Vector3
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func init(position, norm):
global_transform.origin = position+norm*.1
$outer_flash2.translate(norm*.3)
$debris1.process_material.direction = norm
$debris2.process_material.direction = norm
$shock.restart()
$flame1.restart()
$outer_flash.restart()
$outer_flash2.restart()
#$smoke.restart()
$debris1.restart()
$debris2.restart()
#Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if timer > 1:
queue_free()
timer += delta
|