示例#1
0
 public override void BeHited(Actor srcActor, bool isBack, bool isFly, float animGauge)
 {
     base.BeHited(srcActor, isBack, isFly, animGauge);
     {
         SpasticityAction action = ActionControl.AddAction(ActorAction.ENType.enSpasticityAction) as SpasticityAction;
         if (null != action)
         {
             action.LastTime = 0.50f;
         }
     }
 }
示例#2
0
    //初始化同伴的位置
    public void InitPartnerPosition()
    {
        if (IsDead)
        {
            return;
        }
        Vector3 pos = ActorManager.Singleton.MainActor.MainPos + ActorManager.Singleton.MainActor.MainObj.transform.forward * -1;

        if (SM.RandomRoomLevel.Singleton.QuickFindPath(pos, ActorManager.Singleton.MainActor.MainPos))
        {
            ForceMoveToPosition(pos);
            ActionControl.AddAction(ActorAction.ENType.enStandAction);
        }
    }
示例#3
0
    public void ActorEnter(Vector3 pos, Vector3 forward, int targetID, Vector3 targetPos, bool isAttack)
    {
        IsActorExit = false;
        //隐藏collider
        EnableCollider(false);
        //设置位置
        UnhideMe(pos);
        //设置朝向
        MainObj.transform.forward = forward;

        IsMoveAfterSwitch = false;
        if (targetPos != Vector3.zero)
        {//move
            IsMoveAfterSwitch = true;
            CurrentCmd        = new Player.Cmd(targetPos);
        }
        else if (isAttack)
        {//attack
            FireNormalSkill();
        }
        //初始化技能UI
        OnInitSkillBag(true);
        //通知headUI
        NotifyChanged((int)Actor.ENPropertyChanged.enMainHead, EnMainHeadType.enHpChanged);
        NotifyChanged((int)Actor.ENPropertyChanged.enMainHead, EnMainHeadType.enSwitchActor);

        //target
        TargetManager.CurrentTarget = ActorManager.Singleton.Lookup(targetID);
        //入场action
        ActionControl.AddAction(ActorAction.ENType.enActorEnterAction);


        //remove buff
        if (CurrentTableInfo.SwitchBuffIDList.Count != 0)
        {
            List <float> paramList = new List <float>(1 + CurrentTableInfo.SwitchBuffIDList.Count);
            paramList.Add((float)ResultRemoveBuff.ENRemoveBuffType.enBuffID);
            paramList.AddRange(CurrentTableInfo.SwitchBuffIDList);

            IResult r = BattleFactory.Singleton.CreateResult(ENResult.RemoveBuff, ID, ID, 0, 0, paramList.ToArray());
            if (r != null)
            {
                r.ResultExpr(paramList.ToArray());
                BattleFactory.Singleton.DispatchResult(r);
            }
        }
        //camera
        MainGame.Singleton.MainCamera.MoveAtOnce(this);
    }
示例#4
0
    public bool SwitchActorEnter(Vector3 pos, Vector3 forward)
    {
        ActorAction action = ActionControl.AddAction(ActorAction.ENType.enActorEnterAction);

        if (action != null)
        {
            action.IsSyncPosition = true;
            action.SyncPosition   = pos;
            //隐藏collider
            EnableCollider(false);
            //设置朝向
            MainObj.transform.forward = forward;
            IsActorExit = false;
            return(true);
        }
        return(false);
    }
示例#5
0
 public override void DefaultAction()
 {
     //StateControl.ChangeState<StandState>();
     ActionControl.AddAction(ActorAction.ENType.enStandAction);
 }
示例#6
0
 public override void DefaultAction()
 {
     ActionControl.AddAction(ActorAction.ENType.enStandAction);
 }