mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Player shader
This commit is contained in:
parent
357ced3e94
commit
6162d11165
19 changed files with 480 additions and 24 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Cirno.Scripts.Components.Actors;
|
||||
using Cirno.Scripts.Components.Actors._3D;
|
||||
using Cirno.Scripts.Utils;
|
||||
using Godot;
|
||||
|
||||
|
|
@ -10,6 +11,9 @@ public partial class Active : BaseState<PlayerState, CharacterBody3D>
|
|||
|
||||
private CharacterBody3D _player;
|
||||
[Export] private InputProvider _inputProvider;
|
||||
[Export] public PlayerAnimationProvider3D AnimationProvider { get; private set; }
|
||||
|
||||
[Export] public IsoPlayerStorageModule Storage { get; private set; }
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
||||
{
|
||||
|
|
@ -49,7 +53,7 @@ public partial class Active : BaseState<PlayerState, CharacterBody3D>
|
|||
// enable sprite
|
||||
// enable crosshair
|
||||
//_crosshairProvider.Show();
|
||||
//_animationProvider.ShowSprite();
|
||||
AnimationProvider.ShowSprite();
|
||||
//_damageReceiver.Enabled = true;
|
||||
//_activationProvider.Enabled = true;
|
||||
//_interactionController.Enabled = true;
|
||||
|
|
@ -60,7 +64,7 @@ public partial class Active : BaseState<PlayerState, CharacterBody3D>
|
|||
public override void ExitState()
|
||||
{
|
||||
base.ExitState();
|
||||
// _animationProvider.SetAnimationSpeed(Vector2.Zero);
|
||||
AnimationProvider.SetAnimationSpeed(Vector2.Zero);
|
||||
// //_animationProvider.SetAnimation(Vector2.Zero);
|
||||
// _crosshairProvider.Hide();
|
||||
// _hitboxSpriteProvider.Hide();
|
||||
|
|
@ -88,6 +92,9 @@ public partial class Active : BaseState<PlayerState, CharacterBody3D>
|
|||
base.ProcessState(delta);
|
||||
|
||||
HandleInputHotkeys();
|
||||
|
||||
AnimationProvider.SetAnimationSpeed(new Vector2(MainObject.Velocity.X, MainObject.Velocity.Z));
|
||||
AnimationProvider.SetAnimation(Storage.FacingDirection);
|
||||
}
|
||||
|
||||
private void HandleInputHotkeys()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue