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

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