public static void SlowFullRestart() { BlackScreen scene = new BlackScreen(); scene.HelperEntity.Add(new Coroutine(_SlowFullRestart(Engine.Scene is Overworld, scene))); Engine.Scene = scene; }
void Start() { reticleAnimator = GameObject.Find("Reticle").GetComponentInChildren <Animator> (); blkScreen = GameObject.Find("BlackScreen").GetComponent <BlackScreen>(); sphereScreen = GameObject.Find("/sphere"); // InsideScene = SceneManager.GetSceneByName("InsideScene"); }
public static void LateUpdate() { if (!SpecCam.show) { BlackScreen.SetActive(false); return; } if (SpecCam.mode == 0) { SpecCam.FreeCam(); } else if (SpecCam.mode == 1) { SpecCam.FPCam(); } if (Input.GetKeyUp(KeyCode.Mouse1) && ScoreBoard.gamemode != 3) { if (SpecCam.mode == 0) { SpecCam.SetFPCam(); } else { SpecCam.mode = 0; GameObject gameObject = GameObject.Find("WeaponCamera"); gameObject.GetComponent <Camera>().cullingMask = 0; } } PlayerControll.CheckVisible(); if (SpecCam.mode == 1 && SpecCam.FID >= 0) { PlayerControll.vps[SpecCam.FID] = false; PlayerControll.vp[SpecCam.FID] = false; } }
// Use this for initialization void Start() { reticleAnimator = GameObject.Find("Reticle").GetComponentInChildren <Animator> (); blkScreen = GameObject.Find("BlackScreen").GetComponent <BlackScreen>(); sphereScreen = GameObject.Find("sphere"); transform.GetChild(1).gameObject.SetActive(false); // explicitly set the menu as inactive so as to hide. }
// Start is called before the first frame update void Start() { jobList = new List <Job>(); etaClock = GameObject.Find("ETA Clock").GetComponentInChildren <TerminalMonitor>(); ship = GameObject.Find("Ship").GetComponent <Ship>(); blackScreen = GameObject.Find("Black Screen").GetComponent <BlackScreen>(); navTerm = GameObject.Find("NAVCOM_Terminal").GetComponent <Terminal>(); powerTerm = GameObject.Find("Power_Terminal").GetComponent <Terminal>(); engineTerm = GameObject.Find("Engine_Terminal").GetComponent <Terminal>(); coolingTerm = GameObject.Find("Cooling_Terminal").GetComponent <Terminal>(); // boombot = GameObject.Find("BoomBot"); //boombot.SetActive(false); jobID = new List <int>(); jobNames = new List <string>(); destinations = new List <string>(); cargoNames = new List <string>(); cargoTypes = new List <string>(); cargoValues = new List <float>(); targetDeliveryTimes = new List <float>(); jobTiers = new List <int>(); alreadyListed = new List <bool>(); GenerateJobPool(); GenerateAvailableJobs(); }
private void Awake() { if (Main == null) { Main = this; } }
private bool Initialize() { if (uiSystem != null) { var cameraHandler = new CameraHandler(); Service.Set <CameraHandler>(cameraHandler); Service.Set <LevelManager>(new LevelManager()); var screenManager = new ScreenManager(uiSystem); Service.Set <ScreenManager>(screenManager); var playerPrefHelper = new PlayerPrefHelper(); Service.Set <PlayerPrefHelper>(playerPrefHelper); var audioManager = new AudioManager(); audioManager.Initialize(); Service.Set <AudioManager>(audioManager); var blackScreen = new BlackScreen(); screenManager.AddScreen(blackScreen); isInitialized = true; } else { Debug.LogError("[Core::Initialize - GameObject uiSystem is null.]"); return(false); } return(true); }
public static void ShowScreen(ScreenType type) { Time.timeScale = 0.0f; _currentActiveScreen = _instance.GetScreen(type); _currentActiveScreen.Show(); BlackScreen.Show(); }
void Start() { GCS = GameScripts.GetComponent <GameController>(); BlackScreenRenderer = BlackScreen.GetComponent <Renderer>(); ButtonListeners(); CheatMenuStart(); }
private static IEnumerator _QuickFullRestart(bool fromOverworld, BlackScreen scene) { SaveData save = SaveData.Instance; if (save != null && save.FileSlot == patch_SaveData.LoadedModSaveDataIndex) { if (!fromOverworld) { CoreModule.Settings.QuickRestart = save.FileSlot; } save.BeforeSave(); UserIO.Save <SaveData>(SaveData.GetFilename(save.FileSlot), UserIO.Serialize(save)); patch_UserIO.ForceSerializeModSave(); if (CoreModule.Settings.SaveDataFlush ?? false) { CoreModule.Instance.ForceSaveDataFlush++; } CoreModule.Instance.SaveSettings(); } AppDomain.CurrentDomain.SetData("EverestRestart", true); scene.RunAfterRender = () => { if (Flags.IsXNA && Engine.Graphics.IsFullScreen) { Engine.SetWindowed(320 * (Settings.Instance?.WindowScale ?? 1), 180 * (Settings.Instance?.WindowScale ?? 1)); } Engine.Instance.Exit(); }; yield break; }
public GameData(GameSession activeSession, int currentLevelIndex, BlackScreen blackScreen = null) { m_levelIndex = currentLevelIndex; m_session = activeSession; m_isActiveSession = true; m_blackScreenInstance = blackScreen; }
public GameData(int indexLevel, LevelData level, PlayerCharacterData character, BlackScreen blackScreen = null) { m_levelIndex = indexLevel; m_level = level; m_characterData = character; m_isActiveSession = false; m_blackScreenInstance = blackScreen; }
private void OnTriggerEnter2D(Collider2D collision) { if (ToFloor != FloorManager.GetFloorIndex() || FloorManager.IsLevelStarted()) { BlackScreen.FadeInOut(MyAnim.FrameTime * MyAnim.Sprites.Length); PlayerBase.LockControls(true); MyAnim.Play(); } }
// Use this for initialization void Start() { if (instance == null) instance = this; else if (instance != this) Destroy(gameObject); _blackScreen = GetComponentInChildren<BlackScreen>(); inventory.gameObject.SetActive(false); }
private void OnGUI() { BlackScreen.Draw(); Zombie.Draw(); ChooseTeam.Draw(); MenuBanList.Draw(); Award.Draw(); ScoreBoard.Draw(); Message.Draw(); }
private void Start() { StartCoroutine(WaitStart()); IEnumerator WaitStart() { yield return(new WaitForSeconds(2)); BlackScreen.ShowScreen(ToShow, 1, 3); } }
protected override void OnUpdateState() { m_elapsedTime += TimeManager.Instance.DeltaTime; if (m_elapsedTime >= kWaitingTime && m_finishedSplash == false) { m_finishedSplash = true; m_blackScreen = UIManager.Instance.RequestView <BlackScreen>(true); m_blackScreen.OnViewOpened += OnBlackScreenOpened; } }
void Awake() { dialogBox = GameObject.Find("DialogBox"); dialog = dialogBox.GetComponent <DialogBox>(); soundManager = GameObject.Find("SoundManager"); sound = soundManager.GetComponent <SoundManager>(); screenImage = GameObject.Find("/HP&Score/BlackScreen"); screen = screenImage.GetComponent <BlackScreen>(); MusicManager = GameObject.Find("Music"); music = MusicManager.GetComponent <FadeAudioSource>(); }
private void OnTriggerEnter2D(Collider2D collision) { if (FloorManager.IsLevelStarted() && FloorManager.IsFloorCleared() || !FloorManager.IsLevelStarted()) { BlackScreen.FadeInOut(0.2f, () => { FloorManager.SetFloor(ToFloor); }); } }
IEnumerator ExitToMenu() { GameOverMenu.SetActive(false); BlackScreen.SetActive(true); while (BlackScreenRenderer.material.color.a < 1) { BlackScreenRenderer.material.color = new Color(0, 0, 0, BlackScreenRenderer.material.color.a + 0.05f); yield return(new WaitForSeconds(0.01f)); } SceneManager.LoadScene(0); }
protected virtual void onBlackScreen(VideoEventArgs e) { if (frameBuffer[frameBuffer.Length - 1] == null) { return; } BlackScreen?.Invoke(this, e); for (int i = 0; i < e.frameBuffer.Length; i++) { e.frameBuffer[i]?.Dispose(); } }
protected virtual void onBlackScreen(BlackScreenEventArgs e) { if (frameBuffer[0] == null) { return; } BlackScreen?.Invoke(this, e); for (int i = 0; i < frameBuffer.Length; i++) { frameBuffer[i]?.Dispose(); frameBuffer[i] = null; } }
public static void QuickFullRestart() { if (AppDomain.CurrentDomain.IsDefaultAppDomain() || !CoreModule.Settings.RestartAppDomain_WIP) { SlowFullRestart(); return; } BlackScreen scene = new BlackScreen(); scene.HelperEntity.Add(new Coroutine(_QuickFullRestart(Engine.Scene is Overworld, scene))); Engine.Scene = scene; }
public static void HideScreen() { if (_currentActiveScreen != null) { Time.timeScale = 1.0f; _currentActiveScreen.Hide(); BlackScreen.Hide(); } else { Debug.LogException(new System.Exception("Вызов функции скрытия Screen, когда ни один из них не показан")); } }
public static void ChangeScreen(string screen, bool preload = false) { if (preload) { BlackScreen.SetNavigateScene(screen); SceneManager.LoadScene(GameScenes.BlackScreen, LoadSceneMode.Single); } else { SceneManager.LoadScene(screen, LoadSceneMode.Single); } Time.timeScale = 1; }
public void FloorTransition() { BlackScreen blackScreenComp = blackScreen.GetComponent <BlackScreen>(); ladderState = LadderStates.Transition; StartCoroutine(blackScreenComp.FadeToBlack(0.5f, 0.0f)); StartCoroutine(blackScreenComp.FadeFromBlack(0.5f, 1.0f)); Invoke("NextFloor", 1.0f); string floorText = "Floor " + (GameObject.Find("TowerManager").GetComponent <LevelManager>().currentFloor + 1).ToString(); // floor + 1 because NextFloor gets called too late. StartCoroutine(blackScreenComp.FadeInText(floorText, 0.5f, 1.5f)); StartCoroutine(blackScreenComp.FadeOutText(0.5f, 2.5f)); }
private void OnActionButtonPressed() { m_blackScreen = UIManager.Instance.RequestView <BlackScreen>(true); m_blackScreen.OnViewOpened += () => { if (m_activeSession.Result.SessionWon) { m_nextLevel = true; } else { m_retry = true; } }; }
public void PlayDeathSequence() { music.PlayerDead(); wordDisplay.StopDisplay(); hero.GetComponent <moveCharacter>().Die(); GameObject.Find("GameManager").GetComponent <GameManager>().StartZoomIn(); BlackScreen blackScreenComp = blackScreen.GetComponent <BlackScreen>(); StartCoroutine(blackScreenComp.FadeInText("THE HERO IS DEAD", 1f, 2f)); StartCoroutine(blackScreenComp.FadeToBlack(1f, 3.5f)); StartCoroutine(blackScreenComp.FadeOutText(1f, 5f)); Invoke("RestartGame", 7f); }
public static void LoadScene(string SceneName) { Main.MusicManager.Lock = true; BlackScreen.ShowScreen(Main.SkylineScreen, 1, 5, () => { SceneManager.LoadScene(SceneName); }, () => { if (ClockScreenUpdater.UpdateClock()) { Main.MusicManager.Lock = false; BlackScreen.ShowScreen(Main.ClockScreen, 1, 2); } }); }
public IEnumerator GameOverMenuFunction(bool Highest) { BlackScreen.SetActive(true); while (BlackScreenRenderer.material.color.a < 1) { BlackScreenRenderer.material.color = new Color(0, 0, 0, BlackScreenRenderer.material.color.a + 0.05f); yield return(new WaitForSeconds(0.025f)); } GameOverScoreText.text = "Your Score: " + GCS.Score.ToString(); if (Highest) { GameOverScoreText.text += "\n New Highest Score!"; } EventSystem.current.SetSelectedGameObject(GameOverButtons[0].gameObject); GameOverButtons[0].OnSelect(null); GameOverMenu.SetActive(true); }
public SacredLauncher() { parameters = new List<string>(); RegistryKey sacred_reg = Registry.CurrentUser.OpenSubKey(@"Software\Ascaron Entertainment\Sacred"); if (sacred_reg != null) { sacredDirectory = sacred_reg.GetValue("InstallLocation").ToString(); sacredVersion = sacred_reg.GetValue("Version").ToString(); } sacred_reg = Registry.CurrentUser.OpenSubKey(@"Software\Ascaron Entertainment\Sacred Underworld"); if (sacred_reg != null) { underworldDirectory = sacred_reg.GetValue("InstallLocation").ToString(); underworldVersion = sacred_reg.GetValue("Version").ToString(); } if (IsSacredAvailable) { sacredSettings = new SacredSettings(Path.Combine(SacredDirectory, "settings.cfg")); } if (IsUnderworldAvailable) { underworldSettings = new SacredSettings(Path.Combine(UnderworldDirectory, "settings.cfg")); } timer = new System.Windows.Forms.Timer(); timer.Interval = 100; timer.Tick += TimerTick; blackScreen = new BlackScreen(); blackScreen.Paint += BlackScreenPaint; blackScreen.Activated += BlackScreenActivated; nativeResolution = Screen.PrimaryScreen.Bounds.Size; emulationResolution = new Size { Width = (int)Math.Ceiling((768f * nativeResolution.Width) / nativeResolution.Height), Height = 768 }; uiFont = new Font("AntiquaSSK", 18f); }
void Start() { BlackScreen.SetActive(false); Fail0.SetActive(false); Fail1.SetActive(false); m_initialPopulation = Population; CurrentYearText.text = "Year: " + CurrentYear.ToString(); PopulationText.text = "Population: " + Population.ToString(); TotalSoulsText.text = "Souls: " + TotalSouls.ToString(); GrowthRateText.text = GrowthRate.ToString(); InvokeRepeating("TimeTick", 0.0f, 1.0f); InvokeRepeating("PopulationGrowth", 0.0f, 1.0f); //Debug.Log(CalculatePopGrowth(m_initialPopulation, 5)); }