add cursor texture and color
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user