add cursor texture and color

This commit is contained in:
2025-07-27 03:52:19 +10:00
parent 8df4130a2a
commit 7a2e2da4d0
8 changed files with 179 additions and 129 deletions

View File

@@ -82,10 +82,12 @@ func _handle_cursor(player_index: int, delta: float) -> void:
)
cursor.bat.rotation = cursor_pos_screen.angle_to_point(bat_rotation_point_screen)
cursor.arrow.rotation = cursor_pos_screen.angle_to_point(
arrow_rotation_point_screen
cursor.arrow.rotation = (
cursor_pos_screen.angle_to_point(arrow_rotation_point_screen) + PI / 2
)
cursor.base.modulate = player.cursor_color
class PlayerCursor:
var base: Control

View File

@@ -41,8 +41,6 @@ func _process(delta: float) -> void:
_damage_shake(delta)
_hit_shake(delta)
func _physics_process(delta: float) -> void:
var follow_position: Vector3 = Vector3.ZERO
for player in Referencer.players:
follow_position += _follow(player, delta)

View File

@@ -1,6 +1,8 @@
class_name Player
extends CharacterBody3D
@export var cursor_color: Color
@export var _input_mode: Inputer.Mode = Inputer.Mode.KB_MOUSE
@export var _device_index: int = 0