forked from team-sg/hero-mark-2
rolling fiend freezes when time is slowed down
This commit is contained in:
parent
512469f732
commit
9e813ca076
5 changed files with 14 additions and 31 deletions
|
@ -27,7 +27,8 @@ func _physics_process(delta):
|
|||
floor_direction = posmod(floor_direction - offset, DIRS.size())
|
||||
elif is_on_surface(DIRS[move_dir]):
|
||||
floor_direction = move_dir
|
||||
position += DIRS[posmod(floor_direction + offset, DIRS.size())] * move_speed * delta
|
||||
if Engine.time_scale > 0.5: #fixes stuttering when slowing down time
|
||||
position += DIRS[posmod(floor_direction + offset, DIRS.size())] * move_speed * delta
|
||||
|
||||
func is_on_surface(dir):
|
||||
var space_state = get_world_2d().direct_space_state
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/enemy/roller_fiend.png" type="Texture" id=2]
|
||||
[ext_resource path="res://graphics/enemy/rolling_fiend.png" type="Texture" id=2]
|
||||
[ext_resource path="res://objects/enemy/rolling_fiend.gd" type="Script" id=3]
|
||||
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=4]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue