protected void Awake() { audioManager = FindObjectOfType <AudioManager>(); walkMovement = FindObjectOfType <WalkMovement>(); enemy = FindObjectOfType <HurtEnemyOnContact>(); healthManager = FindObjectOfType <HealthManager>(); attackMovement = FindObjectOfType <AttackMovement>(); screenShake = FindObjectOfType <ScreenShake>(); }
protected void Awake() { wanderWalkController = GetComponent <WanderWalkController>(); hurtPlayerOnContact = GetComponent <HurtPlayerOnContact>(); animator = GetComponent <Animator>(); audioManager = FindObjectOfType <AudioManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); enemyHealthBar = GetComponent <EnemyHealthBar>(); deathCollider.enabled = false; }
protected void Awake() { wanderWalkController = GetComponent <WanderWalkController>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); hurtPlayerOnContact = GetComponentInChildren <HurtPlayerOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); floorDetector = FindObjectOfType <FloorDetector>(); healthBarCanvas = GetComponentInChildren <Canvas>(); animator = GetComponent <Animator>(); myCollider = GetComponent <Collider2D>(); audioManager = FindObjectOfType <AudioManager>(); }
protected void Awake() { playerController = FindObjectOfType <PlayerController>(); animator = GetComponent <Animator>(); myBody = GetComponent <Rigidbody2D>(); playerBody = playerController.GetComponent <Rigidbody2D>(); healthBar = GetComponentInChildren <Canvas>().transform; enemyHealthManager = GetComponent <EnemyHealthManager>(); collider = GetComponent <Collider2D>(); audioManager = FindObjectOfType <AudioManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); }
protected void Awake() { enemyHealthBar = GetComponent <EnemyHealthBar>(); playerController = GetComponent <PlayerController>(); animator = GetComponent <Animator>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); audioManager = FindObjectOfType <AudioManager>(); floorDetector = FindObjectOfType <FloorDetector>(); wanderWalkController = GetComponent <WanderWalkController>(); hurtPlayerOnContact = GetComponent <HurtPlayerOnContact>(); }
protected void Awake() { animator = GetComponent <Animator>(); playerController = FindObjectOfType <PlayerController>(); rightArmMovement = GetComponent <RightArmMovement>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); audioManager = FindObjectOfType <AudioManager>(); healthBar = GetComponent <EnemyHealthBar>(); playerBounds = playerController.GetComponent <Collider2D>().bounds.size.y; deathCollider.enabled = false; }
protected void Awake() { turnAround = GetComponent <TurnAround>(); audioManager = FindObjectOfType <AudioManager>(); screenShake = FindObjectOfType <ScreenShake>(); animator = GetComponent <Animator>(); floorDetector = GetComponent <FloorDetector>(); hurtEnemyOnContact = FindObjectOfType <HurtEnemyOnContact>(); walkMovement = GetComponent <WalkMovement>(); player = GetComponent <PlayerController>(); AttackMovementEnabled = true; attackTrigger.enabled = false; }
protected void Awake() { myBody = GetComponent <Rigidbody2D>(); playerController = FindObjectOfType <PlayerController>(); myCollider = GetComponent <Collider2D>(); enemyYBounds = myCollider.bounds.size.y; characterXBounds = playerController.GetComponent <Collider2D>().bounds.size.x + attackRange; animator = GetComponentInChildren <Animator>(); healthBarCanvas = GetComponentInChildren <Canvas>(); enemy = GetComponent <HurtEnemyOnContact>(); floorDetector = FindObjectOfType <FloorDetector>(); hurtPlayerOnContact = GetComponent <HurtPlayerOnContact>(); }
protected void Awake() { audioManager = FindObjectOfType <AudioManager>(); animator = GetComponent <Animator>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); screenShake = FindObjectOfType <ScreenShake>(); floorDetector = FindObjectOfType <FloorDetector>(); hurtPlayerOnContact = FindObjectOfType <HurtPlayerOnContact>(); rotateEnemy = GetComponent <RotateEnemy>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); myCollider = GetComponent <Collider2D>(); healthManager = FindObjectOfType <HealthManager>(); }
protected void Awake() { laserArray = new GameObject[5]; playOnce = new bool[5]; wanderWalkController = GetComponent <WanderWalkController>(); hurtPlayerOnContact = GetComponent <HurtPlayerOnContact>(); animator = GetComponent <Animator>(); playerController = FindObjectOfType <PlayerController>(); laserController = FindObjectOfType <LaserController>(); audioManager = FindObjectOfType <AudioManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); direction = -1; }
void Start() { player = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); knockbackCount = 0; slidingCounter = -1; anim.SetBool("Attack1", false); anim.SetBool("Attack2", false); anim.SetBool("Attack3", false); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); }
protected void Awake() { animator = GetComponent <Animator>(); startPosition = transform.position; playerController = FindObjectOfType <PlayerController>(); enterTerritory = FindObjectOfType <EnterTerritory>(); startOrthographicSize = mainCamera.orthographicSize; cameraFollow = FindObjectOfType <CameraFollow>(); myBody = GetComponent <Rigidbody2D>(); audioManager = FindObjectOfType <AudioManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); canvas = healthBar.GetComponent <Canvas>(); screenShake = FindObjectOfType <ScreenShake>(); }
protected void Awake() { wanderWalkController = GetComponent <WanderWalkController>(); hurtPlayerOnContact = GetComponent <HurtPlayerOnContact>(); animator = GetComponent <Animator>(); player = FindObjectOfType <PlayerController>(); audioManager = FindObjectOfType <AudioManager>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); sprite = GetComponent <SpriteRenderer>(); myCollider = GetComponent <Collider2D>(); mybody = GetComponent <Rigidbody2D>(); playerYBounds = player.GetComponent <Collider2D>().bounds.size.y * 0.3f; playerYPos = player.transform.position.y; }
protected void Awake() { wanderWalkController = GetComponent <WanderWalkController>(); hurtEnemyOnContact = GetComponent <HurtEnemyOnContact>(); hurtPlayerOnContact = GetComponentInChildren <HurtPlayerOnContact>(); enemyHealthManager = GetComponent <EnemyHealthManager>(); floorDetector = FindObjectOfType <FloorDetector>(); animator = GetComponent <Animator>(); myCollider = GetComponent <Collider2D>(); playerController = FindObjectOfType <PlayerController>(); myBody = GetComponent <Rigidbody2D>(); trollYBounds = GetComponent <Collider2D>().bounds.size.y; audioManager = FindObjectOfType <AudioManager>(); enemyHealthBar = GetComponent <EnemyHealthBar>(); deathCollider.enabled = false; }