added sword cursor
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
extends Node3D
|
||||
|
||||
@export var player : Player
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
var mouse_pos = MousePos.get_mouse_world_position(00001000)
|
||||
if mouse_pos != null:
|
||||
global_position = mouse_pos
|
||||
global_position = Vector3(mouse_pos.x,.1,mouse_pos.z)
|
||||
look_at(player.global_position, Vector3.UP)
|
||||
|
||||
@@ -20,6 +20,9 @@ const STAMINA_REGEN_RATE = 10.0
|
||||
const DODGE_STAMINA_COST = 30.0
|
||||
const ATTACK_STAMINA_COST = 10.0
|
||||
|
||||
func _ready() -> void:
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
stamina_regen(delta)
|
||||
move_and_slide()
|
||||
|
||||
Reference in New Issue
Block a user