protected override void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } level = Level.Instance; resources = GameManager.instance.resources; GS = GlobalSettings.Instance; UI = Userinteraface.Instance; cs = CoordinateSystem.Instance; animator = GetComponent <Animator>(); UI.fightersText.text = "Fighters: " + resources.Fighters; UI.foodText.text = "Food: " + resources.Food; UI.goldText.text = "Gold: " + resources.Gold; UI.equipmentText.text = "Equipment: " + resources.Equipment; //army spawns in the middle of left row at x=0, y=1 position = new Position(GS.ArmySpawnPositionX, GS.ArmySpawnPositionY); previousPosition = new Position(GS.ArmySpawnPositionX, GS.ArmySpawnPositionY); transform.position = new Vector3(cs.Positions[position.Row][position.Column].x, cs.Positions[position.Row][position.Column].y, 0f); base.Start(); }
void Start() { GS = GlobalSettings.Instance; level = Level.Instance; UI = Userinteraface.Instance; resources = Resources.Instance; }
void Start() { GS = GlobalSettings.Instance; CS = CoordinateSystem.Instance; UI = Userinteraface.Instance; if (Highscore.instance == null) { Instantiate(HS); } if (GameManager.instance == null) { Instantiate(gameManager); } if (Army.instance == null) { Instantiate(army); } }
void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } level = Level.Instance; GS = GlobalSettings.Instance; currentLevel = GS.startingLevel; UI = Userinteraface.Instance; UI.FindUiElements(); resources = Resources.Instance; HS = Highscore.instance; DontDestroyOnLoad(gameObject); boardScript = GetComponent <BoardManager>(); InitGame(); }
void Start() { level = Level.Instance; UI = Userinteraface.Instance; resources = Resources.Instance; }