Exemplo n.º 1
0
    override protected bool InitActivityParam()
    {
        SceneActivityParam param = ActivityManager.Instance.Param;

        if (param == null || param.mSceneId != mSubRes.resID)
        {
            return(false);
        }

        uint ms = (uint)((param.mOverTime * 1000) - System.DateTime.Now.TimeOfDay.TotalMilliseconds);

        if (ms < mSubRes.mReadyTime)
        {
            return(false);
        }

        if (ms < mSubRes.mReadyTime + mSubRes.mLogicTime)
        {
            mMaxLogicTime = ms - mSubRes.mReadyTime;
        }

        ActivityManager.Instance.Param = null;

        return(true);
    }
Exemplo n.º 2
0
    override protected bool InitActivityParam()
    {
        SceneActivityParam param = ActivityManager.Instance.Param;

        if (param == null || param.mSceneId != mSubRes.resID)
        {
            return(false);
        }

        System.DateTime nowTime = System.DateTime.Now;

        uint startMS = (uint)(nowTime.TimeOfDay.TotalMilliseconds - (param.mStartTime * 1000));

        if (startMS >= (GameConfig.ZhaoCaiMaoRequestTime + 5000))
        {
            RequestPartner();
        }
        else
        {
            mRequestTimer = (int)(GameConfig.ZhaoCaiMaoRequestTime + 5000 - startMS);
        }

        if (startMS >= GameConfig.ZhaoCaiMaoReadyTime)
        {
            mMaxReadyTime = 3000;
            mShowAlert    = false;
        }
        else
        {
            mMaxReadyTime = GameConfig.ZhaoCaiMaoReadyTime - startMS;
            if (mMaxReadyTime < 3000)
            {
                mMaxReadyTime = 3000;
            }

            mShowAlert = true;
        }

        uint endMS = (uint)((param.mOverTime * 1000) - nowTime.TimeOfDay.TotalMilliseconds);

        if (endMS < mMaxReadyTime)
        {
            ActivityManager.Instance.Param = null;
            return(false);
        }

        if (endMS < (mSubRes.mLogicTime + mMaxReadyTime))
        {
            mMaxLogicTime = endMS - mMaxReadyTime;
        }

        ActivityManager.Instance.Param = null;

        return(true);
    }
Exemplo n.º 3
0
 public void Clear()
 {
     mParam = null;
 }