void showNewCutscene() { currentlyDisplayingText = 0; //print (goalText [0]); SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> (); if (cutscenePos >= cutscenes.Length) { fader.EndScene(); //print ("dONE W CUTSCENES"); SceneManager.LoadScene("MainMenu", LoadSceneMode.Single); } else { SpriteRenderer showCutscene = GameObject.Find("Cutscene").GetComponent <SpriteRenderer> (); showCutscene.sprite = cutscenes[cutscenePos++]; goalText = allCutsceneText [cutscenePos]; if (cutscenePos == 2) { ambientAudioSource.clip = magicAudio; ambientAudioSource.Play(); fader.EndSceneFast(); } else { fader.EndScene(); } } }
void Start() { playerStats = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<PlayerStats>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); centerMessageController = GameObject.FindGameObjectWithTag (Tags.canvas).GetComponentInChildren<CenterMessageController> (); }
void Awake() { // Setting up references. player = GameObject.FindGameObjectWithTag(Tags.player); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent<SceneFadeInOut>(); liftDoorsTracking = GetComponent<LiftDoorsTracking>(); }
void Awake() { // Set the texture so that it is the the size of the screen and covers it. //GetComponent<GUITexture>().pixelInset = new Rect(0f, 0f, Screen.width, Screen.height); instance = this; DontDestroyOnLoad(gameObject); }
public void LoadScene(int level) { persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); persistentData.Save (); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); sceneFadeInOut.LoadScene (level); }
void Awake() { // Set the texture so that it is the the size of the screen and covers it. GetComponent <GUITexture>().pixelInset = new Rect(0f, 0f, Screen.width, Screen.height); instance = this; transform.position = new Vector3(0.5f, 0.5f, 0); }
void Awake() { player = GameObject.FindGameObjectWithTag("Player"); PlayerAnim = player.GetComponent <Animator> (); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFadeInOut> (); liftDoorsTracking = GetComponent <LiftDoorsTracking> (); }
void Awake() { // Setting up references. player = GameObject.FindGameObjectWithTag(Tags.player); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFadeInOut>(); liftDoorsTracking = GetComponent <LiftDoorsTracking>(); }
void Start() { sceneFade = GameObject.FindGameObjectWithTag("Finish").GetComponent <SceneFadeInOut>(); GetComponent <SkinnedMeshRenderer>().material = dissolveMaterial; shaderProperty = Shader.PropertyToID("_cutoff"); _renderer = GetComponent <Renderer>(); ps = GetComponentInChildren <ParticleSystem>(); var main = ps.main; main.duration = spawnEffectTime; ps.Play(); foreach (Transform child in GetComponentInParent <Animator>().GetBoneTransform(HumanBodyBones.RightHand)) { weapon = child.Find("muzzle"); if (weapon != null && weapon.parent.gameObject.activeSelf) { Transform toDestroy = weapon; weapon = weapon.parent; Destroy(toDestroy.gameObject); _weaponRenderer = weapon.GetComponentInChildren <MeshRenderer>(); Material[] dissolveMaterials = new Material[_weaponRenderer.materials.Length]; for (int i = 0; i < dissolveMaterials.Length; i++) { dissolveMaterials[i] = dissolveMaterial; } _weaponRenderer.materials = dissolveMaterials; break; } } }
void Awake() { bossCtrl = FindObjectOfType <BossController>(); eyeModel = GameObject.FindGameObjectWithTag("EyeModel"); sceneFader = GameObject.FindGameObjectWithTag("Fader").GetComponent <SceneFadeInOut>(); anim = GameObject.Find("Boss_Rig").GetComponent <Animator>(); }
//public bool retry = false; // Use this for initialization void Awake() { audio = GetComponent <AudioSource> (); sceneFadeInOut = GetComponent <SceneFadeInOut> (); audioManager = GetComponent <AudioManager> (); //adManager = GetComponent<AdManager> (); }
// Use this for initialization void Start() { levelCamera = CameraTracking.cameraTracking.gameObject; platformerController = PlatformerController.platformerController; //The scene fader is needed to call the end scene function; sceneFadeInOut = SceneFadeInOut.sceneFadeInOut; }
void Awake() { anim = GetComponent<Animator> (); playerMovement = GetComponent<PlayerMovement> (); hash = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<HashIDs> (); sceneFadeInOut = GameObject.FindGameObjectWithTag (Tags.canvas).GetComponent<SceneFadeInOut> (); lastPlayerSighting = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<LastPlayerSighting> (); }
void Awake() { // Setting up the references. anim = GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<HashIDs>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent<SceneFadeInOut>(); lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<LastPlayerSighting>(); }
void Awake() { menu = GameObject.FindGameObjectWithTag(Tags.menu).GetComponent <MenuHandeler> (); anim = GetComponent <Animator> (); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFadeInOut> (); lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <LastPlayerSighting> (); th = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <ThirdPersonCharacter> (); }
private void Awake( ) { DontDestroyOnLoad( this ); mInstance = this; mMaterial = new Material( "Shader \"Plane/No zTest\" { SubShader { Pass " + "{ Blend SrcAlpha OneMinusSrcAlpha ZWrite Off Cull Off Fog { Mode Off } " + "BindChannels { Bind \"Color\",color } } } }" ); }
// -- Initialisation void Start() { // -- Set Instance mInstance = this; // -- Start Fading In StartFade(null, true); }
void Awake() { anim = GetComponent <Animator>(); playerMovement = GetComponent <PlayerMovement>(); hash = GameObject.FindWithTag(Tags.GameController).GetComponent <HashIDs>(); sceneFadeInOut = GameObject.FindWithTag(Tags.Fader).GetComponent <SceneFadeInOut>(); lastPlayerSighting = GameObject.FindWithTag(Tags.GameController).GetComponent <LastPlayerSighting>(); }
void Awake() { instance = this; color = transform.FindChild("Panel"); // Set the texture so that it is the the size of the screen and covers it. //guiTexture.pixelInset = new Rect(0f, 0f, Screen.width, Screen.height); mCanvas = GetComponent <Canvas>(); }
protected void Awake() { instance = this; DontDestroyOnLoad (transform.gameObject); foreach (GameObject go in persistentGameobjects) { DontDestroyOnLoad (go); } fade = gameObject.GetComponent<SceneFadeInOut> (); }
// Use this for initialization void Start () { fader = transform.Find ("texture_black").GetComponent<SceneFadeInOut> (); audio_Controller_Script = AudioControllerObject.GetComponent<AudioController> (); audio_Controller_Script.FadeSpeed = FadeSpeed; fader = FindObjectOfType<GUITexture> ().GetComponent<SceneFadeInOut> (); fader.FadeSpeed = FadeSpeed; }
void Awake() { player = GameObject.FindGameObjectWithTag(ScriptTags.player); playerAnim = player.GetComponent<Animator>(); hash = GameObject.FindGameObjectWithTag(ScriptTags.gameController).GetComponent<HashIDs>(); camMovement = Camera.main.gameObject.GetComponent<CameraMovement>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(ScriptTags.fader).GetComponent<SceneFadeInOut>(); liftDoorsTracking = GetComponent<liftDoorsTracking>(); }
private bool playerDead; // A bool to show if the player is dead or not. void Awake() { // Setting up the references. anim = GetComponent <Animator>(); playerMovement = GetComponent <PlayerMovement>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <HashIDs>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFadeInOut>(); lastPlayerSighting = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <LastPlayerSighting>(); }
private void Start() { currentSceneAnim = GameObject.FindGameObjectWithTag("Fader").GetComponent <SceneFadeInOut>(); st = GameObject.FindGameObjectWithTag("Player").GetComponent <Scratch_Trigger>(); if (GameObject.FindGameObjectWithTag("Player2") != null) { st2 = GameObject.FindGameObjectWithTag("Player2").GetComponent <Scratch_Trigger>(); } }
// Use this for initialization void Awake() { characterMovement = GetComponent <CharacterMovement>(); //aura = GetComponent<ParticleSystemRenderer>(); renderers = GetComponentsInChildren <Renderer>(); sceneFader = GameObject.FindGameObjectWithTag("Fader").GetComponent <SceneFadeInOut>(); }
void Awake() { player = GameObject.FindGameObjectWithTag(Tags.player); playerAnim = player.GetComponent <Animator>(); hash = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <HashIDs>(); camMovement = Camera.main.gameObject.GetComponent <CameraMovement>(); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.fader).GetComponent <SceneFadeInOut>(); liftDoorsTracking = GetComponent <LiftDoorsTracking>(); }
// Use this for initialization protected void Awake() { sm_instance = this; // background m_fadeBackground = GetComponent <PackedSprite>(); // hide the background first m_fadeBackground.transform.localScale = Vector3.one; }
void Start() { // Set the texture so that it is the the size of the screen and covers it. //guiTexture.sc = new Rect(0f, 0f, Screen.width, Screen.height); guiTexture.enabled = true; fader = this; Debug.Log ("Starting fade"); StartScene(); }
void Awake() { if (Instance == null) { Instance = this; } // Set the texture so that it is the the size of the screen and covers it. _image = GetComponent<Image>(); _image.enabled = false; }
void Awake() { if (instance == null) instance = this; else if (instance != this) Destroy(gameObject); DontDestroyOnLoad(transform.gameObject); // Set the texture so that it is the the size of the screen and covers it. GetComponent<GUITexture>().pixelInset = new Rect(0f, 0f, Screen.width, Screen.height); }
/// <summary> /// Starts the battle from an intermission /// </summary> public void StartBattle() { nextLevel = LevelDB.Instance.GetNextLevel(nextLevel); if (nextLevel == "-1") { nextLevel = LevelDB.Instance.GetMainMenu(); } StateManager.Instance.DebugPush(GameState.LevelManagerAnimation); aniDuration = 0f; SceneFadeInOut.FadeToBlack(); //GotoNextLevel(); }
// Use this for initialization void Start () { fader = transform.Find ("texture_black").GetComponent<SceneFadeInOut> (); audio_Controller_Script = AudioControllerObject.GetComponent<AudioController> (); audio_Controller_Script.FadeSpeed = FadeSpeed; fader = FindObjectOfType<GUITexture> ().GetComponent<SceneFadeInOut> (); fader.FadeSpeed = FadeSpeed; // reset the score manager. ScoreManager.Instance.Reset (); }
// Use this for initialization void Start () { fade = false; durationOfFading = 1; fadeTimer = 0; transitionToNewScene = this.GetComponent<SceneFadeInOut> (); currentObjective = 0; objectives [currentObjective].SetActive (true); guiText = GameObject.Find ("HUDText").GetComponent<UILabel>(); changeText( firstMessage ); runScene(currentObjective); endScene = false; }
// Use this for initialization void Start() { //Establish audioSource... audioSource = GetComponent<AudioSource> (); //Establish sceneFadeInOut... sceneFadeInOut = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<SceneFadeInOut> (); //Play audio clip on start... if (playOnStart && !doNotPlayOnStartWhenSceneCleared) { audioSource.Play (); played = true; } }
void Start() { sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); if(GameObject.FindGameObjectWithTag(Tags.localScene)){ localSceneObjectsExist = true; localScenePersistentGameObjects = GameObject.FindGameObjectWithTag(Tags.localScene).GetComponent<LocalScenePersistentGameObjects>(); } if(localSceneObjectsExist){ if(!ignoreScriptedEventForSceneClearing && !localScenePersistentGameObjects.isCleared){ StartCoroutine(DelayedListAdd ()); } } }
public void OnEnable() { if (GameObject.FindGameObjectWithTag(Tags.gameController)){ sceneFadeInOut = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<SceneFadeInOut> (); if(resetDefaults){ GameObject.FindGameObjectWithTag(Tags.mainCamera).GetComponent<PersistentData>().ResetDefaults(); } sceneFadeInOut.LoadScene(sceneToLoad); } else{ Application.LoadLevel (sceneToLoad); } }
// Use this for initialization void Start () { foreach (GUIText current_text in FindObjectsOfType<GUIText>()) { if (current_text.name.Contains ("text_money")) current_text.text = "$" + ScoreManager.Instance.Money; } fader = transform.Find ("texture_black").GetComponent<SceneFadeInOut> (); audio_Controller_Script = AudioControllerObject.GetComponent<AudioController> (); audio_Controller_Script.FadeSpeed = FadeSpeed; fader = FindObjectOfType<GUITexture> ().GetComponent<SceneFadeInOut> (); fader.FadeSpeed = FadeSpeed; }
public void OnPressed() { SoundMgr.G.EffectPlay(EffectSound.btn_ok); if (UserDataMgr.G.life <= 0) { int count = 1; if (UserDataMgr.G.IsItemCoins(count)) { PopupMgr.G.ShowItemPopup("Life Item Popup", "LIFE", "You can play the game with life!", "BUY", "life_icon", count, GameDataMgr.G.itemCost, () => { UserDataMgr.G.CoinsUsed(GameDataMgr.G.itemCost * count); UserDataMgr.G.life += count; UserDataMgr.G.SetTimeToNextLife(); if (LobbyMgr.G != null && LobbyMgr.G.levelNumber != null) { LobbyMgr.G.levelNumber.UpdateLifeLabel(); LobbyMgr.G.levelNumber.UpdateCoin(); } }); } else { PopupMgr.G.ShowAdsPopup(null, "Not enough coins and life." + "\n" + "Watch ads and get rewarded.", "OK"); } return; } string level = string.Format("LEVEL {0}", GameDataMgr.G.endLevel.ToString()); PopupConfirm temp = PopupConfirm.Open("Prefabs/Popup/GamePopup", "StartPopup", level, null, "PLAY"); temp.GetComponent <GamePopup>().OnPopup(GamePopupState.start); GamePopupItemGroup item = temp.GetComponentInChildren <GamePopupItemGroup>(); if (item != null) { item.BoosterItemSetting(); item.gameObject.GetComponent <UIWidget>().bottomAnchor.absolute = 50; } temp.onConfirm += () => { SceneFadeInOut fade = gameObject.GetComponentInParent <SceneFadeInOut>(); fade.delayTime = 0.15f; fade.fadeTime = 0.3f; fade.OnPressed(); }; }
void Awake() { //On awake, check to see if the gate is active or inactive and setup gate... if(isActive){ ActivateGate(); } else{ DeactivateGate (); } //shakeCam = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<SmoothCamera2D> (); player = GameObject.FindGameObjectWithTag (Tags.player); sceneFadeInOut = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<SceneFadeInOut> (); persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); }
void Start() { sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); if(GameObject.FindGameObjectWithTag(Tags.localScene)){ localScenePersistentGameObjects = GameObject.FindGameObjectWithTag(Tags.localScene).GetComponent<LocalScenePersistentGameObjects>(); localSceneObjectsExist = true; } if(localSceneObjectsExist){ if(!ignoreEnemyForSceneClearing && gameObject.tag == Tags.enemy && !localScenePersistentGameObjects.isCleared){ //If this gameObject is tagged "enemy", then add it to the enemy list StartCoroutine(DelayedListAdd()); } } }
void Awake() { //makes it a singleton if (sceneFadeInOut == null) { //DontDestroyOnLoad(gameObject); sceneFadeInOut = this; } else if (sceneFadeInOut != this) { Destroy(gameObject); } // Set the texture so that it is the the size of the screen and covers it. GetComponent <GUITexture>().pixelInset = new Rect(0f, 0f, Screen.width, Screen.height); }
// Use this for initialization void Start () { sceneFadeInOut = screenFader.GetComponent<SceneFadeInOut>(); gameSceneControll = gameScene.GetComponent<GameSceneControll>(); gameOverSceneControll = gameOverScene.GetComponent<GameOverSceneControll>(); googleAnalytics.LogEvent(new EventHitBuilder() .SetEventCategory("Game") .SetEventAction("Open Game")); StartCoroutine( LoginPlayServices() ); CreatSmallBanner(); StartMainMenuScene(); }
// Update is called once per frame void Update() { if (_enabled) { if (StateManager.Instance.State == GameState.noState && _nextDialogue < dialogues.Count) { // count upwards _nextDialogue++; // start dialogue if (_nextDialogue < dialogues.Count) { string title = dialogues[_nextDialogue]; if (title == "NextSlide") { PowerPointSlide.instance.Advance(); } else if (title == "FadeToBlack") { SceneFadeInOut.FadeToBlack(); } else if (title == "FadeToClear") { SceneFadeInOut.FadeToClear(); } else { Dialogue.StartDialogue(dialogues[_nextDialogue], null); } } } else if (_nextDialogue == dialogues.Count) { if (skipSetup) { LevelManager.Instance.StartBattle(); _enabled = false; } else { gameObject.AddComponent <IntermissionMenu>(); _enabled = false; } } } }
public void OnEnable() { //If scene clear hasn't already been called and if the player is still alive... if(!alreadyEnabledOnce && GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<PlayerStats>().playerIsAlive){ alreadyEnabledOnce = true; //If post-action event exists, execute it... if(!targetEnabled && targetGO != null){ (targetGO.GetComponent(scriptNameToEnable) as MonoBehaviour).enabled = true; targetEnabled = true; } //Do this step last! sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); sceneFadeInOut.SceneClear(); } }
// Use this for initialization private void Start() { var tileMapGameObject = GameObject.Find("TileMap"); m_tileMap = tileMapGameObject.GetComponent <TileMapBehaviour>(); if (m_tileMap == null) { Debug.LogError("TileMapBehaviour not found"); } m_levelBehaviour = tileMapGameObject.GetComponent <LevelBehaviour>(); if (m_levelBehaviour == null) { Debug.LogError("LevelBehaviour not found"); } m_sceneFadeInOut = GameObject.Find("SceneFader").GetComponent <SceneFadeInOut>(); if (m_sceneFadeInOut == null) { Debug.LogError("SceneFadeInOut not found"); } }
void Start() { General.Logger.LogDetail("GameController", "Start", "Entering Start. guiManager.currentLives = " + guiManager.currentLives); GLOBALS.gameController = this; if (null == sceneFadeInOut) { sceneFadeInOut = GetComponentInChildren <SceneFadeInOut>(); if (null == sceneFadeInOut) { General.Logger.LogError("GameController", "Start", "Could not find SceneFadeInOut script."); } // if } // if for (int loop = 0; loop < levels.Length; loop++) { if (null != levels[loop].openingImage) { levels[loop].openingImage.enabled = false; } // if if (null != levels[loop].music) { levels[loop].music.Stop(); } // if } // for System.DateTime lastPlayedPlus1Day = GLOBALS.lastDayPlayed.AddDays(1); if (lastPlayedPlus1Day == System.DateTime.Today) { GLOBALS.consecutiveDaysPlayingCount++; } // if if (0 < guiManager.currentLives) { RunLevel(); } // if guiManager.Init(); guiManager.UpdateScore(); guiManager.UpdateLives(GetSpawnedPlayer()); General.Logger.LogDetail("GameController", "Start", "Exiting Start."); } // Start
void OnGUI() { if (StateManager.Instance.State == GameState.LevelManagerAnimation) { if (aniDuration < 0) { if (fadeToBlack) { SceneFadeInOut.FadeToBlack(); fadeToBlack = false; } else { StateManager.Instance.DebugPop(); GotoNextLevel(); } } GUI.Box(new Rect(Screen.width / 2 - 50, Screen.height / 2 - 12, 100, 25), msg); } }
public void OnPressed() { string level = string.Format("Level {0}", GameDataMgr.G.endLevel.ToString()); PopupConfirm temp = PopupConfirm.Open("Prefabs/Popup/GamePopup", "StartPopup", level, null, "Play"); temp.GetComponent <GamePopup>().OnPopup(GamePopupState.start); GamePopupItemGroup item = temp.GetComponentInChildren <GamePopupItemGroup>(); if (item != null) { item.BoosterItemSetting(); item.gameObject.GetComponent <UIWidget>().bottomAnchor.absolute = 50; } temp.onConfirm += () => { SceneFadeInOut fade = gameObject.GetComponentInParent <SceneFadeInOut>(); fade.delayTime = 0.15f; fade.fadeTime = 0.3f; fade.OnPressed(); }; }
void showNewCutscene() { currentlyDisplayingText = 0; //print (goalText [0]); SceneFadeInOut fader = GameObject.Find("screenFader").GetComponent <SceneFadeInOut> (); if (cutscenePos >= cutscenes.Length) { fader.EndScene(); //print ("dONE W CUTSCENES"); SceneManager.LoadScene("SecondLevel", LoadSceneMode.Single); } else { SpriteRenderer showCutscene = GameObject.Find("Cutscene").GetComponent <SpriteRenderer> (); showCutscene.sprite = cutscenes[cutscenePos++]; goalText = allCutsceneText [cutscenePos]; fader.EndScene(); } }
public FadeAction(bool fadeToBlack) { this.fadeToBlack = fadeToBlack; isFinished = false; this.fade = GameObject.Find ("ScreenFader").GetComponent<SceneFadeInOut> (); }
private void Start() { noMove = true; simula = false; syncRunEvent = new AnimationEvent(); anim = transform.Search ("character_rig").GetComponent<Animator> (); effects = transform.Search ("Effects Keen").gameObject; var tileMapGameObject = GameObject.Find("TileMap"); m_tileMap = tileMapGameObject.GetComponent<TileMapBehaviour>(); if (m_tileMap == null) Debug.LogError("TileMapBehaviour not found"); m_levelBehaviour = tileMapGameObject.GetComponent<LevelBehaviour>(); if (m_levelBehaviour == null) Debug.LogError("LevelBehaviour not found"); m_sceneFadeInOut = GameObject.Find("SceneFader").GetComponent<SceneFadeInOut>(); if (m_sceneFadeInOut == null) Debug.LogError("SceneFadeInOut not found"); enemieBehaviourGameObject = GameObject.Find("Enemies"); if (enemieBehaviourGameObject == null) Debug.LogError ("EnemieBehaviour not found"); itemBehaviourGameObject = GameObject.Find("Itens"); if (itemBehaviourGameObject == null) Debug.LogError ("itens obj not found"); blocks = GameObject.Find("Blocks"); if (blocks == null) { Debug.LogError("blocks not found"); return; } mapPrefab= GameObject.Find("Map"); if (mapPrefab == null) { Debug.LogError("Map not found"); return; } swipeToMove = 10; updadeEnemie = false; move_slash = false; enterDoor = 0; haveKey = false; lifeHitParticle.GetComponent<ParticleSystem> ().enableEmission = false; velReal = vel; }
void Start() { // Preload next scene _op = SceneManager.LoadSceneAsync(sceneToLoad.name); // Don't load scene untill time has expired _op.allowSceneActivation = false; if (screenshoots.Length > 2) { // Begin background animation StartCoroutine(BackgroundEffect()); } // Get fade component _sfio = GameObject.FindObjectOfType<SceneFadeInOut>(); }
private void Awake() { sceneAnim = animObj.GetComponent <SceneFadeInOut>(); }
void Start() { MasterServer.ipAddress = "188.226.229.203"; gameState = State.GetInstance(); sceneFadeIn = GameObject.FindGameObjectWithTag("Fader").GetComponent<SceneFadeInOut>(); }
void Update() { if (player == null) { player = GameObject.FindGameObjectWithTag (Tags.player); sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>(); persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> (); } }
void Awake() { fadeIn = true; fadeScr = gameObject.GetComponent<SceneFadeInOut>(); }
// Use this for initialization void Awake() { rawImage = GetComponent <RawImage>(); Instance = this; }
public void Awake() { waitFrame = false; _menuPanel = new Stack<MenuInstance>(); //open a menu if indicated if (startWithMenu != Menu.NONE) { OpenMenu(startWithMenu); } DoConfirmQuitNo(); //get the fading _fading = GetComponent<SceneFadeInOut>(); //get input controller _gameControllerInput = GameObject.FindGameObjectWithTag(Tags.GameController).GetComponent<GameControllerInput>(); backgroundImageMainMenu = backgroundMainMenu.GetComponent<RawImage>(); //Get the scene GameControllerData data = GameObject.FindGameObjectWithTag(Tags.GameData).GetComponent<GameControllerData>(); newContinueGame = data.GetLastUnlockedScene(); }
void Awake() { S = this; FadeImg.rectTransform.localScale = new Vector2(Screen.width, Screen.height); }
void Start() { //anim = gameObject.GetComponent<Animator>; //catcontrol = gameObject.GetComponent<catcontroller>; sceneFadeInOut = GameObject.FindGameObjectWithTag("gamecontroller").GetComponent <SceneFadeInOut> (); }