Пример #1
0
	public override bool MoveToDistance(Vector3 position,float speed)
	{
		beginPosition = hero.Position;
		action.beginPosition = beginPosition;
		action.endPosition = endPosition;
		action.Active();
		return true;
	}
Пример #2
0
    /// <summary>
    /// 激活行为.
    /// </summary>
    public override void Active()
    {
        isFinish      = false;
        beginPosition = hero.Position;
        if (null == target)
        {
            isFinish = true;
            return;
        }
        if (null != target)
        {
            endPosition = target.Position;
            hasTarget   = true;
        }
        hero.property.AutoAttack = true;
        action.beginPosition     = beginPosition;
        action.endPosition       = endPosition;
        action.speed             = hero.Speed;
        action.deltaSpace        = deltaSpace;
        action.Active();

        if (!action.IsFinish())
        {
            hero.DispatchEvent(ControllerCommand.CrossFadeAnimation, hero.CharacterStateName(CharacterState.MOVE1));
            hero.Net.SendHeroMove(endPosition);
        }
        //hero.DispatchEvent(ControllerCommand.CrossFadeAnimation, hero.CharacterStateName(CharacterState.MOVE1));
        //hero.Net.SendHeroMove(endPosition);
    }
Пример #3
0
 public override bool MoveToDistance(Vector3 position, float speed)
 {
     actionMove.endPosition = position;
     actionMove.speed       = speed;
     actionMove.Active();
     CheckShendPos(position);
     return(true);
 }
Пример #4
0
 /// <summary>
 /// 激活行为.
 /// </summary>
 public override void Active()
 {
     isFinish      = false;
     beginPosition = hero.Position;
     if (null == targetHero)
     {
         isFinish = true;
         return;
     }
     endPosition          = targetHero.Position;
     action.beginPosition = beginPosition;
     action.endPosition   = endPosition;
     action.speed         = speed;
     action.isLock        = isLock;
     action.deltaSpace    = deltaSpace;
     action.Active();
     hero.DispatchEvent(ControllerCommand.CrossFadeAnimation, hero.CharacterStateName(CharacterState.MOVE1));
     if (hero.property.isMainHero)
     {
         hero.Net.SendHeroMove(endPosition);
     }
 }