Post Game jam commit
This commit is contained in:
commit
6db2131520
164 changed files with 172524 additions and 0 deletions
24
scripts/AnimSprite.gd
Normal file
24
scripts/AnimSprite.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
extends AnimatedSprite2D
|
||||
|
||||
var time = 0.0
|
||||
@export var float_str = 10.0
|
||||
@export var float_time = 2.0
|
||||
@export var float_offset = -12.0
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
time += delta
|
||||
# Calculate the new Y position using a sine wave
|
||||
position.y = sin(time * float_time) * float_str + float_offset
|
||||
queue_redraw()
|
||||
|
||||
func switch_mask(new : Types.mask_types):
|
||||
$MeleeMask.visible = false
|
||||
$RangedMask.visible = false
|
||||
$SpitMask.visible = false
|
||||
if (new == Types.mask_types.Melee):
|
||||
$MeleeMask.visible = true
|
||||
elif (new == Types.mask_types.Ranged):
|
||||
$RangedMask.visible = true
|
||||
elif (new == Types.mask_types.Spit):
|
||||
$SpitMask.visible = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue