Пример #1
0
 private void Awake()
 {
     //I don't need these, but the animation acts weird without disabling these.
     animator = GetComponent <Animator>();
     movement = GetComponent <EnemyAggro>();
     attack   = GetComponent <EnemyShoot>();
 }
Пример #2
0
 private void Awake()
 {
     enemyAggro        = GetComponent <EnemyAggro>();
     enemyAggro.Aggro += AggroDetection;
     //this is so they don't get to shoot you the instant they see you.
     attackTimer = Random.Range(-attackRate * attackVariance, 0);
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     rb2d               = GetComponent <Rigidbody2D>();
     enemyAggro         = aggroCollider.GetComponent <EnemyAggro>();
     rightChecker       = sideCheckerRight.GetComponent <SideCheckerRight>();
     leftChecker        = sideCheckerLeft.GetComponent <SideCheckerLeft>();
     groundChecker      = groundCheckBox.GetComponent <GroundChecker>();
     avoidPlayerChecker = avoidPlayerCapsule.GetComponent <EnemyAvoidPlayerBlock>();
     thisEnemy          = enemy.GetComponent <Enemy>();
     enemyRange         = attackPoint.GetComponent <EnemyRangeCheck>();
 }
Пример #4
0
 public void Awake()
 {
     aggro = GetComponent <EnemyAggro>();
 }