I am doing a CHAOS check in. showing support for one another. I need SIX jacks to post, not share, this message to show you are always there to kill chaos if someone needs it. let's go gentlemen...
This commit is contained in:
@@ -9,16 +9,20 @@ public partial class Main : Node
|
||||
[Export]
|
||||
public PackedScene GameManager;
|
||||
|
||||
public int NumberOfPlayers = 0;
|
||||
|
||||
public void LoadLevel(int indexToLoad, int numberOfPlayers)
|
||||
{
|
||||
var sceneToLoad = Levels.ElementAt(indexToLoad);
|
||||
CallDeferred(nameof(DeferredGoToScene), sceneToLoad);
|
||||
|
||||
NumberOfPlayers = numberOfPlayers;
|
||||
|
||||
var gameManager = GameManager.Instantiate();
|
||||
AddChild(gameManager);
|
||||
var gameManagerInstance = (GameManager)gameManager;
|
||||
|
||||
gameManagerInstance.OnHandleCharacterSelectUI(gameManagerInstance.Players.ElementAt(0));
|
||||
|
||||
if (numberOfPlayers == 2)
|
||||
gameManagerInstance.OnHandleCharacterSelectUI(gameManagerInstance.Players.ElementAt(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user