make trajectory hit lines single color
This commit is contained in:
@@ -52,5 +52,5 @@ script = ExtResource("6_tuyoq")
|
||||
_steps = 180
|
||||
_line_color = Color(1, 1, 0, 1)
|
||||
_charge_color = Color(0, 1, 1, 1)
|
||||
_floor_hit_color = Color(0, 1, 1, 1)
|
||||
_hit_color = Color(0, 1, 1, 1)
|
||||
metadata/_custom_type_script = "uid://ceyu5der8j8gq"
|
||||
|
||||
@@ -154,9 +154,7 @@ const JUMP_REFERENCE: PackedFloat32Array = [
|
||||
@export var _line_color: Color = Color.MAGENTA
|
||||
@export var _hitbox_color: Color = Color.WHITE
|
||||
@export var _charge_color: Color = Color.WHITE
|
||||
@export var _floor_hit_color: Color = Color.YELLOW
|
||||
@export var _ceiling_hit_color: Color = Color.ORANGE_RED
|
||||
@export var _wall_hit_color: Color = Color.ORANGE
|
||||
@export var _hit_color: Color = Color.YELLOW
|
||||
|
||||
@onready var _player_shape := RectangleShape2D.new()
|
||||
|
||||
@@ -216,7 +214,9 @@ func _draw() -> void:
|
||||
break
|
||||
|
||||
jump_released = i == 0 and _jump
|
||||
direction = (-1.0 if flip_direction 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
|
||||
@@ -297,12 +297,12 @@ func _draw() -> void:
|
||||
)
|
||||
|
||||
if hit_floor or hit_slope:
|
||||
_draw_collision_hit(pos, SIDE_BOTTOM, _floor_hit_color)
|
||||
_draw_collision_hit(pos, SIDE_BOTTOM, _hit_color)
|
||||
if hit_ceiling:
|
||||
_draw_collision_hit(pos, SIDE_TOP, _ceiling_hit_color)
|
||||
_draw_collision_hit(pos, SIDE_TOP, _hit_color)
|
||||
if hit_wall:
|
||||
_draw_collision_hit(
|
||||
pos, SIDE_LEFT if velocity.x > 0 else SIDE_RIGHT, _wall_hit_color
|
||||
pos, SIDE_LEFT if velocity.x > 0 else SIDE_RIGHT, _hit_color
|
||||
)
|
||||
|
||||
if i % 10 == 0 && i > 0:
|
||||
|
||||
Reference in New Issue
Block a user