public void Fortify() { Debug.Log("Fortify called"); //Add the armies that the slider was set to fortified.AddArmies((int)slider.value); //Subtract the armies from the territory that you're fortifying from activeTerritoryScript.AddArmies(-(int)slider.value); //Unpause the game Time.timeScale = 1; //If there's only one army in the territory, deactivate it if (activeTerritoryScript.armyValue == 1) { activeTerritoryScript.Activate(false); } //Hide the slider and its components sliderObject.SetActive(false); if (GameManager.instance.mode == GameManager.Mode.fortify) { Debug.Log("next turn"); GameManager.instance.NextMode(); } }