moving platforms
This commit is contained in:
1 parent
4f74e1458d
commit
0ee1d443ee
52 files changed
+571
-30
No files matched your search
@@ -46,7 +46,12 @@ func _physics_process(delta):
|
||||
|
||||
#put the bullet at the Marker
|
||||
owner.add_child(myBullet)
|
||||
myBullet.transform = marker_right.global_transform
|
||||
#facing left or right?
|
||||
if not faceLeft:
|
||||
myBullet.transform = marker_right.global_transform
|
||||
else:
|
||||
myBullet.transform = marker_left.global_transform
|
||||
myBullet.setSpeed(-750)
|
||||
|
||||
# Get the input direction and handle the movement/deceleration.
|
||||
# As good practice, you should replace UI actions with custom gameplay actions.
|
||||
@@ -70,7 +75,6 @@ func _physics_process(delta):
|
||||
|
||||
move_and_slide()
|
||||
if right_ray.is_colliding():
|
||||
print("right ray is colliding")
|
||||
var collider = right_ray.get_collider()
|
||||
#what did we hit?
|
||||
if collider is Node:
|
||||
@@ -82,7 +86,6 @@ func _physics_process(delta):
|
||||
pushRightEnabled = false
|
||||
|
||||
if left_ray.is_colliding():
|
||||
print("left ray is colliding")
|
||||
var collider = left_ray.get_collider()
|
||||
if collider is Node:
|
||||
if collider.is_in_group("boxes"):
|
||||
|
||||
Reference in new issue
Block a user