Example #1
0
 protected virtual void Setting()
 {
     typeRenderer             = GetComponentInChildren <SkinnedMeshRenderer>();
     animator                 = GetComponent <Animator>();
     attackArea               = GetComponentInChildren <EnemyAttackArea>();
     attackArea.Power         = (int)Power;
     hitArea                  = GetComponentInChildren <EnemyHitArea>();
     hitArea.enemy            = this;
     rigidbodyComponent       = GetComponent <Rigidbody>();
     TargetFindCollider       = transform.GetComponentInChildren <EnemyFindCollider>();
     TargetFindCollider.enemy = this;
     isAttackable             = new bool[2] {
         true, true
     };
     battleAI = new BattleAI(this);
     AITimer  = battleAI.pathFindTimer;
     ChangeState(EnemyStateType.Idle);
 }
Example #2
0
 private void Start()
 {
     AttackArea         = GetComponent <EnemyAttackArea>();
     rigidbodyComponent = GetComponent <Rigidbody>();
     gameObject.SetActive(false);
 }