예제 #1
0
파일: StayAction.cs 프로젝트: Kinderril/p3
 public override void End(EndCause cause,string msg = " end action ")
 {
     if (timer != null)
     {
         timer.Stop(owner != null && !owner.IsDead);
     }
     base.End(cause);
 }
예제 #2
0
 public override void End(EndCause cause,string msg = " end action ")
 {
     owner.OnShootEnd -= OnShootEnd;
     ((AgentControl)owner.Control).Stop(false);
     base.End(cause,msg);
 }
예제 #3
0
파일: BaseMonster.cs 프로젝트: Kinderril/p3
    private void EndAttack(EndCause obj)
    {
        switch (obj)
        {
            case EndCause.no:
                StartAttack(false);
                break;
            case EndCause.runAway:

                break;
        }
    }
예제 #4
0
파일: BaseMonster.cs 프로젝트: Kinderril/p3
    private void EndComeHome(EndCause byHit)
    {
        isHome = true;
//        if (aiStatus == AIStatus.returnHome)
//            return;
        StartWalk(byHit);
        
    }
예제 #5
0
파일: BaseMonster.cs 프로젝트: Kinderril/p3
 private void StartWalk(EndCause byHit)
 {
     aiStatus = AIStatus.walk;
     int coef = 60;
     if (Action is MoveAction)
     {
         coef = 30;
     }
     var shalgo = UnityEngine.Random.Range(0, 100) < coef;
     if (shalgo)
     {
         var randPos = new Vector3(bornPosition.x + UnityEngine.Random.Range(-isHomeDist, isHomeDist),
             bornPosition.y,
             bornPosition.z + UnityEngine.Random.Range(-isHomeDist, isHomeDist));
         Action = new MoveAction(this, randPos, StartWalk);
     }
     else
     {
         Action = new StayAction(this, StartWalk);
     }
     
 }
예제 #6
0
파일: BaseAction.cs 프로젝트: Kinderril/p3
 public virtual void End(EndCause cause = EndCause.no, string msg = " end action ")
 {
     //Debug.Log(msg);
     if (owner != null && endCallback != null && !owner.IsDead)
         endCallback(cause);
 }