mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-08 23:55:54 +00:00
Fixed teleporters
This commit is contained in:
parent
9c3f22760b
commit
49cfb52d20
15 changed files with 102 additions and 84 deletions
|
|
@ -13,11 +13,11 @@ public partial class GameManager : Node2D
|
|||
public static GameManager Instance { get; private set; }
|
||||
private Hud _hud;
|
||||
|
||||
private PlayerStateMachine _player;
|
||||
private PlayerFSMProxy _player;
|
||||
|
||||
public GameState GameState { get; private set; }
|
||||
|
||||
public PlayerStateMachine Player => _player;
|
||||
public PlayerStateMachine Player => _player.PlayerFSM;
|
||||
|
||||
private Node2D _cameraTarget;
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ public partial class GameManager : Node2D
|
|||
|
||||
[Signal]
|
||||
public delegate void PlayerRespawnedEventHandler();
|
||||
|
||||
|
||||
public Vector2 LastCheckpointPosition { get; set; }
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
|
|
@ -110,7 +110,7 @@ public partial class GameManager : Node2D
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (GameState is GameState.Paused && Input.IsActionJustPressed(PauseActionName))
|
||||
|
|
@ -160,7 +160,7 @@ public partial class GameManager : Node2D
|
|||
if (_player != null) return;
|
||||
|
||||
//_player = this.CreateChild<PlayerMovement>(PlayerTemplate, PlayerSpawnMarker.Position );
|
||||
_player = PlayerTemplate.Instantiate<PlayerStateMachine>();
|
||||
_player = PlayerTemplate.Instantiate<PlayerFSMProxy>();
|
||||
|
||||
this.CallDeferred("add_child", _player);
|
||||
_player.Transform = this.GlobalTransform;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue