cirnogodot/Scripts/Components/FSM/PlayerStateMachine.cs

35 lines
824 B
C#
Raw Normal View History

2025-02-28 13:50:52 +01:00
using System;
2025-03-31 18:28:33 +02:00
using Cirno.Scripts.Components.Actors;
2025-02-28 13:50:52 +01:00
using Godot;
namespace Cirno.Scripts.Components.FSM;
2025-03-05 10:55:14 +01:00
public partial class PlayerStateMachine : StateMachineBase<PlayerState, CharacterBody2D>
2025-02-28 13:50:52 +01:00
{
2025-03-05 10:55:14 +01:00
[Export] public override PlayerState InitialState { get; protected set; } = PlayerState.Init;
2025-03-12 16:31:53 +01:00
2025-03-15 17:56:55 +01:00
[Export] public Vector2 StartingDirection { get; set; } = Vector2.Down;
2025-03-31 18:28:33 +02:00
[Export] public ActorResourceProvider MotivationResource { get; private set; }
2025-03-12 16:31:53 +01:00
public void RefillHealth()
{
GD.Print("Refilling health");
}
public void RefilleShield()
{
GD.Print("Refilling shield");
}
2025-03-12 18:46:17 +01:00
public void NoClip()
{
GD.Print("NoClip");
}
2025-03-31 18:28:33 +02:00
public void AddMotivation(float motivation)
{
MotivationResource.CurrentResource += motivation;
}
2025-03-05 10:55:14 +01:00
2025-02-28 13:50:52 +01:00
}