mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-07 17:55:53 +00:00
Changed events to generic node
This commit is contained in:
parent
b89043cd8c
commit
7b2d32e727
17 changed files with 166 additions and 135 deletions
|
|
@ -5,19 +5,18 @@ 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)
|
||||
public override void Init(Node parent)
|
||||
{
|
||||
_gameManager = parent.GetGameManager();
|
||||
|
||||
}
|
||||
|
||||
public override void Start(Node2D parent)
|
||||
public override void Start(Node parent)
|
||||
{
|
||||
_gameManager.LastCheckpointPosition = parent.GetNode<Node2D>(Target).GlobalPosition;
|
||||
GameManager.Instance.LastCheckpointPosition = parent.GetNode<Node2D>(Target).GlobalPosition;
|
||||
// _gameManager.Player.LastCheckPointPosition = parent.GetNode<Node2D>(Target).GlobalPosition;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue