forked from team-sg/hero-mark-2
moving platforms, eh?
This commit is contained in:
parent
1c28e4d005
commit
9f42a196e9
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,11 @@ func move_side_to_side(delta):
|
|||
func move_up_and_down(delta):
|
||||
#Move
|
||||
position.y += direction * (speed * delta)
|
||||
#fix graphics
|
||||
if direction < 0.0 and speed >= 30.0:
|
||||
sprite.position.y = 1.0
|
||||
else:
|
||||
sprite.position.y = 2.0
|
||||
#Switch dir
|
||||
if position.y >= startpos.y + (right_down_boundary):
|
||||
direction = -1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue