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>(); }
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); }
// 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>(); }
public void Awake() { aggro = GetComponent <EnemyAggro>(); }