Clean up
This commit is contained in:
parent
d9d5860d63
commit
6b1efd27e3
|
|
@ -27,13 +27,15 @@ var velocity = Vector2(0,0)
|
||||||
var momentum = Vector2(0,0)
|
var momentum = Vector2(0,0)
|
||||||
var acceleration = Vector2(0,0)
|
var acceleration = Vector2(0,0)
|
||||||
|
|
||||||
var sim_velocity = Vector2(0,0)
|
#Removing Probably not used
|
||||||
|
#var sim_velocity = Vector2(0,0)
|
||||||
|
|
||||||
|
|
||||||
#Can't use floats here, switched to constants.
|
#Can't use floats here, switched to constants.
|
||||||
#enum directions {UP = -1, DOWN = 1, LEFT, RIGHT}
|
#enum directions {UP = -1, DOWN = 1, LEFT, RIGHT}
|
||||||
|
|
||||||
var attack_function: FuncRef
|
#Removing Probably not used
|
||||||
|
#var attack_function: FuncRef
|
||||||
|
|
||||||
const UP = -1.0
|
const UP = -1.0
|
||||||
const DOWN = 1.0
|
const DOWN = 1.0
|
||||||
|
|
@ -110,7 +112,7 @@ func get_climb_shape_location() -> Vector2:
|
||||||
return Vector2(-1,-1)
|
return Vector2(-1,-1)
|
||||||
|
|
||||||
func _on_state_change(old_state_name:String, new_state :State):
|
func _on_state_change(old_state_name:String, new_state :State):
|
||||||
print ("got the state change signal (MC) ", new_state.name)
|
#print ("got the state change signal (MC) ", new_state.name)
|
||||||
# set current state to new_state
|
# set current state to new_state
|
||||||
#TODO: Confirm that this is a reference to the state in the
|
#TODO: Confirm that this is a reference to the state in the
|
||||||
###### State machine
|
###### State machine
|
||||||
|
|
@ -297,7 +299,7 @@ func move_actor_as_desired(delta: float, x_move_direction_override: float = 0):
|
||||||
"\nVel:" + str(round(velocity.x)) + "Min:" + str(round(MIN_SPEED)) + ",Max:" + str(round(MAX_SPEED))
|
"\nVel:" + str(round(velocity.x)) + "Min:" + str(round(MIN_SPEED)) + ",Max:" + str(round(MAX_SPEED))
|
||||||
) # str(round(jerk))
|
) # str(round(jerk))
|
||||||
|
|
||||||
sim_velocity.x = move_direction * sim_move_speed
|
#sim_velocity.x = move_direction * sim_move_speed
|
||||||
#print(adjusted_move_speed, ",", new_move_speed, ",", jerk)
|
#print(adjusted_move_speed, ",", new_move_speed, ",", jerk)
|
||||||
|
|
||||||
#print(new_move_speed, " ", adjusted_move_speed)
|
#print(new_move_speed, " ", adjusted_move_speed)
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,6 @@ extends State
|
||||||
##
|
##
|
||||||
## @WIP
|
## @WIP
|
||||||
|
|
||||||
# export (NodePath) var jump_node
|
|
||||||
|
|
||||||
# onready var jump_state: State = get_node(jump_node)
|
|
||||||
|
|
||||||
## Deprecated
|
|
||||||
# export var animation_name: String
|
|
||||||
|
|
||||||
# Movement Speed in Pixels Per Second
|
# Movement Speed in Pixels Per Second
|
||||||
export var move_speed: float = 60
|
export var move_speed: float = 60
|
||||||
export var move_acceleration: float = 0
|
export var move_acceleration: float = 0
|
||||||
|
|
@ -23,24 +16,20 @@ export var move_speed_modifier: float = 0
|
||||||
export var move_modifier_move_acceleration: float = 0
|
export var move_modifier_move_acceleration: float = 0
|
||||||
export var jerk_factor: float = 0
|
export var jerk_factor: float = 0
|
||||||
|
|
||||||
|
var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
|
||||||
|
|
||||||
#var adjusted_move_speed: float
|
#var adjusted_move_speed: float
|
||||||
var jerk: float
|
var jerk: float
|
||||||
|
|
||||||
var physics_modifier :StateModifier
|
|
||||||
|
|
||||||
var animation_finished: bool = false
|
var animation_finished: bool = false
|
||||||
|
|
||||||
# Not sure if this should be here. probably not
|
# Not sure if this should be here. probably not
|
||||||
export(Array, String) var animation_sequence
|
export(Array, String) var animation_sequence
|
||||||
|
|
||||||
# can't remember what this did
|
# Modifiers may not be needed anymore.
|
||||||
export(Dictionary) var emitter_frame_subscriptions
|
|
||||||
var frame_signal_emitted: bool = false
|
|
||||||
|
|
||||||
|
|
||||||
var gravity: int = ProjectSettings.get_setting("physics/2d/default_gravity")
|
|
||||||
|
|
||||||
var modifier: StateModifier
|
var modifier: StateModifier
|
||||||
|
var physics_modifier :StateModifier
|
||||||
|
|
||||||
|
|
||||||
func enter() -> void:
|
func enter() -> void:
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "run" ]
|
animation_sequence = [ "run" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id=1]
|
[sub_resource type="RectangleShape2D" id=1]
|
||||||
extents = Vector2( 7, 14 )
|
extents = Vector2( 7, 14 )
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,3 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "jump" ]
|
animation_sequence = [ "jump" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,3 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "idle" ]
|
animation_sequence = [ "idle" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,3 @@ move_speed_modifier = 0.0
|
||||||
move_modifier_move_acceleration = 0.0
|
move_modifier_move_acceleration = 0.0
|
||||||
jerk_factor = 0.0
|
jerk_factor = 0.0
|
||||||
animation_sequence = [ "jump" ]
|
animation_sequence = [ "jump" ]
|
||||||
emitter_frame_subscriptions = {
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user