Пример #1
0
    void Start()
    {
        KilledEnemy infoKilled = Information.Instance.CheckEnemy(gameObject.name);

        if (infoKilled == null)
        {
            ObserverSoundLevel.Register(ChangeLevelSound);
        }
        else
        {
            transform.position = infoKilled.pos;
            killFromSave       = true;
            StartDeath();
        }
    }
Пример #2
0
 void Start()
 {
     ObserverHP.Register(ChangeHPRooster);
     if (!music)
     {
         ObserverSoundLevel.Register(ChangeLevelSound);
         Volume = ObserverSoundLevel.level;
     }
     else
     {
         ObserverMusicLevel.Register(ChangeLevelSound);
         Volume = ObserverMusicLevel.level;
     }
     ObserverTimeScale.Register(ChangeTimeScale);
     scale = ObserverTimeScale.level;
     ChangeHPRooster(ObserverHP.level);
 }
Пример #3
0
 void Awake()
 {
     aSource = GetComponent <AudioSource>();
     if (GameObject.Find("SettingsMenu"))
     {
         Destroy(gameObject);
     }
     else
     {
         settingsCanvas  = GetComponent <Canvas>();
         instance        = this;
         gameObject.name = "SettingsMenu";
         InformationSave.SetActive(false);
         // DontDestroyOnLoad(gameObject);
         ObserverSoundLevel.Register(ChangeLevelSound);
         ChangeLanguage();
     }
 }