mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:55:35 +00:00
Death and Rebirth
This commit is contained in:
parent
ba21b30a4d
commit
be52d0e081
11 changed files with 309 additions and 83 deletions
32
Scripts/Resources/Events/UpdateCheckPointEvent.cs
Normal file
32
Scripts/Resources/Events/UpdateCheckPointEvent.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue