Exemple #1
0
        private void DoProcessInfo()
        {
            if (Time.realtimeSinceStartup - mPlayerLastTime > mPlayerIntvlTime)
            {
                if (mPlayerInfo.Count > 0)
                {
                    FlyTextInfo info = mPlayerInfo.Dequeue();

                    ShowText(info.owner, info.text, info.flyType, info.isGood);

                    mPlayerLastTime = Time.realtimeSinceStartup;
                }
            }

            if (Time.realtimeSinceStartup - mLastTime > mIntvlTime)
            {
                if (mProcessInfo.Count > 0)
                {
                    FlyTextInfo info = mProcessInfo.Dequeue();

                    ShowText(info.owner, info.text, info.flyType, info.isGood);

                    mLastTime = Time.realtimeSinceStartup;
                }
            }
        }
Exemple #2
0
        private void AddProcessInfo(bool isPlayer, GameObject owner, string text, FlyTextType type, int isGood = 0)
        {
            FlyTextInfo info = new FlyTextInfo();

            info.owner   = owner;
            info.text    = text;
            info.flyType = type;
            info.isGood  = isGood;

            if (isPlayer)
            {
                //ShowText(info.owner, info.text, info.flyType, info.isGood);
                mPlayerInfo.Enqueue(info);
            }
            else
            {
                ShowText(info.owner, info.text, info.flyType, info.isGood);
                //mProcessInfo.Enqueue(info);
            }
        }