// Use this for initialization void Start() { if (GameObject.Find("Player") != null) { playerController = GameObject.Find("Player").GetComponent <PlayerController> (); } if (!LastScene) { fader = GameObject.Find("Cover").GetComponent <SceneFader> (); } if (LastScene) { eFader = FindObjectOfType <EndFader> (); } if (textFile != null) { textLines = (textFile.text.Split('\n')); } if (endAtLine == 0) { endAtLine = textLines.Length - 1; } isTalking = true; useFader = true; }
// Use this for initialization void Awake() { fader = FindObjectOfType <SceneFader>(); Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; }
private void OnClickDeleteButton() { // Get current character data. CharacterDataHolder characterData = PlayerManager.instance.selectedCharacterData; // Return if no character is selected. if (characterData == null) { return; } // Disable buttons. createButton.enabled = false; deleteButton.enabled = false; enterWorldButton.enabled = false; exitButton.enabled = false; // Set text message to deleting character. textMessage.text = "Deleting character " + characterData.GetName() + "..."; // Request info. waitingServer = true; NetworkManager.instance.ChannelSend(new CharacterDeletionRequest(characterData.GetSlot())); // Wait until server deletes the character. while (waitingServer) { // Make sure server has deleted the character. } // Reload everything. Destroy(characterSelected); // Destroy clone object. SceneFader.Fade("CharacterSelection", Color.white, 0.5f); }
public void BackButton() { AudioManager.Play(SEType.Button); AudioManager.FadeOut(1); SceneFader.MoveToScene("MenuScene", SceneMoveType.Short); }
/*hecki97 public Joystick joystickPauseGame; public bool inputPauseGamePressed = false;*/ void Awake() { sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); butRect = new Rect((Screen.width - ctrlWidth)/2,0,ctrlWidth, ctrlHeight); flags = GameObject.FindGameObjectsWithTag("flag"); }
IEnumerator TutorialStart() { isTutorialEnd = false; touchIntervalEnd = false; spriteIndex = 0; SceneFader.GetInstance().FadeOut(); yield return(new WaitForSeconds(1)); SceneFader.GetInstance().FadeIn(); tutorialImage.sprite = null; tutorialImage.gameObject.SetActive(true); if (languageMgr == null) { languageMgr = GameObject.FindObjectOfType <LanguageManager>(); } if (languageMgr.currLanguage == Language.Korean) { tutorialImage.sprite = korSprites[0]; } else { tutorialImage.sprite = engSprites[0]; } StartCoroutine(TouchInterval()); }
// Use this for initialization void Awake () { butRect = new Rect((Screen.width - ctrlWidth)/2,0,ctrlWidth, ctrlHeight); sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); playerHealth = GameObject.FindGameObjectWithTag("Player").GetComponent<HealthController>(); timer = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>(); item = GameObject.FindGameObjectWithTag("GameController").GetComponent<Item>(); }
// Use this for initialization void Start() { scene = FindObjectOfType <SceneFader> (); rb = gameObject.GetComponent <Rigidbody2D> (); rb.velocity = new Vector2(-Speed, 0); float spawnRan = Random.Range(5f, 7f); if (RespawnTimer == 0) { RespawnTimer = spawnRan; } if (DeathTimer == 0) { DeathTimer = 60; } if (Respawns) { Invoke("Respawn", RespawnTimer); } Destroy(gameObject, DeathTimer); }
// Use this for initialization void Start() { // Cursor.visible = false; sceneFader = GetComponent<SceneFader>(); InitLevelData(); // Initiate all fonts and styles for GUI objects guiStyle = new GUIStyle(); guiStyle.font = guiFont; guiStyle.fontSize = 40; guiStyle.normal.textColor = Color.yellow; guiStyle.alignment = TextAnchor.MiddleCenter; TimerText.text = FormatTimeString((timeLimit - elapsedTime)); ScoreText.text = LEVEL_DATA.SCORE.ToString(); amountOfTargets = FindObjectsOfType<Spawner>().Length; StartCoroutine(CountdownSequence(0.5f)); sfxSource = GameObject.FindWithTag("SFX_Source").GetComponent<AudioSource>(); musicSource = GameObject.FindWithTag("Music_Source").GetComponent<AudioSource>(); // Time.timeScale = 0.5f; // audioSource.pitch = Time.timeScale; DisablePowerup(); }
public void ToTitleScene() { AudioManager.Play(SEType.Button); AudioManager.FadeOut(1); SceneFader.MoveToScene("TitleScene", SceneMoveType.Short); }
void Awake() { Instance = this; // StartFadeOut StartFading(SceneFadeType.FadeOut, null); }
public void ToMainMode() { AudioManager.Play(SEType.Button); AudioManager.FadeOut(2); SceneFader.MoveToScene("Game", SceneMoveType.Long); }
public void ToRanking() { AudioManager.Play(SEType.Button); AudioManager.FadeOut(1); SceneFader.MoveToScene("RankingScene", SceneMoveType.Short); }
public static void Create() { SceneFader controllerPrefab = Resources.Load <SceneFader>("ScreenFader"); Debug.Log(controllerPrefab); s_Instance = Instantiate(controllerPrefab); }
private void Awake() { if (instance = null) { instance = this; } }
public void RetryButton() { AudioManager.Play(SEType.Button); AudioManager.FadeOut(1); SceneFader.MoveToScene("Game", SceneMoveType.Short); }
public static void notify(ReceivablePacket packet) { // Used for kicked message. NetworkManager.instance.kicked = true; // Go to login screen. SceneFader.Fade("LoginScreen", Color.white, 0.5f); }
// Use this for initialization void Start() { scene = FindObjectOfType <SceneFader> (); // player = GameObject.Find ("Player").GetComponent<Transform> (); // InvokeRepeating ("SBird", BirdSpawnRate, BirdSpawnRate); }
void Awake() { sceneFader = FindObjectOfType <SceneFader>(); ui = FindObjectOfType <PauseMenu>().transform.GetChild(0).gameObject; settings = FindObjectOfType <SettingsMenu>(true).gameObject; paused = false; }
// Use this for initialization void Start() { // Cursor.visible = false; sceneFader = GetComponent <SceneFader>(); InitLevelData(); // Initiate all fonts and styles for GUI objects guiStyle = new GUIStyle(); guiStyle.font = guiFont; guiStyle.fontSize = 40; guiStyle.normal.textColor = Color.yellow; guiStyle.alignment = TextAnchor.MiddleCenter; TimerText.text = FormatTimeString((timeLimit - elapsedTime)); ScoreText.text = LEVEL_DATA.SCORE.ToString(); amountOfTargets = FindObjectsOfType <Spawner>().Length; StartCoroutine(CountdownSequence(0.5f)); sfxSource = GameObject.FindWithTag("SFX_Source").GetComponent <AudioSource>(); musicSource = GameObject.FindWithTag("Music_Source").GetComponent <AudioSource>(); // Time.timeScale = 0.5f; // audioSource.pitch = Time.timeScale; DisablePowerup(); }
private void _MakeInstance() { if (instance == null) { instance = this; } }
public IEnumerator Transition(string newSceneName, BirthPointType birthPoint) { var options = SceneManager.LoadSceneAsync(newSceneName); options.allowSceneActivation = false; while (!options.isDone) { if (options.progress >= 0.9f) { options.allowSceneActivation = true; } if (!m_IsTransitioning) { m_IsTransitioning = true; yield return(Instance.StartCoroutine(SceneFader.FadeSceneIn(SceneFader.FadeType.Loading))); } else { yield return(null); } } Player.Instance.Redirect(birthPoint); yield return(StartCoroutine(SceneFader.FadeSceneOut())); m_IsTransitioning = false; }
void MakeSingleton(){ if(instance != null){ Destroy (gameObject); } else { instance = this; DontDestroyOnLoad (gameObject); } }
public void Restart(bool fullReset = true) { if (fullReset) { LevelProgressManager.Reset(); } SceneFader.FadeToScene(SceneManager.GetActiveScene().buildIndex, Color.black); }
// ------------------------------------------------------------------------ void Awake() { gameCamera = GameObject.Find("GameCam"); cameraController = GameObject.Find("Controller").GetComponent <CameraController>(); gui = GameObject.Find("Controller").GetComponent <GUINotification>(); sceneFader = SceneFader.create(); sceneFader.startScene(); }
void Awake() { playerMovement = FindObjectOfType(typeof(CharacterMovement)) as CharacterMovement; fadeScene = GetComponent <SceneFader>(); //setting players starting health currentHealth = maxHealth; }
void MakeSingleton () { if (instance != null) { Destroy (gameObject); } else { instance = this; DontDestroyOnLoad (gameObject); } }
void Start() { sceneFaderScript = sceneFader.GetComponent <SceneFader>(); if (sceneFader == null) { sceneFader = GameObject.Find("FadeCanvas"); } }
private void Awake() { if (!Instance || Instance != this) { Destroy(Instance); Instance = this; } }
// --------------------------------- void Start() { InitializeGamecenter(); SetGameVersion(); SetVolume(); sceneFader = GameObject.FindWithTag("Cover").GetComponent <SceneFader>(); }
// Use this for initialization void Awake() { CheckGameControllerExists(); if (sceneFader == null) { sceneFader = GameObject.FindWithTag("SceneFader").GetComponent <SceneFader>(); } }
void Awake() { sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); butRect = new Rect((Screen.width - ctrlWidth)/2,0,ctrlWidth, ctrlHeight); bgMusic = GameObject.FindGameObjectWithTag("GameController").GetComponent<AudioSource>(); blurEffect = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<BlurEffect>(); }
private void Awake() { if (Instance != null && Instance != this) { Destroy(gameObject); } Instance = this; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { SceneFader fader = GameObject.FindObjectOfType <SceneFader>(); PlayerPrefs.SetInt("score", GameManager.score); fader.FadeScene(nextLevel); } }
private void Start() { if (Instance == null) { Instance = this; } StartCoroutine(FadeIn()); }
void Awake() { bgMusic = GameObject.FindGameObjectWithTag("GameController").GetComponent<AudioSource>(); sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); butRect = new Rect((Screen.width - ctrlWidth)/2,0,ctrlWidth, ctrlHeight); //hecki97 if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.MetroPlayerX86 || Application.platform == RuntimePlatform.MetroPlayerX64) isMobile = true; }
void Awake(){ sceneFader = this; fadeObject = Instantiate (black); fadeObject.SetParent (uiCanvas); fadeObject.localPosition = new Vector3 (0, 0, 0); fadeObject.localScale = new Vector3 (1, 1, 1); fadeObjectImage = fadeObject.GetComponent<Image>(); FadeIn (); }
// Use this for initialization void Start () { timeleft = updateInterval; sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); healthController = GameObject.FindGameObjectWithTag("Player").GetComponent<HealthController>(); ui_timerText = GameObject.Find("UI_Canvas/UI_TimerText").GetComponent<TimerUI>(); ui_levelInfo = GameObject.Find("UI_Canvas/UI_LevelInfoText").GetComponent<LevelInfoUI>(); ui_healthPoints = GameObject.Find("UI_Canvas/UI_HealthPoints").GetComponent<HealthPointsUI>(); ui_debug = GameObject.Find("UI_Canvas/UI_Debug").GetComponent<DebugUI>(); }
// Use this for initialization void Start() { fader = GameObject.FindObjectOfType<SceneFader> (); totalTime = 0; }
void Awake() { sceneFader = GetComponent<SceneFader>(); }
// Use this for initialization void Start() { menu = GameObject.Find ("Canvas"); menu.SetActive (true); infoPanel = GameObject.Find ("InfoPanel"); infoPanel.SetActive (false); fader = GameObject.FindObjectOfType<SceneFader> (); }
void Awake() { //hecki97 gameOverFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameOverFader>(); sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); bgMusic = GameObject.FindGameObjectWithTag("GameController").GetComponent<AudioSource>(); }
// Use this for initialization void Start() { GameObject tmp = GameObject.FindWithTag("SceneFader"); this.sceneFader = tmp.GetComponent<SceneFader>(); }
void Awake() { timerText.material.color = Color.white; sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); }
void Awake () { sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); //bgMusic = GameObject.FindGameObjectWithTag("musicManager").GetComponent<AudioSource>(); }
void Start() { fader = GameObject.FindGameObjectWithTag("SceneFader").GetComponent<SceneFader>(); }
void Awake() { sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); }
void Start() { sceneFader = GameObject.FindGameObjectWithTag("GameController").GetComponent<SceneFader>(); playerController = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerController>(); }
// Use this for initialization void Start() { this.fader = gameObject.GetComponent<SceneFader>(); }