示例#1
0
    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);
    }
示例#2
0
    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);
        }
    }
示例#3
0
    public ActionStateProto ConvertToProto()
    {
        ActionStateProto pd = new ActionStateProto();

        return pd;
    }
示例#4
0
    public void Parse(ActionStateProto proto)
    {

    }