예제 #1
0
파일: GameUI.cs 프로젝트: Nounka/LD48
    // Start is called before the first frame update
    void Start()
    {
        gameState  = GameState.instance;
        controller = GameState.instance.controller;

        SelectedEnemyPanel.SetActive(false);
        SelectedWorkerPanel.SetActive(false);
        SelectedBuildingPanel.SetActive(false);
        PausePanel.SetActive(false);
        BuildDescriptionPanel.SetActive(false);
        BuildPanel.SetActive(true);
        RessourcePanel.SetActive(true);
    }
예제 #2
0
파일: GameUI.cs 프로젝트: Nounka/LD48
    public void ControllerUpdateState(Controller.ControlerMode newState)
    {
        SelectedEnemyPanel.SetActive(controller.mode == Controller.ControlerMode.selectEnnemy);
        SelectedWorkerPanel.SetActive(controller.mode == Controller.ControlerMode.selectUnit);
        SelectedBuildingPanel.SetActive(controller.mode == Controller.ControlerMode.selectBuilding);
        bool isBuildMode = (controller.mode == Controller.ControlerMode.placeBuilding);

        BuildDescriptionPanel.SetActive(isBuildMode);
        if (isBuildMode)
        {
            string text = "Missing Object Data !";
            try
            {
                text = controller.ghostBuilding.currentStats.ToString();
            }
            catch (System.Exception e)
            {
                // blah !
            }
            BuildDescriptionText.text = text;
        }
    }