Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Flossy Gnu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Purism
Flossy Gnu
Commits
b0377f52
Commit
b0377f52
authored
Mar 15, 2019
by
Nathan Lovato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent character from flying above pillars, make pillars fill screen
parent
2d0e1210
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
game/Gnu/Gnu.gd
game/Gnu/Gnu.gd
+3
-0
game/Pillar/Pillar.tscn
game/Pillar/Pillar.tscn
+5
-5
game/assets/pillar_top.png
game/assets/pillar_top.png
+0
-0
No files found.
game/Gnu/Gnu.gd
View file @
b0377f52
...
...
@@ -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
()
...
...
game/Pillar/Pillar.tscn
View file @
b0377f52
...
...
@@ -15,16 +15,16 @@ __meta__ = {
"_edit_vertical_guides_": [ ]
}
[node name="
pillar_t
op" type="Sprite" parent="."]
position = Vector2( -10, -
59
0 )
[node name="
PillarT
op" type="Sprite" parent="."]
position = Vector2( -10, -
75
0 )
z_index = 5
texture = ExtResource( 2 )
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
position = Vector2( 0, 50 )
polygon = PoolVector2Array( -120, -240, 100, -240, 100, -1
060, -120, -106
0 )
polygon = PoolVector2Array( -120, -240, 100, -240, 100, -1
510, -120, -151
0 )
[node name="
pillar_b
ottom" type="Sprite" parent="."]
[node name="
PillarB
ottom" 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
View replaced file @
2d0e1210
View file @
b0377f52
9.41 KB
|
W:
|
H:
20.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment