forked from team-sg/hero-mark-2
better slope handling
This commit is contained in:
parent
e02288fb3a
commit
64ff2d38df
2 changed files with 11 additions and 10 deletions
|
@ -101,7 +101,8 @@ func _physics_process(delta):
|
|||
position.y += 1
|
||||
velocity.y = 0
|
||||
#Apply velocity
|
||||
move_and_slide(velocity,Vector2.UP)
|
||||
var snap = Vector2(0.0, 0.0 if velocity.y < 0.0 else 14.0)
|
||||
move_and_slide_with_snap(velocity, snap, Vector2.UP, true)
|
||||
#Moon Jump
|
||||
if Debug.moon_jump == true: can_doublejump = true
|
||||
#2011
|
||||
|
|
|
@ -8,9 +8,6 @@ points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 )
|
|||
[sub_resource type="ConvexPolygonShape2D" id=2]
|
||||
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=3]
|
||||
points = PoolVector2Array( 8, 8, 2, 8, 5, 6, 8, 4 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=4]
|
||||
points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 0 )
|
||||
|
||||
|
@ -29,6 +26,9 @@ points = PoolVector2Array( 4, 8, 0, 8, 0, 3, 4, 3 )
|
|||
[sub_resource type="ConvexPolygonShape2D" id=25]
|
||||
points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=26]
|
||||
points = PoolVector2Array( 0, 8, 8, 4, 8, 8, 8, 8 )
|
||||
|
||||
[sub_resource type="ConvexPolygonShape2D" id=5]
|
||||
points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 )
|
||||
|
||||
|
@ -111,12 +111,6 @@ points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 )
|
|||
"shape": SubResource( 2 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
}, {
|
||||
"autotile_coord": Vector2( 2, 1 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 3 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
}, {
|
||||
"autotile_coord": Vector2( 3, 1 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
|
@ -152,6 +146,12 @@ points = PoolVector2Array( 0, 0, 8, 0, 8, 8, 0, 8 )
|
|||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 25 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
}, {
|
||||
"autotile_coord": Vector2( 2, 1 ),
|
||||
"one_way": false,
|
||||
"one_way_margin": 1.0,
|
||||
"shape": SubResource( 26 ),
|
||||
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
|
||||
} ]
|
||||
0/z_index = 0
|
||||
1/name = "concrete"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue