mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
32 lines
No EOL
647 B
C#
32 lines
No EOL
647 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Resources.Events;
|
|
|
|
[GlobalClass]
|
|
public partial class UpdateCheckPointEvent : EventResource
|
|
{
|
|
private GameManager _gameManager;
|
|
|
|
[Export]
|
|
public NodePath Target { get; set; }
|
|
|
|
public override void Init(Node2D parent)
|
|
{
|
|
_gameManager = parent.GetGameManager();
|
|
}
|
|
|
|
public override void Start(Node2D parent)
|
|
{
|
|
_gameManager.Player.LastCheckPointPosition = parent.GetNode<Node2D>(Target).GlobalPosition;
|
|
}
|
|
|
|
public override void UpdateEvent(double delta)
|
|
{
|
|
|
|
}
|
|
|
|
public override bool IsComplete()
|
|
{
|
|
return true;
|
|
}
|
|
} |