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


        BackStageSetting bs  = GameMain.Singleton.BSSetting;
        BackstageMain    bsm = BackstageMain.Singleton;

        //设置显示的数据
        Text_ViewInfos[0].text  = bs.His_GainTotal.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[1].text  = bs.His_GainPrevious.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[2].text  = bs.His_GainCurrent.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[3].text  = bs.His_CoinUp.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[4].text  = bs.His_CoinDown.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[5].text  = bs.His_CoinInsert.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[6].text  = bs.His_CoinOut.Val.ToString() + " " + bsm.Unit_Coin.CurrentText;
        Text_ViewInfos[7].text  = bs.His_TicketOut.Val.ToString() + " " + bsm.Unit_Ticket.CurrentText;
        Text_ViewInfos[8].text  = bs.Dat_IdLine.Val.ToString();
        Text_ViewInfos[9].text  = bs.Dat_IdTable.Val.ToString();
        Text_ViewInfos[10].text = bs.GetRemainRuntime().ToString() + " " + bsm.Unit_Minute.CurrentText;
        Text_ViewInfos[11].text = bs.His_NumCodePrint.Val.ToString() + " " + bsm.Unit_Times.CurrentText;

        foreach (tk2dTextMesh t in Text_ViewInfos)
        {
            t.Commit();
        }

        BackstageMain.Singleton.UpdateCursor(CursorLocal);
    }
    private int mLaguageType;    //0为中文,1为英文

    // Use this for initialization
    void Start()
    {
        mBss = GameMain.Singleton.BSSetting;

        if (mBss.LaguageUsing.Val == Language.Cn)
        {
            mLaguageType = 0;
        }
        else
        {
            mLaguageType = 1;
        }

        mUpdateDatas = new int[]
        {
            mBss.His_GainTotal.Val
            , mBss.His_GainCurrent.Val
            , mBss.His_CoinUp.Val
            , mBss.His_CoinDown.Val
            , mBss.His_CoinInsert.Val
            , mBss.His_CoinOut.Val
            , mBss.His_TicketOut.Val
            , mBss.GetRemainRuntime()
        };
        UpdateView();
    }
    void Update()
    {
        if (mUpdateDatas[0] != mBss.His_GainTotal.Val)
        {
            mUpdateDatas[0] = mBss.His_GainTotal.Val;
            UpdateView();
        }

        if (mUpdateDatas[1] != mBss.His_GainCurrent.Val)
        {
            mUpdateDatas[1] = mBss.His_GainCurrent.Val;
            UpdateView();
        }
        if (mUpdateDatas[2] != mBss.His_CoinUp.Val)
        {
            mUpdateDatas[2] = mBss.His_CoinUp.Val;
            UpdateView();
        }
        if (mUpdateDatas[3] != mBss.His_CoinDown.Val)
        {
            mUpdateDatas[3] = mBss.His_CoinDown.Val;
            UpdateView();
        }
        if (mUpdateDatas[4] != mBss.His_CoinInsert.Val)
        {
            mUpdateDatas[4] = mBss.His_CoinInsert.Val;
            UpdateView();
        }
        if (mUpdateDatas[5] != mBss.His_CoinOut.Val)
        {
            mUpdateDatas[5] = mBss.His_CoinOut.Val;
            UpdateView();
        }
        if (mUpdateDatas[6] != mBss.His_TicketOut.Val)
        {
            mUpdateDatas[6] = mBss.His_TicketOut.Val;
            UpdateView();
        }
        if (mUpdateDatas[7] != mBss.GetRemainRuntime())
        {
            mUpdateDatas[7] = mBss.GetRemainRuntime();
            UpdateView();
        }
    }
Example #4
0
    // Use this for initialization
    void Start()
    {
        mBss = GameMain.Singleton.BSSetting;

        if (mBss.LaguageUsing.Val == Language.Cn)
        {
            mLaguageType = 0;
        }
        else
            mLaguageType = 1;

        mUpdateDatas = new int[]
        {
                mBss.His_GainTotal.Val
                , mBss.His_GainCurrent.Val
                , mBss.His_CoinUp.Val
                , mBss.His_CoinDown.Val
                , mBss.His_CoinInsert.Val
                , mBss.His_CoinOut.Val
                , mBss.His_TicketOut.Val
                ,mBss.GetRemainRuntime()
        };
        UpdateView();
    }