// Get a reference to all of the continent controllers. void Start() { // Find devil and god controllers. devil_Controller = this.gameObject.GetComponent <Devil_Controller>(); god_Controller = this.gameObject.GetComponent <God_Controller>(); _day = _startingDay; _month = _startingMonth; _year = _startingYear; // Don't bother with leap year. _daysInMonth = new short[12] { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; _timer = 0.0f; //_evilDeathCount = 0; // Gives appropriate string names to the region controller which are assigned in the Unity editor. for (int i = 0; i < region_Controller.Length; i++) { region_Controller[i].name = this.GetComponent <Minor_Events_Controller>().regionNames[i]; } _isTimePaused = false; hellDeathCount = 0; heavenDeathCount = 0; // Setup main HUD. SetupHudText(); }
public IEnumerator StartingBansheesNotNull() { Devil_Controller devil_Controller = new Devil_Controller(); yield return(null); Assert.IsNotNull(devil_Controller._startingAvailableBanshees); }
void Start() { eventsDescr = "Default text"; eventsContentText.text = eventsDescr; devil_Controller = gameObject.GetComponent <Devil_Controller>(); god_Controller = gameObject.GetComponent <God_Controller>(); }
public IEnumerator MaxBansheesEqualsStartingBanshees() { Devil_Controller devil_Controller = new Devil_Controller(); yield return(null); var max = devil_Controller._maxDeployableBanshees; var starting = devil_Controller._startingAvailableBanshees; Assert.IsTrue(max == starting); }
public IEnumerator AvailableBansheesEqualsStartingBanshees() { Devil_Controller devil_Controller = new Devil_Controller(); yield return(null); var available = devil_Controller.GetAvailableBanshees(); var starting = devil_Controller._startingAvailableBanshees; Assert.IsTrue(available == starting); }
public IEnumerator SpendSinsNegativeParameterThrowsArguementException() { Devil_Controller devil_Controller = new Devil_Controller(); yield return(null); var startingSins = devil_Controller.GetSins(); devil_Controller.SpendSins(-200f); var endingSins = devil_Controller.GetSins(); Debug.Log($"Starting sins: {startingSins}. Ending Sins: {endingSins}."); Assert.Throws(typeof(System.ArgumentException), new TestDelegate(devil_Controller.SpendSins(-200f))); }
public void Setup() { gameObject = GameObject.Instantiate(new GameObject()); devil_Controller = gameObject.AddComponent <Devil_Controller>(); }