private void Start() { if (playerManagerScript == null) { playerManagerScript = FindObjectOfType <PlayerManagerScript>(); } playerManagerScript.activateUnits(); if (battleSystem == null) { battleSystem = FindObjectOfType <BattleSystem>(); } if (playerManagerScript != null) { foreach (UnitScript u in playerManagerScript.units) { battleSystem.addTurn(u); } } }
//Button public void startLevel() { playerManager.activateUnits(); loadScene(2); }