示例#1
0
    public void InitAction()
    {
        DBEntiny db = GameDataManage.Instance.GetDBEntiny(Id);

        if (db == null)
        {
            return;
        }
        mActorAnimator = GTTools.LoadAnimator(Obj, db.Ctrl);
        if (mActorAnimator != null)
        {
            mActorAnimator.enabled         = true;
            mActorAnimator.applyRootMotion = true;
            mActorAnimator.cullingMode     = AnimatorCullingMode.CullUpdateTransforms;
            this.mActorAction = new ZTAction(mActorAnimator);
        }
    }
示例#2
0
    protected void InitAction()
    {
        //DBEntiny db = ZTConfig.Instance.GetDBEntiny(Id);
        string ctrlstr = "Model/Actor/" + this.Id + "_Ctrl";

        //string ctrlstr = "Model/Actor/50006_Ctrl";
        //if (db == null)
        //{
        //    return;
        //}
        //mActorAnimator = GTTools.LoadAnimator(Obj, db.Ctrl);
        mActorAnimator = GTTools.LoadAnimator(Obj, ctrlstr);
        if (mActorAnimator != null)
        {
            mActorAnimator.enabled         = true;
            mActorAnimator.applyRootMotion = true;
            mActorAnimator.cullingMode     = AnimatorCullingMode.CullUpdateTransforms;
            this.mActorAction = new ZTAction(mActorAnimator);
        }
    }