feat: better stomp feedback
This commit is contained in:
parent
f46808740c
commit
317ce3d2b7
@ -10,7 +10,7 @@ const PhysicsConst = preload("res://src/Utilities/Physic/PhysicsConst.gd")
|
|||||||
|
|
||||||
const FLOOR_NORMAL := Vector2.UP
|
const FLOOR_NORMAL := Vector2.UP
|
||||||
|
|
||||||
var stomp_feedback := 1400 * 60
|
var stomp_feedback := 1400 * 30
|
||||||
var stomp_time := 0.2
|
var stomp_time := 0.2
|
||||||
var init_stomp_time := 0.2
|
var init_stomp_time := 0.2
|
||||||
var inair_velocity := 21
|
var inair_velocity := 21
|
||||||
|
|||||||
@ -260,7 +260,8 @@ func calculate_jump_velocity(
|
|||||||
#TODO Single out stomping and make betta
|
#TODO Single out stomping and make betta
|
||||||
#TODO too much force intially and too high with frog jump
|
#TODO too much force intially and too high with frog jump
|
||||||
if stomping:
|
if stomping:
|
||||||
# additive_jump_force += stomp_feedback
|
if Input.is_action_pressed("jump"):
|
||||||
|
additive_jump_force += stomp_feedback
|
||||||
stomp_time -= delta
|
stomp_time -= delta
|
||||||
# print(stomp_time)
|
# print(stomp_time)
|
||||||
if stomp_time <= 0:
|
if stomp_time <= 0:
|
||||||
|
|||||||
@ -29,7 +29,6 @@ func _state_logic(delta):
|
|||||||
|
|
||||||
func _get_transition(_delta):
|
func _get_transition(_delta):
|
||||||
parent.get_node("StateLabel").text = self.state
|
parent.get_node("StateLabel").text = self.state
|
||||||
_set_blendspaces_direction()
|
|
||||||
_animation_logic()
|
_animation_logic()
|
||||||
var new_state
|
var new_state
|
||||||
if parent.target == null:
|
if parent.target == null:
|
||||||
@ -63,8 +62,9 @@ func _animation_logic():
|
|||||||
elif state != "sleeping":
|
elif state != "sleeping":
|
||||||
animation = "midJumping"
|
animation = "midJumping"
|
||||||
if anim_state_playback.get_current_node() != animation:
|
if anim_state_playback.get_current_node() != animation:
|
||||||
print(anim_state_playback.get_current_node())
|
_set_blendspaces_direction()
|
||||||
print(animation)
|
# print(anim_state_playback.get_current_node())
|
||||||
|
# print(animation)
|
||||||
anim_state_playback.travel(animation)
|
anim_state_playback.travel(animation)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,10 +40,10 @@ unique_name_in_owner = true
|
|||||||
drag_margin_bottom = 0.3
|
drag_margin_bottom = 0.3
|
||||||
|
|
||||||
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"]
|
||||||
frame = 8
|
frame = 0
|
||||||
|
|
||||||
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
[node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"]
|
||||||
frame = 7
|
frame = 13
|
||||||
|
|
||||||
[node name="Blobby" parent="." instance=ExtResource( 7 )]
|
[node name="Blobby" parent="." instance=ExtResource( 7 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
@ -77,6 +77,7 @@ margin_right = 296.0
|
|||||||
margin_bottom = 30.0
|
margin_bottom = 30.0
|
||||||
focus_neighbour_top = NodePath("../QuitButton")
|
focus_neighbour_top = NodePath("../QuitButton")
|
||||||
focus_neighbour_bottom = NodePath("../Controlls")
|
focus_neighbour_bottom = NodePath("../Controlls")
|
||||||
|
next_scene_path = "res://src/Levels/1 Tutorial Level.tscn"
|
||||||
|
|
||||||
[node name="Controlls" parent="MenuContainer/Buttons" instance=ExtResource( 3 )]
|
[node name="Controlls" parent="MenuContainer/Buttons" instance=ExtResource( 3 )]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user