示例#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;
        }
    }