Commit b0377f52 authored by Nathan Lovato's avatar Nathan Lovato

Prevent character from flying above pillars, make pillars fill screen

parent 2d0e1210
......@@ -57,6 +57,9 @@ func _physics_process(delta) -> void:
sprite.rotate(_angular_velocity * delta)
var motion : Vector2 = _velocity * delta
# Prevent the character from moving too high up
if position.y < -100.0 and motion.y < 0.0:
motion.y = 0.0
var collision := move_and_collide(motion)
if collision:
die()
......
......@@ -15,16 +15,16 @@ __meta__ = {
"_edit_vertical_guides_": [ ]
}
[node name="pillar_top" type="Sprite" parent="."]
position = Vector2( -10, -590 )
[node name="PillarTop" type="Sprite" parent="."]
position = Vector2( -10, -750 )
z_index = 5
texture = ExtResource( 2 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2( 0, 50 )
polygon = PoolVector2Array( -120, -240, 100, -240, 100, -1060, -120, -1060 )
polygon = PoolVector2Array( -120, -240, 100, -240, 100, -1510, -120, -1510 )
[node name="pillar_bottom" type="Sprite" parent="."]
[node name="PillarBottom" type="Sprite" parent="."]
position = Vector2( 0, 650 )
texture = ExtResource( 3 )
......@@ -33,7 +33,7 @@ position = Vector2( 0, 1226 )
polygon = PoolVector2Array( -120, -240, 100, -240, 100, -1060, -120, -1060 )
[node name="Checkpoint" type="Area2D" parent="."]
position = Vector2( 119.5, -20 )
position = Vector2( 0, -20 )
collision_layer = 4
[node name="CollisionShape2D" type="CollisionShape2D" parent="Checkpoint"]
......
game/assets/pillar_top.png

9.41 KB | W: | H:

game/assets/pillar_top.png

20.8 KB | W: | H:

game/assets/pillar_top.png
game/assets/pillar_top.png
game/assets/pillar_top.png
game/assets/pillar_top.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment