mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-11 01:45:53 +00:00
Remade spawn coordinates system
This commit is contained in:
parent
3681614196
commit
d633618633
5 changed files with 85 additions and 12 deletions
|
|
@ -20,6 +20,8 @@ public partial class GameManager : Node2D
|
|||
|
||||
public InventoryManager Inventory => _inventoryManager;
|
||||
|
||||
private Node2D _bulletsContainer;
|
||||
public Node2D BulletsContainer => _bulletsContainer;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
|
|
@ -29,6 +31,8 @@ public partial class GameManager : Node2D
|
|||
|
||||
_inventoryManager = GetNode<InventoryManager>("InventoryManager");
|
||||
|
||||
SpawnBulletsContainer();
|
||||
|
||||
if (PlayerSpawnMarker != null)
|
||||
{
|
||||
SpawnPlayer();
|
||||
|
|
@ -57,4 +61,12 @@ public partial class GameManager : Node2D
|
|||
_cameraTarget.GlobalPosition = _player.Position;
|
||||
}
|
||||
}
|
||||
|
||||
private void SpawnBulletsContainer()
|
||||
{
|
||||
_bulletsContainer = new Node2D();
|
||||
_bulletsContainer.Name = "BulletsContainer";
|
||||
|
||||
AddChild(_bulletsContainer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue