Exemple #1
0
 public NormalState(EnemyInformation Info) : base(Info)
 {
     enemyAction = ActionPattern.LOOK;
     nextState   = this;
     enemyInfo.animator.SetFloat("speed", 0f);
     enemyInfo.animator.Play("Idle");
     targetPosition = enemyInfo.transform.position;
 }
Exemple #2
0
 public AnomalyState(EnemyInformation Info) : base(Info)
 {
     nextState   = this;
     timeCounter = Time.time;
     enemyInfo.animator.SetFloat("speed", 0f);
     if (enemyInfo.pushForce_y > 0f)
     {
         standup = true;
     }
 }
Exemple #3
0
 public void Prepare(PlayerController p, CaptainEnemy cap, EnemyData data)
 {
     animator             = GetComponent <Animator> ();
     player               = p;
     captain              = cap;
     characterController_ = GetComponent <CharacterController> ();
     //collision = GetComponentInChildren<AbeCollision> ();
     enemyInfo               = new EnemyInformation(animator, player, transform);
     enemyInfo.hp            = data.Hp;
     enemyInfo.attack        = data.attack;
     enemyInfo.moveSpeed     = data.speed;
     enemyInfo.range         = data.range;
     nowState                = new NormalState(enemyInfo);
     nowState.targetPosition = transform.position;
 }
Exemple #4
0
 public DeadState(EnemyInformation Info) : base(Info)
 {
     nextState   = this;
     timeCounter = Time.time;
 }
Exemple #5
0
 public ArtificialIntelligenceStage(EnemyInformation Info)
 {
     enemyInfo = Info;
 }