rename flip to flip_direction
This commit is contained in:
@@ -972,7 +972,7 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory2" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(240, 328)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
_steps = 48
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
|
||||
@@ -997,7 +997,7 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory6" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(456, -162)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
charge_strength = 0.67
|
||||
_steps = 64
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
@@ -1005,14 +1005,14 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory7" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(323, -162)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
_steps = 64
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
|
||||
[node name="Trajectory8" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(162, -257)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
_steps = 119
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
|
||||
@@ -1039,7 +1039,7 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory12" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(454, -464)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
charge_strength = 0.735
|
||||
_steps = 144
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
@@ -1047,7 +1047,7 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory13" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(322, -513)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
charge_strength = 0.825
|
||||
_steps = 144
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
@@ -1055,7 +1055,7 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory14" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(179, -602)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
charge_strength = 0.73
|
||||
_steps = 79
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
@@ -1078,6 +1078,6 @@ metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
[node name="Trajectory17" type="Marker2D" parent="Trajectories"]
|
||||
position = Vector2(114, -2672)
|
||||
script = ExtResource("4_74lek")
|
||||
flip = true
|
||||
flip_direction = true
|
||||
_steps = 190
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
|
||||
@@ -231,7 +231,7 @@ func _gather_input(delta: float) -> void:
|
||||
_charge_strength += delta / (_jump_full_charge_frames / 60.0)
|
||||
_trajectory.global_position = global_position
|
||||
_trajectory.charge_strength = _charge_strength
|
||||
_trajectory.flip = _direction < 0
|
||||
_trajectory.flip_direction = _direction < 0
|
||||
_trajectory.visible = _direction != 0.0
|
||||
|
||||
# jump charge release
|
||||
|
||||
@@ -82,9 +82,9 @@ const JUMP_REFERENCE: PackedFloat32Array = [
|
||||
302.0,
|
||||
]
|
||||
|
||||
@export var flip: bool = false:
|
||||
@export var flip_direction: bool = false:
|
||||
set(value):
|
||||
flip = value
|
||||
flip_direction = value
|
||||
queue_redraw()
|
||||
@export_range(0.0, 1.0) var charge_strength: float = 1:
|
||||
set(value):
|
||||
@@ -216,7 +216,7 @@ func _draw() -> void:
|
||||
break
|
||||
|
||||
jump_released = i == 0 and _jump
|
||||
direction = (-1.0 if flip else 1.0) if (_walk or jump_released) else 0.0
|
||||
direction = (-1.0 if flip_direction else 1.0) if (_walk or jump_released) else 0.0
|
||||
|
||||
velocity = (
|
||||
Player
|
||||
|
||||
Reference in New Issue
Block a user