private void resumeFromTutorial() { Time.timeScale = 1f; pauseMenu thePauseMenu = pauseMenuUI.GetComponent <pauseMenu>(); thePauseMenu.enabled = true; }
void menu() { //GameObject handCursor = GameObject.Find("HandCursor"); pMenu = GetComponent<pauseMenu>(); opMenu = GetComponent<optionsMenu>(); //layout start GUI.BeginGroup(new Rect(Screen.width / 2 - 150, 50, 300, 300)); //the menu background box GUI.Box(new Rect(0, 0, 300, 300), ""); //logo picture //GUI.Label(new Rect(15, 10, 300, 68), logoTexture); ///////main menu buttons //options button kinectRect = new Rect(55, 50, 180, 40); if(GUI.Button(kinectRect, "Using Kinect - "+ (PlayerPrefs.GetInt("useKinect") == 1))) //true if currently using the Kinect. Else false. We want to toggle this. { toggleKinect(); } //back button backRect = new Rect(55, 100, 180, 40); if(GUI.Button(backRect, "Back")) { back (); } //layout end GUI.EndGroup(); }
void Start() { mainmenu = transform.parent.parent.GetComponent <pauseMenu>(); if (mainmenu == null) { mainmenu = transform.parent.parent.parent.GetComponent <pauseMenu>(); } }
private void Start() { _pauseMenu = FindObjectOfType <pauseMenu>(); rb = GetComponent <Rigidbody>(); Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; Application.targetFrameRate = 100; }
void Start() { pausa = FindObjectOfType <pauseMenu>(); inv = FindObjectOfType <inventorySys>(); world = FindObjectOfType <WorldGeneration>(); rb = GetComponent <Rigidbody>(); ArmAnim = arm.GetComponentInChildren <Animator>(); }
void Start() { anim = gameObject.GetComponent <Animator>(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); Move = this.transform.position; sound = GameObject.FindGameObjectWithTag("Sound").GetComponent <SoundManager>(); pausep = GameObject.FindGameObjectWithTag("MainCamera").GetComponentInParent <pauseMenu>(); }
void Start() { // Initialise ray //Cursor.lockState = CursorLockMode.Locked; mainCam = GameObject.Find("MainCamera"); ray = Camera.main.ScreenPointToRay(Input.mousePosition); pauseMenuSript = mainCam.GetComponent <pauseMenu> (); close.GetComponent <Button> ().transform.localScale = new Vector3(0, 0, 0); }
void PauseMenu() { pauseMenu pauseMenu = gameObject.GetComponent <pauseMenu>(); if (!pauseMenu.enabled && !GameObject.Find("round_menu").GetComponent <roundEnd>().enabled) { Time.timeScale = 0.0f; pauseMenu.LoadAchivments(); pauseMenu.enabled = true; } }
void Update() { pauseMenuSript = mainCam.GetComponent <pauseMenu> (); if (pauseMenuSript.pauseEnabled == true) { } else { clicking(); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
void menu() { //GameObject handCursor = GameObject.Find("HandCursor"); pMenu = GetComponent<pauseMenu>(); opMenu = GetComponent<optionsMenu>(); //layout start GUI.BeginGroup(new Rect(Screen.width / 2 - 150, 50, 300, 300)); //the menu background box GUI.Box(new Rect(0, 0, 300, 300), ""); //logo picture //GUI.Label(new Rect(15, 10, 300, 68), logoTexture); ///////main menu buttons //resume button resumeRect = new Rect(55, 50, 180, 40); if(GUI.Button(resumeRect, "Resume")) { resume (); } //options button optionsRect = new Rect(55, 100, 180, 40); if(GUI.Button(optionsRect, "Options")) //TODO: should only appear when there is a game to be continued { options(); } //help button helpRect = new Rect(55, 150, 180, 40); if(GUI.Button(helpRect, "Help")) { help (); } //exit button exitRect = new Rect(55, 200, 180, 40); string buttonText = "Exit Level"; if (worldIndex == 0) //level is levelSelect { buttonText = "Exit to Main Menu"; } if(GUI.Button(exitRect, buttonText)) { exitLevel(); } //layout end GUI.EndGroup(); }
//activate double jump function and show double jump tutorial private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { Time.timeScale = 0f; //pause game doubleJumpTutorial.SetActive(true); //show tutorial screen playerController myPC = player.GetComponent <playerController>(); myPC.canWallJump = true; tutorialController tutorial = player.GetComponent <tutorialController>(); tutorial.doubleJumpTutorialActive = true; pauseMenu thePauseMenu = pauseMenuUI.GetComponent <pauseMenu>(); thePauseMenu.enabled = false; //make it so the player can't pause during the tutorial since game is already paused Destroy(gameObject); myPC.audioRun.enabled = false; myPC.audioSprint.enabled = false; //disable running and sprinting sounds in tutorial screen } }
//activate double jump function and show double jump tutorial private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { Time.timeScale = 0f; //pause game chakraText.SetActive(true); //show tutorial screen playerController myPC = player.GetComponent <playerController>(); myPC.chakraHalf = true; tutorialController tutorial = player.GetComponent <tutorialController>(); tutorial.chakraTextActive = true; pauseMenu thePauseMenu = pauseMenuUI.GetComponent <pauseMenu>(); thePauseMenu.enabled = false; //make it so the player can't pause during the tutorial since game is already paused Destroy(gameObject); myPC.audioRun.enabled = false; myPC.audioSprint.enabled = false; //disable running and sprinting sounds in tutorial screen PlayerPrefs.SetString("ScrollObtained", "true"); } }
// Use this for initialization void Start() { stamm1 = 1; stamm2 = 1; stamm3 = 1; stamm4 = 1; gameObject.GetComponent <Renderer>().material.color = Color.red; a = wieVieleSpieler.GetComponent <wieVieleSpielerS> (); b = MainCamera.GetComponent <pauseMenu>(); c = MainCamera.GetComponent <camaraBewegt>(); länderRot = 1; länderBlau = 1; map = 1; butRect = new Rect((Screen.width - ctrlWidh) / 2, 0, ctrlWidh, ctrlHight); start = -1; GetComponent <Renderer> ().enabled = false; g = Ausbilden.GetComponent <tAusbilden> (); rubinlandan = 1; p = new Vector3(100, 100000, 1000); pa = new Vector3(100, 100000, 1000); }
void Start() { game_menu = GameObject.FindGameObjectWithTag("Menu Canvas").GetComponent <pauseMenu>(); current_t = currentTile.GetComponent <Transform>(); my_inventory = GetComponent <Inventory>(); tile = currentTile.GetComponent <Tile>(); my_anim = GetComponent <Animator>(); gs = GetComponent <GhostSounds>(); enableRotate = false; nextTile = null; move = false; prevAngleF = my_flashight.GetComponent <Flashlight>().angle; prevPhase = OriginalPhase; SetDirection(OriginalPhase); tile.playerOn = true; //tile.DebugGetAllTile(); updateAllPopupLength(); }
void Start() { fireCd = 0f; mFireCd = 0f; sFireCd = 0f; fireRate = 0.15f; mFireRate = 0.25f; sFireRate = 0.4f; onPhysical = true; onMagic = false; onSpecial = false; onEnemy = false; onBoss = false; deathParticleSpawned = false; atZero = false; sBuffIcon.enabled = false; fBuffIcon.enabled = false; pM = FindObjectOfType <pauseMenu>(); }
//pickup kunai private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { if (tutorialKunai) //show kunai tutorial screen when pick up tutorial kunai { kunaiPickup(collision); Time.timeScale = 0f; //pause game tutorialKunaiScreen.SetActive(true); //show tutorial screen tutorialController tutorial = player.GetComponent <tutorialController>(); tutorial.kunaiTutorialActive = true; pauseMenu thePauseMenu = pauseMenuUI.GetComponent <pauseMenu>(); thePauseMenu.enabled = false; //make it so the player can't pause during the tutorial since game is already paused playerController myPC = player.GetComponent <playerController>(); myPC.audioRun.enabled = false; myPC.audioSprint.enabled = false; //disable running and sprinting sounds in tutorial screen } else { kunaiPickup(collision); //if normal kunai then just pickup kunai } } }
// Use this for initialization void Start() { timeStarted = true; a = MainCamera.GetComponent <pauseMenu> (); b = RotDran.GetComponent <Rotistdran> (); }
private void Start() { _sfx = GetComponents <AudioSource>(); menu = GameObject.Find("PauseCanvas").GetComponent <pauseMenu>(); }
void Start() { pauseMenu = character.GetComponent <pauseMenu>(); Cursor.lockState = CursorLockMode.Locked; }
// Update is called once per frame void ResumeGame() { pauseMenu pm = GameObject.Find("HUD").GetComponent <pauseMenu>(); pm.resumeGame(); }
// Use this for initialization void Start() { SplatManagerSystem.instance.m_envRenderer = this.gameObject.GetComponent <Renderer>(); SplatManagerSystem.instance.splatsX = splatsX; SplatManagerSystem.instance.splatsY = splatsY; splatBlitMaterial = new Material(Shader.Find("Splatoonity/SplatBlit")); splatTex = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); splatTex.Create(); splatTexAlt = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); splatTexAlt.Create(); worldPosTex = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); worldPosTex.Create(); worldPosTexTemp = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); worldPosTexTemp.Create(); worldTangentTex = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); worldTangentTex.Create(); worldBinormalTex = new RenderTexture(sizeX, sizeY, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); worldBinormalTex.Create(); Shader.SetGlobalTexture("_SplatTex", splatTex); Shader.SetGlobalTexture("_WorldPosTex", worldPosTex); Shader.SetGlobalTexture("_WorldTangentTex", worldTangentTex); Shader.SetGlobalTexture("_WorldBinormalTex", worldBinormalTex); Shader.SetGlobalVector("_SplatTexSize", new Vector4(sizeX, sizeY, 0, 0)); // Textures for tallying scores RT256 = new RenderTexture(256, 256, 0, RenderTextureFormat.ARGBFloat, RenderTextureReadWrite.Linear); RT256.autoGenerateMips = true; RT256.useMipMap = true; RT256.Create(); RT4 = new RenderTexture(4, 4, 0, RenderTextureFormat.ARGB32, RenderTextureReadWrite.Linear); RT4.Create(); Tex4 = new Texture2D(4, 4, TextureFormat.ARGB32, false); GameObject rtCameraObject = new GameObject(); rtCameraObject.name = "rtCameraObject"; rtCameraObject.transform.position = Vector3.zero; rtCameraObject.transform.rotation = Quaternion.identity; rtCameraObject.transform.localScale = Vector3.one; rtCamera = rtCameraObject.AddComponent <Camera> (); rtCamera.clearFlags = CameraClearFlags.SolidColor; rtCamera.backgroundColor = new Color(0, 0, 0, 0); rtCamera.orthographic = true; rtCamera.nearClipPlane = 0.0f; rtCamera.farClipPlane = 1.0f; rtCamera.orthographicSize = 1.0f; rtCamera.aspect = 1.0f; rtCamera.useOcclusionCulling = false; rtCamera.enabled = false; RenderTextures(); BleedTextures(); StartCoroutine(UpdateScores()); SendColorsToRenderer(); //Dave Changes pMenu = GameObject.Find("PauseCanvas").GetComponent <pauseMenu>(); pMenu.setColors(SplatManagerSystem.instance.Colors); }