예제 #1
0
    void OnEnable()
    {
        GameMain.EvtInputKey += Handle_InputKey;

        BackStageSetting bsSetting = GameMain.Singleton.BSSetting;
        mEnterVal_GameDifficult = bsSetting.GameDifficult_.Val;
        mEnterVal_CoinTicketRatio_Coin = bsSetting.CoinTicketRatio_Coin.Val;
        mEnterVal_CoinTicketRatio_Ticket= bsSetting.CoinTicketRatio_Ticket.Val;
        //mEnterVal_IsBulletCross = bsSetting.IsBulletCrossWhenScreenNet.Val;
        mEnterVal_ScoreChangeValue = bsSetting.ScoreChangeValue.Val;
        mEnterVal_Scoremax = bsSetting.ScoreMax.Val;
        //mEnterVal_Scoremin = bsSetting.ScoreMin.Val;
        mEnterVal_OutBountyType = bsSetting.OutBountyType_.Val;
        mEnterVal_GunLayoutType = bsSetting.GunLayoutType_.Val;
        mEnterVal_Language = bsSetting.LaguageUsing.Val;

        Ctrl_GameDifficul.ViewIdx = (int)mEnterVal_GameDifficult;
        Ctrl_CoinTicketRatio_Coin.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Coin.CurrentText;
        Ctrl_CoinTicketRatio_Coin.NumViewing = mEnterVal_CoinTicketRatio_Coin;
        Ctrl_CoinTicketRatio_Ticket.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Ticket.CurrentText;
        Ctrl_CoinTicketRatio_Ticket.NumViewing = mEnterVal_CoinTicketRatio_Ticket;

        //Ctrl_IsBulletCross.ViewIdx
        //Ctrl_IsBulletCross.ViewIdx = mEnterVal_IsBulletCross ? 1 : 0;
        Ctrl_ScoreChangeVal.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        Ctrl_ScoreChangeVal.NumViewing = mEnterVal_ScoreChangeValue;
        Ctrl_MaxScore.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        Ctrl_MaxScore.NumViewing = mEnterVal_Scoremax;
        //Ctrl_MinScore.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        //Ctrl_MinScore.NumViewing = mEnterVal_Scoremin;
        Ctrl_Language.ViewIdx = (int)mEnterVal_Language;

        if (!bsSetting.Dat_GameShowLanguageSetup.Val)
        {
            Renderer r = Ctrl_Language.GetComponentInChildren<Renderer>();
            if (r != null)
                r.enabled = false;
            Transform ts = transform.FindChild("OptionText/OptionText6");
            if (ts != null)
            {
                if (ts.renderer != null)
                    ts.renderer.enabled = false;
            }
        }
        else
        {
            Renderer r = Ctrl_Language.GetComponentInChildren<Renderer>();
            if (r != null)
                r.enabled = true;
            Transform ts = transform.FindChild("OptionText/OptionText6");
            if (ts != null)
            {
                if (ts.renderer != null)
                    ts.renderer.enabled = true;
            }
        }

        Ctrl_OutBountyType.ViewIdx = (int)mEnterVal_OutBountyType;

         Ctrl_GunLayouType.ViewIdx = (int)mEnterVal_GunLayoutType;
        if (CursorLocals != null && CursorLocals.Length != 0)
            BackstageMain.Singleton.UpdateCursor(CursorLocals[mCurCursorIdx]);

        //Spr_GunLayoutHint.renderer.enabled = false;
        Ctrl_GunLayouType.EvtAdvanceing += Handle_Ctrl_GunLayoutType;
    }
예제 #2
0
    void OnEnable()
    {
        GameMain.EvtInputKey += Handle_InputKey;

        BackStageSetting bsSetting = GameMain.Singleton.BSSetting;

        mEnterVal_GameDifficult          = bsSetting.GameDifficult_.Val;
        mEnterVal_CoinTicketRatio_Coin   = bsSetting.CoinTicketRatio_Coin.Val;
        mEnterVal_CoinTicketRatio_Ticket = bsSetting.CoinTicketRatio_Ticket.Val;
        //mEnterVal_IsBulletCross = bsSetting.IsBulletCrossWhenScreenNet.Val;
        mEnterVal_ScoreChangeValue = bsSetting.ScoreChangeValue.Val;
        mEnterVal_Scoremax         = bsSetting.ScoreMax.Val;
        //mEnterVal_Scoremin = bsSetting.ScoreMin.Val;
        mEnterVal_OutBountyType = bsSetting.OutBountyType_.Val;
        mEnterVal_GunLayoutType = bsSetting.GunLayoutType_.Val;
        mEnterVal_Language      = bsSetting.LaguageUsing.Val;

        Ctrl_GameDifficul.ViewIdx = (int)mEnterVal_GameDifficult;
        Ctrl_CoinTicketRatio_Coin.ViewTextFormat   = "{0:d}  " + BackstageMain.Singleton.Unit_Coin.CurrentText;
        Ctrl_CoinTicketRatio_Coin.NumViewing       = mEnterVal_CoinTicketRatio_Coin;
        Ctrl_CoinTicketRatio_Ticket.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Ticket.CurrentText;
        Ctrl_CoinTicketRatio_Ticket.NumViewing     = mEnterVal_CoinTicketRatio_Ticket;

        //Ctrl_IsBulletCross.ViewIdx
        //Ctrl_IsBulletCross.ViewIdx = mEnterVal_IsBulletCross ? 1 : 0;
        Ctrl_ScoreChangeVal.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        Ctrl_ScoreChangeVal.NumViewing     = mEnterVal_ScoreChangeValue;
        Ctrl_MaxScore.ViewTextFormat       = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        Ctrl_MaxScore.NumViewing           = mEnterVal_Scoremax;
        //Ctrl_MinScore.ViewTextFormat = "{0:d}  " + BackstageMain.Singleton.Unit_Score.CurrentText;
        //Ctrl_MinScore.NumViewing = mEnterVal_Scoremin;
        Ctrl_Language.ViewIdx = (int)mEnterVal_Language;

        if (!bsSetting.Dat_GameShowLanguageSetup.Val)
        {
            Renderer r = Ctrl_Language.GetComponentInChildren <Renderer>();
            if (r != null)
            {
                r.enabled = false;
            }
            Transform ts = transform.Find("OptionText/OptionText6");
            if (ts != null)
            {
                if (ts.GetComponent <Renderer>() != null)
                {
                    ts.GetComponent <Renderer>().enabled = false;
                }
            }
        }
        else
        {
            Renderer r = Ctrl_Language.GetComponentInChildren <Renderer>();
            if (r != null)
            {
                r.enabled = true;
            }
            Transform ts = transform.Find("OptionText/OptionText6");
            if (ts != null)
            {
                if (ts.GetComponent <Renderer>() != null)
                {
                    ts.GetComponent <Renderer>().enabled = true;
                }
            }
        }


        Ctrl_OutBountyType.ViewIdx = (int)mEnterVal_OutBountyType;

        Ctrl_GunLayouType.ViewIdx = (int)mEnterVal_GunLayoutType;
        if (CursorLocals != null && CursorLocals.Length != 0)
        {
            BackstageMain.Singleton.UpdateCursor(CursorLocals[mCurCursorIdx]);
        }

        //Spr_GunLayoutHint.renderer.enabled = false;
        Ctrl_GunLayouType.EvtAdvanceing += Handle_Ctrl_GunLayoutType;
    }