mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-09 21:05: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
|
|
@ -26,14 +26,13 @@ public partial class MovePlayerEvent : EventResource
|
|||
|
||||
private bool _isComplete = false;
|
||||
|
||||
private GameManager _gameManager;
|
||||
|
||||
public override void Init(Node2D parent)
|
||||
public override void Init(Node parent)
|
||||
{
|
||||
_gameManager = parent.GetGameManager();
|
||||
|
||||
}
|
||||
|
||||
public override void Start(Node2D parentNode)
|
||||
public override void Start(Node parentNode)
|
||||
{
|
||||
_isComplete = false;
|
||||
_ = MovePlayer();
|
||||
|
|
@ -45,8 +44,8 @@ public partial class MovePlayerEvent : EventResource
|
|||
//_gameManager.Player.RequestMovementDisable(true);
|
||||
|
||||
var gtween = GTweenSequenceBuilder.New()
|
||||
.Append(_gameManager.Player.MainObject.TweenGlobalPosition(
|
||||
_gameManager.Player.MainObject.GlobalPosition + RelativeTargetPosition, MovementTime)
|
||||
.Append(GameManager.Instance.Player.MainObject.TweenGlobalPosition(
|
||||
GameManager.Instance.Player.MainObject.GlobalPosition + RelativeTargetPosition, MovementTime)
|
||||
.SetEasing(GTweenEasing)
|
||||
//.
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue