// Use this for initialization void Start() { moveShip = this; playerAnimator = GetComponent <Animator>(); gameController = GameObject.Find("GameController").GetComponent <GameController>(); }
void Start() { _damageShipScript = GameManager.ShipObject.GetComponent <DamageShip>(); _lightShipScript = GameManager.ShipObject.GetComponent <LightShip>(); _moveShipScript = GameManager.ShipObject.GetComponent <MoveShip>(); _damageShipScript.ShipTakeDamageEvent += OnHealthChange; _lightShipScript.ShipUsedFlareEvent += OnFlare; _moveShipScript.ShipSoundEvent += OnNoiseChange; _originalHealthBarColor = _healthBarImage.color; }
private void Awake() { mcol = transform.GetComponentInChildren <MeshCollider>(); es = FindObjectOfType <EnemySpawner>(); ms = GetComponent <MoveShip>(); am = FindObjectOfType <AudioManager>(); sm = FindObjectOfType <ScoreManager>(); anim = GetComponent <Animator>(); cam = Camera.main; startingHealth = enemyHealth; }
private void Start() { gameManager = GameObject.FindGameObjectWithTag("GameManager"); am = gameManager.GetComponent <AudioManager>(); sm = gameManager.GetComponent <ScoreManager>(); session = gameManager.GetComponent <SessionManager>(); ms = GetComponent <MoveShip>(); cam = Camera.main; if (session.sessionRunning == false) { sm.InitializeScore(); session.sessionRunning = true; } sm.LivesUpdate(session.playerLives); }
void Awake() { Reset(); moveShip = GameObject.Find("shipMesh").GetComponent<MoveShip>(); }
private void Start() { _moveShip = GameObject.FindGameObjectWithTag("Ship").GetComponent <MoveShip>(); }