Ejemplo n.º 1
0
    void Start()
    {
        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();
        m_title = new YGUISystem.GUILable(transform.Find("Image/Text").gameObject);
        m_title.Text.text = RefData.Instance.RefTexts(MultiLang.ID.GoToTheMainTitle);

        m_yes = new YGUISystem.GUILable(transform.Find("YesButton/Text").gameObject);
        m_yes.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Yes);

        m_no = new YGUISystem.GUILable(transform.Find("NoButton/Text").gameObject);
        m_no.Text.text = RefData.Instance.RefTexts(MultiLang.ID.No);
    }
Ejemplo n.º 2
0
    void Start()
    {
        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();

        m_sfxVolume = transform.Find("SFXGUI/Slider").gameObject.GetComponent<Slider>();
        m_bgmVolume = transform.Find("BGMGUI/Slider").gameObject.GetComponent<Slider>();

        m_sfxVolume.value = Warehouse.Instance.GameOptions.m_sfxVolume;
        m_bgmVolume.value = Warehouse.Instance.GameOptions.m_bgmVolume;

        m_close = new YGUISystem.GUILable(transform.Find("CloseButton/Text").gameObject);
        m_close.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Close);

        m_share = new YGUISystem.GUILable(transform.Find("ShareButton/Text").gameObject);
        m_share.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Share);

        m_credits = new YGUISystem.GUILable(transform.Find("CreditsButton/Text").gameObject);
        m_credits.Text.text = RefData.Instance.RefTexts(MultiLang.ID.Credits);

        m_fanPage = new YGUISystem.GUILable(transform.Find("FanPageButton/Text").gameObject);
        m_fanPage.Text.text = RefData.Instance.RefTexts(MultiLang.ID.FanPage);

        m_wave = new YGUISystem.GUILable(transform.Find("RestartWaveGUI/Slider/Lable").gameObject);
        m_wave.Text.text = RefData.Instance.RefTexts(MultiLang.ID.RestartWave);
        m_waveSliderText = transform.Find("RestartWaveGUI/Slider/Text").gameObject.GetComponent<Text>();
        m_waveSlider = transform.Find("RestartWaveGUI/Slider").gameObject.GetComponent<Slider>();
        m_waveSlider.minValue = 0;
        m_waveSlider.maxValue = Warehouse.Instance.GameBestStats.WaveIndex+1;
        m_waveSlider.value = Warehouse.Instance.GameOptions.m_reWaveIndex.Value;
    }
Ejemplo n.º 3
0
    void Start()
    {
        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();

        m_guages[0] = new YGUISystem.GUIGuage(transform.Find("Killed Mobs/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.GameBestStats.KilledMobs == 0)
                return 1f;
            return (float)Warehouse.Instance.NewGameStats.KilledMobs/Warehouse.Instance.GameBestStats.KilledMobs;
        },
        ()=>{
            if (Warehouse.Instance.GameBestStats.KilledMobs == 0)
                return Warehouse.Instance.NewGameStats.KilledMobs.ToString() + " / " + Warehouse.Instance.NewGameStats.KilledMobs.ToString();
            return Warehouse.Instance.NewGameStats.KilledMobs.ToString() + " / " + Warehouse.Instance.GameBestStats.KilledMobs.ToString();
        }
        );

        m_waveText = transform.Find("WaveGUI/Slider/Text").gameObject.GetComponent<Text>();
        m_waveText.text = (Warehouse.Instance.NewGameStats.WaveIndex+1).ToString() + " / " + (Warehouse.Instance.GameBestStats.WaveIndex+1).ToString();

        m_continueText = transform.Find("ContinueButton/Text").gameObject.GetComponent<Text>();
        m_continueText.text = "Continue at " + (Warehouse.Instance.NewGameStats.WaveIndex+1);

        m_waveSlider = transform.Find("WaveGUI/Slider").gameObject.GetComponent<Slider>();
        m_waveSlider.minValue = 0;
        m_waveSlider.maxValue = Warehouse.Instance.GameBestStats.WaveIndex+1;
        m_waveSlider.value = Warehouse.Instance.NewGameStats.WaveIndex+1;

        m_guages[1] = new YGUISystem.GUIGuage(transform.Find("Waves/Guage/Guage").gameObject,
                                              ()=>{
            if (Warehouse.Instance.GameBestStats.WaveIndex == 0)
                return 1f;
            return (float)Warehouse.Instance.NewGameStats.WaveIndex/Warehouse.Instance.GameBestStats.WaveIndex;
        },
        ()=>{
            if (Warehouse.Instance.GameBestStats.WaveIndex == 0)
                return "1 / 1";
            return (Warehouse.Instance.NewGameStats.WaveIndex+1).ToString() + " / " + (Warehouse.Instance.GameBestStats.WaveIndex+1).ToString();
        }
        );

        //m_admob.ShowInterstitial();
        m_admob.ShowBanner(true);

        Warehouse.Instance.CurrentWaveIndex = Warehouse.Instance.GameOptions.m_reWaveIndex.Value;
        OnClickContinue();
    }
Ejemplo n.º 4
0
    new void Start()
    {
        base.Start();

        m_admob = GameObject.Find("HudGUI/ADMob").GetComponent<ADMob>();

        ApplyGameOptions();

        FollowingCamera followingCamera = Camera.main.GetComponentInChildren<FollowingCamera>();
        followingCamera.SetMainTarget(gameObject);
        followingCamera.Smooth = 0.3f;
    }