private void Intialise() { MenuScreen = GameObjectUtilities.GetChildComponent <UIMenuController> (this.transform); GameScreen = GameObjectUtilities.GetChildComponent <UIGameController> (this.transform); PauseScreen = GameObjectUtilities.GetChildComponent <UIPauseController> (this.transform); GameOverScreen = GameObjectUtilities.GetChildComponent <UIGameOverController> (this.transform); EventManager.OnStateChanged += OnStateSwitched; }
void Awake() { instance = this; #if UNITY_EDITOR QualitySettings.vSyncCount = 0; // VSync must be disabled Application.targetFrameRate = 30; #else Application.targetFrameRate = 30; #endif }
public void PauseUnitTest() { // Use tPlayhe Assert class to test conditionPlays. UIGameController UIButtons = new UIGameController(); // set object for UIbatttleController PauseAndMenu pauseMenu = UIButtons.getPauseAndMenu(); //get object from pauseMenu Assert.AreEqual(0, pauseMenu.PauseGame()); //make sure time Scale return to 0 so the game pause Assert.AreEqual(1, pauseMenu.ResumeGame()); //make sure time Scale return to 1 so the game resume }
public void Start() { ui = GetComponent <UIGameController>(); structureInfo = structureMap.GetComponent <GridInformation>(); landInfo = landMap.GetComponent <GridInformation>(); inputController = FindObjectOfType <OnTileHoverScript>(); buildModeController = FindObjectOfType <BuildModeController>(); buildModeController.enterMode += OnBuildModdeEnter; buildModeController.leaveMode += OnBuildModdeLeave; //CreateMap(); allStrucutures = new List <Structure>(); foodLast = food; LoadMap(); }
private void Awake() { runtime = this; }
void Awake() { Instance = this; }