mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Parallax beams
This commit is contained in:
parent
e637f69ce6
commit
208ce8c533
9 changed files with 465 additions and 243 deletions
|
|
@ -16,5 +16,10 @@ public partial class PlayerStateMachine : StateMachineBase<PlayerState, Characte
|
|||
{
|
||||
GD.Print("Refilling shield");
|
||||
}
|
||||
|
||||
public void NoClip()
|
||||
{
|
||||
GD.Print("NoClip");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,9 @@ public partial class GameManager : Node2D
|
|||
public delegate void PlayerRespawnedEventHandler();
|
||||
|
||||
public Vector2 LastCheckpointPosition { get; set; }
|
||||
|
||||
[Export]
|
||||
public Node2D PlayerParentNode { get; set; }
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
|
|
@ -165,8 +168,18 @@ public partial class GameManager : Node2D
|
|||
_player = PlayerTemplate.Instantiate<PlayerFSMProxy>();
|
||||
|
||||
//this.CallDeferred("add_child", _player);
|
||||
this.AddChild(_player);
|
||||
_player.Owner = this;
|
||||
if (PlayerParentNode is not null)
|
||||
{
|
||||
PlayerParentNode.AddChild(_player);
|
||||
_player.Owner = PlayerParentNode;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.AddChild(_player);
|
||||
_player.Owner = this;
|
||||
}
|
||||
|
||||
|
||||
_player.Transform = this.GlobalTransform;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue