Beispiel #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();
        }
    }
Beispiel #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);
 }
Beispiel #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();
     }
 }