Blobby/src/Actor/Player.gd

26 lines
684 B
GDScript

extends KinematicBody2D
class_name Player
const FLOOR_NORMAL := Vector2.UP
export var stomp_feedback := 1000.0
export var inair_velocity := 21
export var wallslide_threshold := 1000
export var max_velocity := {
"walk": 130, "run": 180, "fall": 987, "walljump": 150
}
export var velocity_jump_boost_ratio := 0.4383
# This is added to the acceleration force initially
export var init_acceleration_force := {"walk": 4181, "run": 6765}
# newtonmeters is the unit
export var acceleration_force := {
"walk": Vector2(2584, 2000),
"run": Vector2(2584, 2000),
"walljump": Vector2(2548, 2000)
}
export var gravity := 1667.0
# Kilograms
export var mass := 6
var _velocity := Vector2.ZERO