public void Play(ActionStateProto action) { if (action.slotList.Count == 0) return; AnimSlotProto animSlot = action.slotList[UnityEngine.Random.Range(0, action.slotList.Count - 1)]; float btime = 0f;//action.BlendTime * 0.001f; float ntime = animSlot.startTime; float ctime = action.stateTime / (animSlot.endTime - animSlot.startTime); this.GetGameUnit().CrossFade(animSlot.animName, btime, ntime); }
public override void Update(float deltaTime) { if (actionState == EActionState.stop) return; mCurTime += deltaTime; if (mActionChange) { mActiveAction = mNextAction; _Reset(); mActionChange = false; mNextAction = null; } if (mActiveAction != null) { _TickAction(mCurTime); } }
public ActionStateProto ConvertToProto() { ActionStateProto pd = new ActionStateProto(); return pd; }
public void Parse(ActionStateProto proto) { }