Exemple #1
0
 public virtual void SetCurrentNames(CSMotion motion)
 {
     if (Animation != null)
     {
         Animation.SetCurrentNames(motion);
     }
 }
Exemple #2
0
 public virtual void SetStopFrameType(CSMotion motion, EActionStopFrameType stopType)
 {
     if (Animation != null)
     {
         Animation.SetStopFrameType(motion, stopType);
     }
 }
Exemple #3
0
    /// <summary>
    /// 添加一个模型的加载数据
    /// 在结束解析的时候,开始加载
    /// </summary>
    /// <param name="model"></param>
    /// <param name="structure"></param>
    /// <param name="motion"></param>
    /// <param name="direction"></param>
    /// <param name="resourceType"></param>
    /// <param name="resourceAssistType"></param>
    protected void Load(uint model, EModelStructure structure, CSMotion motion, CSDirection direction, EResourceType resourceType, EResourceAssistType resourceAssistType)
    {
        //加载的模型不存在
        if (model == 0)
        {
            //如果要加载身体模型不存在,那么要注意清理其他的组件
            if (structure == EModelStructure.Body)
            {
            }
            return;
        }

        long key = GetKey((int)model, (int)motion, (int)direction, (int)structure);
        ModelComponentLoadData data = null;

        if (!ModelComponentLoadedCacheDic.TryGetValue(key, out data))
        {
            data = new T();
            ModelComponentLoadedCacheDic[key] = data;
        }
        data.Model              = model;
        data.Key                = key;
        data.Structure          = structure;
        data.ResourceType       = resourceType;
        data.ResourceAssistType = resourceAssistType;

        WaitLoadComponentKey.Add(data);
    }
Exemple #4
0
 public bool EndOfAction(string motion, CSMotion m)
 {
     if (Animation != null)
     {
         return(Animation.EndOfAction(motion, m));
     }
     return(false);
 }
    public override bool SetAction(CSMotion motion, bool IsTrigger = false, CSMotion triggerRevertMotion = CSMotion.Stand, bool IsForceSet = false)
    {
        if (!base.SetAction(motion, IsTrigger, triggerRevertMotion, IsForceSet))
        {
            return(false);
        }
        if (AvaterAnimator == null)
        {
            return(false);
        }


        return(true);
    }
Exemple #6
0
 public virtual bool PlayAction(CSMotion motion, float normalizedTime)
 {
     return(true);
 }
Exemple #7
0
 /// <summary>
 /// 设置模型动作
 /// </summary>
 /// <param name="motion">模型动作</param>
 /// <param name="IsTrigger">模型动作设置状态(如果为true,那么该状态是触发型,触发完成后,会回归到其他状态上,如果为false,直接进入一个持续状态)</param>
 /// <param name="IsForceSet"></param>
 public virtual bool SetAction(CSMotion motion, bool IsTrigger = false, CSMotion triggerRevertMotion = CSMotion.Stand, bool IsForceSet = false)
 {
     return(true);
 }
Exemple #8
0
        public void SendCSMotion(CSMotion csmotion, Action <SCEmptyMotion> ResponseSCEmptyMotionCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSMotion> ();

            ProtoSendMethod.BusinessRequest <SCEmptyMotion>(csmotion, opCodeType, ResponseSCEmptyMotionCallBack, errorCallBack, isShowDefaultTip);
        }