init
This commit is contained in:
commit
18efc36800
161 changed files with 5008 additions and 0 deletions
14
scripts/effects/smoke.gd
Normal file
14
scripts/effects/smoke.gd
Normal file
|
@ -0,0 +1,14 @@
|
|||
extends Node2D
|
||||
|
||||
@export var positions: Array[Node2D]
|
||||
|
||||
|
||||
func spawn():
|
||||
var pos: Node2D = positions.pick_random()
|
||||
if not pos:
|
||||
return
|
||||
positions.erase(pos)
|
||||
var scene = load("res://scenes/smoke_particles.tscn")
|
||||
var scene_instance = scene.instantiate()
|
||||
add_child(scene_instance)
|
||||
scene_instance.global_position = pos.global_position
|
Loading…
Add table
Add a link
Reference in a new issue