void Start() { RunTimeData = new CharacterRunTimeData(); RunTimeData.SetData(Property, transform); nowAction = new OrcIdle(); nowAction.SetManager(this); }
void Start() { tmpTime = 0; fsmManager = new FsmManager((byte)AnimalState.MaxValue); Animator tmpAnimator = transform.GetComponent <Animator>(); FsmBase tmpIdle = new OrcIdle(tmpAnimator); fsmManager.AddState(tmpIdle);//0 FsmBase tmpAttack1 = new OrcAttack1(tmpAnimator); fsmManager.AddState(tmpAttack1);//1 FsmBase tmpAttack2 = new OrcAttack2(tmpAnimator); fsmManager.AddState(tmpAttack2);//2 FsmBase tmpAttack3 = new OrcAttack3(tmpAnimator); fsmManager.AddState(tmpAttack3);//3 FsmBase tmpAttack4 = new OrcAttack4(tmpAnimator); fsmManager.AddState(tmpAttack4);//4 FsmBase tmpAttack5 = new OrcAttack5(tmpAnimator); fsmManager.AddState(tmpAttack5);//5 FsmBase tmpDeath = new OrcDeath(tmpAnimator); fsmManager.AddState(tmpDeath);//6 FsmBase tmpRun = new OrcRun(tmpAnimator); fsmManager.AddState(tmpRun);//7 FsmBase tmpLeft = new OrcLeft(tmpAnimator); fsmManager.AddState(tmpLeft);//8 FsmBase tmpRight = new OrcRight(tmpAnimator); fsmManager.AddState(tmpRight);//9 }