Exemple #1
0
 /// <summary>
 /// 激活行为.
 /// </summary>
 public override void Active()
 {
     base.Active();
     beginPosition = hero.Position;
     //endPosition = KingSoftCommonFunction.NearPosition(endPosition);
     action.beginPosition = beginPosition;
     action.endPosition   = endPosition;
     action.height        = height;
     action.speed         = speed;
     action.isLock        = isLock;
     action.Active();
     isFinish = false;
     if (hero.property.isMainHero)
     {
         hero.DispatchEvent(ControllerCommand.HERO_MOVE);
     }
 }
 /// <summary>
 /// 激活行为.
 /// </summary>
 public override void Active()
 {
     base.Active();
     hero.AnimCmp.StopAnim();
     hero.DispatchEvent(ControllerCommand.CrossFadeAnimation, hitAnim, AMIN_MODEL.ONCE, false);
     isFinish = false;
     if (!hero.property.isMainHero)
     {
         if (hero.Position != hero.property.finalDestination)
         {
             action = new ActionMoveDirect(hero);
             action.beginPosition = hero.Position;
             action.endPosition   = hero.property.finalDestination;
             action.height        = 0f;
             action.speed         = 0.5f;
             action.Active();
         }
     }
 }