cirnogodot/Scenes/InteractionController.cs

66 lines
1.2 KiB
C#
Raw Normal View History

2024-06-09 18:19:57 +02:00
using Godot;
using System;
2025-03-28 19:47:10 +01:00
using System.Linq;
2025-03-05 09:44:03 +01:00
using Cirno.Scripts.Components.Actors;
2025-03-05 10:55:14 +01:00
using Cirno.Scripts.Components.FSM;
2025-03-28 19:47:10 +01:00
using Cirno.Scripts.Interactables;
2024-06-09 18:19:57 +02:00
2025-03-05 10:55:14 +01:00
public partial class InteractionController : PlayerArea2DModule
2024-06-09 18:19:57 +02:00
{
2025-03-05 09:44:03 +01:00
[Export] public ActorResourceProvider Health { get; private set; }
[Export] public ActorResourceProvider Shield { get; private set; }
2025-03-05 12:27:15 +01:00
2025-03-03 10:58:20 +01:00
private bool _enabled = false;
public bool Enabled
{
get => _enabled;
set
{
if (_enabled == value) return;
_enabled = value;
if (_enabled)
{
EmitSignal(SignalName.InteractionStarted);
}
}
}
2025-03-05 12:27:15 +01:00
2025-03-03 10:58:20 +01:00
[Signal]
public delegate void InteractionStartedEventHandler();
2024-06-09 18:19:57 +02:00
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
2025-03-05 10:55:14 +01:00
2025-03-08 11:33:26 +01:00
public override void EnterState(PlayerState state)
{
}
public override void ExitState(PlayerState state)
{
}
2025-03-05 10:55:14 +01:00
public override void Init(IStateMachine<PlayerState, CharacterBody2D> machine)
{
2025-03-05 12:27:15 +01:00
base.Init(machine);
2025-03-05 10:55:14 +01:00
}
public override void Process(double delta)
{
2025-03-05 12:27:15 +01:00
2025-03-05 10:55:14 +01:00
}
public override void PhysicsProcess(double delta)
{
2025-03-05 12:27:15 +01:00
2025-03-05 10:55:14 +01:00
}
2024-06-09 18:19:57 +02:00
}