Esempio n. 1
0
        public void Setup()
        {
            ProgramManager.singleton = this;
            this.vsync = QualitySettings.vSyncCount;
            Events.Register("On Resolution Change");
            Events.Add("On Editor Update", this.UpdateEffects);
            Events.Add("On Enter Play", this.UpdateEffects);
            Application.targetFrameRate = this.maxFPS;
            var screen = Screen.currentResolution;

            this.resolution = new int[2] {
                Screen.width, Screen.height
            };
            Locate.GetSceneComponents <Persistent>().Where(x => x.activateOnLoad).ToList().ForEach(x => x.gameObject.SetActive(true));
            this.DetectResolution();
        }
Esempio n. 2
0
 public static ProgramManager Get()
 {
     ProgramManager.singleton = ProgramManager.singleton ?? Singleton.Get <ProgramManager>();
     return(ProgramManager.singleton);
 }