예제 #1
0
    public override void Init()
    {
        base.Init();
        GameObject canvas = GameObject.Find("Canvas");

        m_RootUI = canvas.FindChildTraversing("GameStateUI");

        m_Hearts = new List <GameObject>();
        GameObject heart1 = m_RootUI.FindChildTraversing("Heart1");
        GameObject heart2 = m_RootUI.FindChildTraversing("Heart2");
        GameObject heart3 = m_RootUI.FindChildTraversing("Heart3");

        m_Hearts.Add(heart1);
        m_Hearts.Add(heart2);
        m_Hearts.Add(heart3);

        m_SoldierCount = Utilitys.FindChild <Text>(m_RootUI, "SoldierCount");
        m_EnemyCount   = Utilitys.FindChild <Text>(m_RootUI, "EnemyCount");
        m_CurrentStage = Utilitys.FindChild <Text>(m_RootUI, "StageCount");
        m_PauseBtn     = Utilitys.FindChild <Button>(m_RootUI, "PauseBtn");
        m_GameOverUI   = m_RootUI.FindChildTraversing("GameOver");
        m_BackMenuBtn  = Utilitys.FindChild <Button>(m_RootUI, "BackMenuBtn");
        m_Message      = Utilitys.FindChild <Text>(m_RootUI, "Message");
        m_EnergySlider = Utilitys.FindChild <Slider>(m_RootUI, "EnergySlider");
        m_EnergyText   = Utilitys.FindChild <Text>(m_RootUI, "EnergyText");

        m_Message.text = "";

        m_GameOverUI.SetActive(false);
    }
예제 #2
0
    public override void Init()
    {
        base.Init();
        GameObject canvas = GameObject.Find("Canvas");

        m_RootUI = canvas.FindChildTraversing("CampInfoUI");

        m_CampIcon         = Utilitys.FindChild <Image>(m_RootUI, "CampIcon");
        m_CampName         = Utilitys.FindChild <Text>(m_RootUI, "CampName");
        m_CampLevel        = Utilitys.FindChild <Text>(m_RootUI, "CampLv");
        m_WeaponLevel      = Utilitys.FindChild <Text>(m_RootUI, "WeaponLv");
        m_CampUpgradeBtn   = Utilitys.FindChild <Button>(m_RootUI, "CampUpgradeBtn");
        m_WeaponUpgradeBtn = Utilitys.FindChild <Button>(m_RootUI, "WeaponUpgradeBtn");
        m_TrainBtn         = Utilitys.FindChild <Button>(m_RootUI, "TrainBtn");
        m_TrainBtnText     = Utilitys.FindChild <Text>(m_RootUI, "TrainBtnText");
        m_CancelTrainBtn   = Utilitys.FindChild <Button>(m_RootUI, "CancelTrainBtn");
        m_AliveCount       = Utilitys.FindChild <Text>(m_RootUI, "AliveCount");
        m_TrainingCount    = Utilitys.FindChild <Text>(m_RootUI, "TrainningCount");
        m_TrainTime        = Utilitys.FindChild <Text>(m_RootUI, "TrainTime");

        m_TrainBtn.onClick.AddListener(OnTrainClick);
        m_CancelTrainBtn.onClick.AddListener(OnCancelTrainClick);
        m_CampUpgradeBtn.onClick.AddListener(OnCampUpgradeClick);
        m_WeaponUpgradeBtn.onClick.AddListener(OnWeaponUpgradeClick);


        Hide();
    }
예제 #3
0
    public override void Init()
    {
        base.Init();
        GameObject canvas = GameObject.Find("Canvas");

        m_RootUI         = canvas.FindChildTraversing("GamePauseUI");
        m_CurrentStageLv = Utilitys.FindChild <Text>(m_RootUI, "CurrentStageLv");
        m_BackMenuBtn    = Utilitys.FindChild <Button>(m_RootUI, "BackMenuBtn");
        m_ContinueBtn    = Utilitys.FindChild <Button>(m_RootUI, "ContinueBtn");

        Hide();
    }
예제 #4
0
    public override void Init()
    {
        base.Init();
        GameObject canvas = GameObject.Find("Canvas");

        m_RootUI = canvas.FindChildTraversing("SoldierInfoUI");

        m_SoldierIcon = Utilitys.FindChild <Image>(m_RootUI, "SoldierIcon");
        m_SoldierName = Utilitys.FindChild <Image>(m_RootUI, "SoldierName");
        m_HPText      = Utilitys.FindChild <Text>(m_RootUI, "HPNumber");
        m_HPSlider    = Utilitys.FindChild <Slider>(m_RootUI, "HPSlider");
        m_Lv          = Utilitys.FindChild <Text>(m_RootUI, "Level");
        m_Atk         = Utilitys.FindChild <Text>(m_RootUI, "Atk");
        m_AtkRange    = Utilitys.FindChild <Text>(m_RootUI, "AtkRange");
        m_MoveSpeed   = Utilitys.FindChild <Text>(m_RootUI, "MoveSpeed");

        Hide();
    }