Esempio n. 1
0
 public void BeginTimer()
 {
     if (mTimerUpdate == null)
     {
         mTimerUpdate = Timer_Logic.SetTimer(TimerUpdate, 0, null);
     }
 }
Esempio n. 2
0
 public void Play()
 {
     if (IsOver || mTimerLogic == null)
     {
         IsOver      = false;
         mTimerLogic = Timer_Logic.SetTimer(PlayFun, 0, null);
     }
 }
Esempio n. 3
0
 void Start()
 {
     mHostPeople = this.GetComponent <FBasePeople>();
     if (mHostPeople.transform.parent == null)
     {
         Debug.LogError("FMotionGhost必须在一个父节点下");
     }
     mLogicEvent = Timer_Logic.SetTimer(UpdateGhost, 1, this);
 }
Esempio n. 4
0
        public void OnPointerDown(PointerEventData eventData)
        {
            IsSend = false;
            if (!mIsPress)
            {
                return;
            }

            StopTimer();
            mTimer = Timer_Logic.SetTimer(Press, mTime, this);
        }
Esempio n. 5
0
        public static void SwitchSprite(this Image sp, string name)
        {
            var spr = SceneManager.instance.CreateSprite(name);

            if (spr == null)
            {
                if (FEngine.mBackDown != null)
                {
                    if (name.Contains("UI2/BarracksSmall/"))
                    {
                        sp.sprite = SceneManager.instance.CreateSprite("Texture/null_BarracksSmall");
                    }
                    else if (name.Contains("UI2/Technology/"))
                    {
                        sp.sprite = SceneManager.instance.CreateSprite("Texture/Technology_0");
                        if (mMaxSpeed < 10)
                        {
                            mMaxSpeed++;
                            int idex  = 0;
                            var timer = Timer_Logic.SetTimer((t) =>
                            {
                                if (sp != null)
                                {
                                    idex++;
                                    if (idex > 2)
                                    {
                                        idex = 0;
                                    }
                                    sp.sprite = SceneManager.instance.CreateSprite("Texture/Technology_" + idex.ToString());
                                    return(0.3f);
                                }
                                else
                                {
                                    mMaxSpeed--;
                                    return(-1);
                                }
                            }, 1, null);
                        }
                    }
                    else
                    {
                        sp.sprite = SceneManager.instance.CreateSprite("Texture/null_null");
                    }
                }
            }
            else
            {
                sp.sprite = spr;
            }
        }
Esempio n. 6
0
 protected override void OnInit()
 {
     Timer_Logic.SetTimer(DelayUpdate, 0, null);
 }