Example #1
0
 void Start()
 {
     audioManager = AudioManager.instance;
     Assert.IsNotNull(audioManager);
     playerLives = PlayerLives.instance;
     Assert.IsNotNull(playerLives);
     playerStateMachine = GameObject.Find("PlayerManager").gameObject.GetComponent <PlayerStateMachine>();
     Assert.IsNotNull(playerStateMachine);
     weaponManager = GameObject.Find("WeaponUIManager").gameObject.GetComponent <WeaponManager>();
     Assert.IsNotNull(weaponManager);
 }
Example #2
0
        private void Awake()
        {
            //singleton
            if (instance != null)
            {
                if (instance != this)
                {
                    Destroy(gameObject);
                }
            }
            else
            {
                instance = this;
                DontDestroyOnLoad(this);
            }

            audioManager = AudioManager.instance;
        }