Beispiel #1
0
    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;
    }
Beispiel #2
0
    void Awake()
    {
        instance = this;

                #if UNITY_EDITOR
        QualitySettings.vSyncCount  = 0;         // VSync must be disabled
        Application.targetFrameRate = 30;
                #else
        Application.targetFrameRate = 30;
                #endif
    }
Beispiel #3
0
    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
    }
Beispiel #4
0
    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();
    }
Beispiel #5
0
 private void Awake()
 {
     runtime = this;
 }
 private void Awake()
 {
     runtime = this;
 }
Beispiel #7
0
 void Awake()
 {
     Instance = this;
 }