예제 #1
0
    // Use this for initialization
    void Start()
    {
        moveShip = this;

        playerAnimator = GetComponent <Animator>();

        gameController = GameObject.Find("GameController").GetComponent <GameController>();
    }
예제 #2
0
    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;
    }
예제 #3
0
 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);
    }
예제 #5
0
    void Awake()
    {
        Reset();

        moveShip = GameObject.Find("shipMesh").GetComponent<MoveShip>();
    }
예제 #6
0
 private void Start()
 {
     _moveShip = GameObject.FindGameObjectWithTag("Ship").GetComponent <MoveShip>();
 }