cooking in progress, will work on "story" after lunch
This commit is contained in:
parent
d9f91fa650
commit
2cfb73b94d
13 changed files with 165 additions and 22 deletions
17
games/platformer/lab_platform.gd
Normal file
17
games/platformer/lab_platform.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends AnimatableBody2D
|
||||
|
||||
const offset_multiplier : float = 2
|
||||
var float_offset : float
|
||||
var starting_y : float
|
||||
var elapsed : float
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
starting_y = position.y
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
elapsed += delta
|
||||
float_offset = sin(elapsed * offset_multiplier)
|
||||
position.y = starting_y + float_offset
|
||||
Loading…
Add table
Add a link
Reference in a new issue