Exemple #1
0
 // 状态处理
 public void Process(EntityParent theOwner, params Object[] args)
 {
     // 播放 idle 动画
     if (theOwner == null)
     {
         return;
     }
     if (theOwner.CanMove() && theOwner.motor != null)
     {
         theOwner.motor.enableStick = true;
     }
     MogoMotor theMotor = theOwner.motor;
     if (theOwner is EntityMonster)
     {
         theOwner.ApplyRootMotion(false);
     }
     // 设置 速度
     if (theMotor != null)
     {
         theMotor.SetSpeed(0.0f);
     }
     //theMotor.SetExrtaSpeed(0f);
     if (theOwner.charging)
     {
         return;
     }
     if (theOwner is EntityPlayer && MogoWorld.inCity)
     {
         theOwner.SetAction(-1);
     }
     else
     {
         theOwner.SetAction(0);
     }
     theOwner.SetActionByStateFlagInIdleState();
 }