void Start() { _playerTransform = GameObject.FindGameObjectWithTag("Player").transform; _npcAnimator = GetComponent <Animator>(); _npcIsAlive = GetComponent <IsAliveComponent>(); _npcSprite = GetComponent <SpriteRenderer>(); }
void Start() { _healthBarController = GameObject.Find("HP Bar").GetComponent <HealthBarController>(); _currentActorAnimator = GetComponent <Animator>(); _isAliveComponent = GetComponent <IsAliveComponent>(); _currentTransform = GetComponent <Transform>(); _playerStatsController = GetComponent <ActorStatsController>(); }
void Start() { _isAliveComponent = GetComponent <IsAliveComponent>(); _playerAnimator = GetComponent <Animator>(); playerBody2D = GetComponent <Rigidbody2D>(); _playerGroundSensor = transform.Find("Ground Sensor").GetComponent <GroundSensor>(); _playerObjectLayer = LayerMask.NameToLayer("Player"); _enemyObjectLayer = LayerMask.NameToLayer("Enemy"); _specialPlatformLayer = LayerMask.NameToLayer("Special Platform"); }
private void Start() { firePoint.Rotate(0f, 180f, 0f); // Для того, чтобы босс стрелял в нужную сторону, так как трансформ всегда изначально повёрнут вправо. Эта строка разворачивает его влево // Эта переменная не разрешит боссу стрелять если он валяется раненный _bossController = GameObject.Find("Boss").GetComponent <BossController>(); _playerIsAliveComponent = GameObject.FindGameObjectWithTag("Player").GetComponent <IsAliveComponent>(); _bossIsAliveComponent = GameObject.FindGameObjectWithTag("Boss").GetComponent <IsAliveComponent>(); _bossAnimator = GameObject.Find("Boss").GetComponent <Animator>(); _bossHealthComponent = GetComponent <HealthComponent>(); _bossSprite = GetComponent <SpriteRenderer>(); }
void Start() { _playerEnterSensor = GameObject.FindGameObjectWithTag("Boss Player Enter Sensor").gameObject; _playerTransform = GameObject.FindGameObjectWithTag("Player").transform; _bossLastDialogueObj = GameObject.Find("Boss Dialogue 2").gameObject; _bossCollider = GetComponent <Collider2D>(); _bossRigidBody = GetComponent <Rigidbody2D>(); _bossHealthComponent = GetComponent <HealthComponent>(); _bossIsAliveComponent = GetComponent <IsAliveComponent>(); _bossAnimator = GetComponent <Animator>(); _bossSprite = GetComponent <SpriteRenderer>(); _finalBossDialogueTrigger = _bossLastDialogueObj.GetComponent <Collider2D>(); _playerIsAliveComponent = _playerTransform.GetComponent <IsAliveComponent>(); _bossHealthComponent.isItBoss = true; }
void Start() { _isAliveComponent = GetComponent <IsAliveComponent>(); _enemyCombatAnimator = GetComponent <Animator>(); _actorStatsController = GetComponent <ActorStatsController>(); }
void Start() { _enemyAttack = GetComponentInParent <EnemyAttack>(); _isAliveComponent = GetComponentInParent <IsAliveComponent>(); }
void Start() { _playerCombatAnimator = GetComponent <Animator>(); _IsAliveComponent = GetComponent <IsAliveComponent>(); _actorStatsController = GetComponent <ActorStatsController>(); }