Tweak player movement
This commit is contained in:
parent
92892072e2
commit
dee457a561
@ -9,8 +9,6 @@
|
||||
[ext_resource path="res://Assets/Art/Tiles/metal_tile.png" type="Texture" id=7]
|
||||
[ext_resource path="res://Assets/Art/Tiles/techno_wall_tile.png" type="Texture" id=8]
|
||||
|
||||
|
||||
|
||||
[sub_resource type="OccluderPolygon2D" id=1]
|
||||
polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -7,7 +7,7 @@ var baseGravity : float = 9.8
|
||||
|
||||
# Player movment variables
|
||||
var maxMoveVelocity : float = 150
|
||||
var moveAcceleration : float = 25
|
||||
var moveAcceleration : float = 125
|
||||
var moveFriction : float = 65
|
||||
var jumpVelocity : float = -150
|
||||
var jumped = false
|
||||
@ -76,9 +76,9 @@ func user_input():
|
||||
return
|
||||
|
||||
if(Input.is_action_pressed("ui_left")):
|
||||
moveMotion -= moveAcceleration
|
||||
moveMotion = -moveAcceleration
|
||||
if(Input.is_action_pressed("ui_right")):
|
||||
moveMotion += moveAcceleration
|
||||
moveMotion = moveAcceleration
|
||||
|
||||
if(is_on_floor() and Input.is_action_just_pressed("ui_up")):
|
||||
motion.y = jumpVelocity
|
||||
|
Loading…
Reference in New Issue
Block a user