mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-06 12:15:55 +00:00
Motivation
This commit is contained in:
parent
c9b703a0ae
commit
e73596e464
13 changed files with 100 additions and 34 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Cirno.Scripts.Components.Actors;
|
||||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM;
|
||||
|
|
@ -9,6 +10,8 @@ public partial class PlayerStateMachine : StateMachineBase<PlayerState, Characte
|
|||
|
||||
[Export] public Vector2 StartingDirection { get; set; } = Vector2.Down;
|
||||
|
||||
[Export] public ActorResourceProvider MotivationResource { get; private set; }
|
||||
|
||||
public void RefillHealth()
|
||||
{
|
||||
GD.Print("Refilling health");
|
||||
|
|
@ -23,5 +26,10 @@ public partial class PlayerStateMachine : StateMachineBase<PlayerState, Characte
|
|||
{
|
||||
GD.Print("NoClip");
|
||||
}
|
||||
|
||||
public void AddMotivation(float motivation)
|
||||
{
|
||||
MotivationResource.CurrentResource += motivation;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue