/// <summary> /// /// </summary> /// <param name="gameTime"></param> public void Update(GameTime gameTime) { Timers.inst.Update(gameTime); TweenManager.Update(gameTime); HandleInputCapturer(); HandleKeyEvents(); HandleMouseEvents(); if (_focused is InputTextField) { HandleTextInput(); } _tempDelegate = beforeUpdate; beforeUpdate = null; //允许beforeUpdate里再次Add,这里没有做死锁检查 while (_tempDelegate != null) { _tempDelegate.Invoke(); _tempDelegate = beforeUpdate; beforeUpdate = null; } _tempDelegate = null; Update(); if (afterUpdate != null) { afterUpdate.Invoke(); } afterUpdate = null; }
void Update() { TweenManager.Update(); }
public void OnUpdate() { TweenManager.Update(); }