public void DoUpdate() { //切割时间 //lerp position and rotation //play effect //etc.. Debug.Log("DoUpdate..."); if (frameInfoList.Count > 0) { frameInfo = frameInfoList[0]; frameInfoList.RemoveAt(0); Debug.Log("DoUpdate frame " + frameInfo.frame + " t " + Time.time); } }
public virtual void DoFixedUpdate() { //TODO moveStep skillStep etc... unitFrameInfo = GenericObjectPool <UnitFrameInfo> .Get(); unitFrameInfo.frame = FrameManager.currentNetworkFrame; unitFrameInfo.canMove = canMove; unitFrameInfo.canRotate = canRotation; if (canMove) { unitFrameInfo.position = position; } if (canRotation) { unitFrameInfo.rotation = rotation; } Debug.Log("DoFixedUpdate..."); }
public void AddFrameInfo(UnitFrameInfo frameInfo) { frameInfoList.Add(frameInfo); }
public void FireUnitFrameInfo(UnitFrameInfo unitInfo) { UnitFrameView unitFrameView = sceneAssetsManager.unitFrameViewMap[unitInfo.id]; unitFrameView.AddFrameInfo(unitInfo); }
public virtual void Destroy() { unitFrameInfo = null; myInfo = null; }