Tweak player movement
This commit is contained in:
@ -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/metal_tile.png" type="Texture" id=7]
|
||||||
[ext_resource path="res://Assets/Art/Tiles/techno_wall_tile.png" type="Texture" id=8]
|
[ext_resource path="res://Assets/Art/Tiles/techno_wall_tile.png" type="Texture" id=8]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[sub_resource type="OccluderPolygon2D" id=1]
|
[sub_resource type="OccluderPolygon2D" id=1]
|
||||||
polygon = PoolVector2Array( 16, 16, 0, 16, 0, 0, 16, 0 )
|
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
|
# Player movment variables
|
||||||
var maxMoveVelocity : float = 150
|
var maxMoveVelocity : float = 150
|
||||||
var moveAcceleration : float = 25
|
var moveAcceleration : float = 125
|
||||||
var moveFriction : float = 65
|
var moveFriction : float = 65
|
||||||
var jumpVelocity : float = -150
|
var jumpVelocity : float = -150
|
||||||
var jumped = false
|
var jumped = false
|
||||||
@ -76,9 +76,9 @@ func user_input():
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(Input.is_action_pressed("ui_left")):
|
if(Input.is_action_pressed("ui_left")):
|
||||||
moveMotion -= moveAcceleration
|
moveMotion = -moveAcceleration
|
||||||
if(Input.is_action_pressed("ui_right")):
|
if(Input.is_action_pressed("ui_right")):
|
||||||
moveMotion += moveAcceleration
|
moveMotion = moveAcceleration
|
||||||
|
|
||||||
if(is_on_floor() and Input.is_action_just_pressed("ui_up")):
|
if(is_on_floor() and Input.is_action_just_pressed("ui_up")):
|
||||||
motion.y = jumpVelocity
|
motion.y = jumpVelocity
|
||||||
|
Reference in New Issue
Block a user