meow
This commit is contained in:
parent
1e233d40cf
commit
4f4e703886
11 changed files with 145 additions and 6 deletions
|
|
@ -4,6 +4,9 @@ const offset_multiplier : float = 2
|
|||
var float_offset : float
|
||||
var starting_y : float
|
||||
var elapsed : float
|
||||
var realness : float = 0
|
||||
var becoming_real : bool = false
|
||||
@export var collider : CollisionShape2D
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
|
@ -15,3 +18,17 @@ func _process(delta: float) -> void:
|
|||
elapsed += delta
|
||||
float_offset = sin(elapsed * offset_multiplier)
|
||||
position.y = starting_y + float_offset
|
||||
collider.disabled = realness < 0.1
|
||||
modulate = Color(1,1,1,realness)
|
||||
if(becoming_real):
|
||||
realness = clampf(realness + delta, 0 , 1)
|
||||
else:
|
||||
realness = clampf(realness - delta, 0 , 1)
|
||||
#if(Input.is_action_just_pressed("ui_left")):
|
||||
#becoming_real = !becoming_real
|
||||
|
||||
func fade_out():
|
||||
becoming_real = false
|
||||
|
||||
func fade_in():
|
||||
becoming_real = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue