working on platfoermer, rather confused
This commit is contained in:
parent
34eb42616d
commit
88cb8f5899
11 changed files with 244 additions and 7 deletions
16
games/platformer/flasher.gd
Normal file
16
games/platformer/flasher.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
extends Sprite2D
|
||||
|
||||
var flash_delay : float = 0.3
|
||||
var timer :float = 1
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
timer = flash_delay
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
timer -= delta
|
||||
if(timer <= 0):
|
||||
visible = !visible
|
||||
timer = flash_delay
|
||||
Loading…
Add table
Add a link
Reference in a new issue