![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | sahish |
I added a bomb that constantly goes up in a physics_process function. The player has the ability to slow down time, and when they do it changes the engines timescale to 0.05. When the player slows down time everything in the game except the bomb slows down.
Here is the code:
extends Area2D
func _physics_process(delta):
if Engine.time_scale <= 0.05:
global_position = global_position + Vector2(0,-0.25)
else:
if Engine.time_scale >= 0.05:
global_position = global_position + Vector2(0,-1)