mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:55:35 +00:00
Crosshair
This commit is contained in:
parent
e5a60a6ccd
commit
fe552608ee
13 changed files with 264 additions and 33 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Cirno.Scripts.Components.Actors;
|
||||
using Cirno.Scripts.Components.Actors._3D;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
|
@ -8,6 +9,8 @@ public partial class IsoMovementModule : ModuleBase<PlayerState, CharacterBody3D
|
|||
[Export] public IsoPlayerStorageModule PlayerStorage { get; private set; }
|
||||
[Export] private InputProvider _inputProvider;
|
||||
|
||||
[Export] public PlayerHitboxSpriteProvider3D HitboxSpriteProvider { get; private set; }
|
||||
|
||||
[Export] public int Speed { get; set; } = 45;
|
||||
[Export] public int StrafeSpeed { get; set; } = 35;
|
||||
[Export] public float Acceleration = 8f;
|
||||
|
|
@ -65,6 +68,8 @@ public partial class IsoMovementModule : ModuleBase<PlayerState, CharacterBody3D
|
|||
var rotatedMovementDirection = movementInput.Rotated(Mathf.DegToRad(-45f));
|
||||
|
||||
PlayerStorage.MovementDirection = new Vector3(rotatedMovementDirection.X, 0, rotatedMovementDirection.Y);
|
||||
|
||||
HitboxSpriteProvider.SetVisibility(_isStrafing);
|
||||
}
|
||||
|
||||
public override void PhysicsProcess(double delta)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue