// Use this for initialization void Start() { notUsed = false; oldWeapon = null; oldAugment = null; audioPlacement = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); }
public void SetZone(AudioPlacement zone) { CurrentZone = zone; Tag = zone; UpdateFormTitle(); UpdateUI(); }
public void SetEmitter(AudioPlacement emitter) { CurrentEmitter = emitter; Tag = emitter; UpdateFormTitle(); UpdateUI(); }
// Use this for initialization void Start () { setTransform = transform.localPosition; AP = GameObject.Find ("AudioListener").GetComponent<AudioPlacement> (); swordAnimator = transform.GetComponent<Animator> (); foreach (Transform child in transform) { if (child.name == "Trail") { swordTrail = child.gameObject; } } }
// Use this for initialization void Start() { setTransform = transform.localPosition; AP = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); swordAnimator = transform.GetComponent <Animator> (); foreach (Transform child in transform) { if (child.name == "Trail") { swordTrail = child.gameObject; } } }
// Use this for initialization void Start () { pausePanel.SetActive(false); if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { startButton = "StartMac"; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { startButton = "StartPC"; } isPaused = false; showControls = false; gameAudio = GameObject.Find("AudioListener").GetComponent<AudioPlacement> (); tutorialSprites = Resources.LoadAll("Interface/TutorialFloors", typeof(Sprite)).Cast<Sprite>().ToArray(); }
// Use this for initialization void Start () { playerPrefix = gameObject.name; cur_bullet = Reg_bullet; ChangeWeapon ("Pistol"); curWeap = "Pistol"; playerMovement = transform.GetComponent<PlayerMovement>(); audioPlacement = GameObject.Find("AudioListener").GetComponent<AudioPlacement> (); //Determine shooting buttons for OS and Player if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { shootButtonHoriz = "FireHorizMac" + playerPrefix; shootButtonVert = "FireVertMac" + playerPrefix; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { shootButtonHoriz = "FireHorizPC" + playerPrefix; shootButtonVert = "FireVertPC" + playerPrefix; } }
// Use this for initialization void Start() { pausePanel.SetActive(false); if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { startButton = "StartMac"; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { startButton = "StartPC"; } isPaused = false; showControls = false; gameAudio = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); tutorialSprites = Resources.LoadAll("Interface/TutorialFloors", typeof(Sprite)).Cast <Sprite>().ToArray(); }
// Use this for initialization void Start() { playerPrefix = gameObject.name; cur_bullet = Reg_bullet; ChangeWeapon("Pistol"); curWeap = "Pistol"; playerMovement = transform.GetComponent <PlayerMovement>(); audioPlacement = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); //Determine shooting buttons for OS and Player if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { shootButtonHoriz = "FireHorizMac" + playerPrefix; shootButtonVert = "FireVertMac" + playerPrefix; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { shootButtonHoriz = "FireHorizPC" + playerPrefix; shootButtonVert = "FireVertPC" + playerPrefix; } }
// Use this for initialization void Start () { AP = GameObject.Find ("AudioListener").GetComponent<AudioPlacement> (); AP.PlayClip ("SFX/bullet_fire", 0.1f); }
// Use this for initialization void Start() { AP = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); AP.PlayClip("SFX/bullet_fire", 0.1f); }
public AudioRotationUndoStep(AudioPlacement audio, Quaternion startrot) { Audio = audio; StartRotation = startrot; EndRotation = audio?.Orientation ?? Quaternion.Identity; }
public AudioPositionUndoStep(AudioPlacement audio, Vector3 startpos) { Audio = audio; StartPosition = startpos; EndPosition = audio?.Position ?? Vector3.Zero; }
void Start () { // Scale and Translate UI depending on screen size float inverseHudHeight = 7.32f; foreach (Transform ui in transform) { RectTransform uiTransform = (RectTransform) ui; float newScaleX, newScaleY = 0f; // Health UI Element if (ui.name == "Health") { newScaleX = (Screen.height / (256f * inverseHudHeight)) * 1.83f; // Camera healthDivCam = GameObject.Find("DividerHealth").GetComponent<Camera>(); // healthDivCam.rect = new Rect(healthDivCam.rect.x, healthDivCam.rect.y, healthDivCam.rect.width, newScaleX * 100f / Screen.height); } // Pause Screen else if (ui.name == "Pause") { // Make pause screen invisible when game starts // pauseUI = ui.gameObject; // pauseUI.GetComponent<Image>().color = new Color(0, 0, 0, 0); // pauseUI.transform.GetChild(0).GetComponent<Image>().color = new Color(255, 255, 255, 0); // Get scale for pause background and keep pause text in a locked ratio newScaleY = (Screen.height / 1080f); newScaleX = (Screen.width / 1920f); // if (Mathf.Min(newScaleY, newScaleX) == newScaleX) { // pauseUI.transform.GetChild(0).localScale = new Vector3(newScaleY / newScaleX, 1.0f, 1.0f); // } else { // pauseUI.transform.GetChild(0).localScale = new Vector3(1.0f, newScaleX / newScaleY, 1.0f); // } // Get new anchor position based on screen height float newYPos = Screen.height / -2f; uiTransform.anchoredPosition = new Vector2(0f, newYPos); } // Augment UI Element else { newScaleX = Screen.height / (256f * inverseHudHeight); // Translate Augment UI float newXPos = (Screen.width * 0.99f / 4f) - (512f / 2f * newScaleX); if (ui.name == "P2Hud") { newXPos = -newXPos; } uiTransform.anchoredPosition = new Vector2(newXPos, 0f); } // Rescale UI element newScaleY = (newScaleY == 0f ? newScaleX : newScaleY); uiTransform.localScale = new Vector3(newScaleX, newScaleY, 1.0f); } gameAudio = GameObject.Find("AudioListener").GetComponent<AudioPlacement> (); OpenDoorsExceptFirst(); if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { startButton = "StartMac"; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { startButton = "StartPC"; } if (!gameStarted && !animationStarted && !skipIntro) { animationStarted = true; StartCoroutine("StartIntroAnimation"); } else if (skipIntro) { StartCoroutine("SkipIntroAnimation"); } }
void Start() { // Scale and Translate UI depending on screen size float inverseHudHeight = 7.32f; foreach (Transform ui in transform) { RectTransform uiTransform = (RectTransform)ui; float newScaleX, newScaleY = 0f; // Health UI Element if (ui.name == "Health") { newScaleX = (Screen.height / (256f * inverseHudHeight)) * 1.83f; // Camera healthDivCam = GameObject.Find("DividerHealth").GetComponent<Camera>(); // healthDivCam.rect = new Rect(healthDivCam.rect.x, healthDivCam.rect.y, healthDivCam.rect.width, newScaleX * 100f / Screen.height); } // Pause Screen else if (ui.name == "Pause") { // Make pause screen invisible when game starts // pauseUI = ui.gameObject; // pauseUI.GetComponent<Image>().color = new Color(0, 0, 0, 0); // pauseUI.transform.GetChild(0).GetComponent<Image>().color = new Color(255, 255, 255, 0); // Get scale for pause background and keep pause text in a locked ratio newScaleY = (Screen.height / 1080f); newScaleX = (Screen.width / 1920f); // if (Mathf.Min(newScaleY, newScaleX) == newScaleX) { // pauseUI.transform.GetChild(0).localScale = new Vector3(newScaleY / newScaleX, 1.0f, 1.0f); // } else { // pauseUI.transform.GetChild(0).localScale = new Vector3(1.0f, newScaleX / newScaleY, 1.0f); // } // Get new anchor position based on screen height float newYPos = Screen.height / -2f; uiTransform.anchoredPosition = new Vector2(0f, newYPos); } // Augment UI Element else { newScaleX = Screen.height / (256f * inverseHudHeight); // Translate Augment UI float newXPos = (Screen.width * 0.99f / 4f) - (512f / 2f * newScaleX); if (ui.name == "P2Hud") { newXPos = -newXPos; } uiTransform.anchoredPosition = new Vector2(newXPos, 0f); } // Rescale UI element newScaleY = (newScaleY == 0f ? newScaleX : newScaleY); uiTransform.localScale = new Vector3(newScaleX, newScaleY, 1.0f); } gameAudio = GameObject.Find("AudioListener").GetComponent <AudioPlacement> (); OpenDoorsExceptFirst(); if ((Application.platform == RuntimePlatform.OSXEditor) || (Application.platform == RuntimePlatform.OSXPlayer)) { startButton = "StartMac"; } else if ((Application.platform == RuntimePlatform.WindowsEditor) || (Application.platform == RuntimePlatform.WindowsPlayer)) { startButton = "StartPC"; } if (!gameStarted && !animationStarted && !skipIntro) { animationStarted = true; StartCoroutine("StartIntroAnimation"); } else if (skipIntro) { StartCoroutine("SkipIntroAnimation"); } }
// Use this for initialization void Start () { notUsed = false; oldWeapon = null; oldAugment = null; audioPlacement = GameObject.Find("AudioListener").GetComponent<AudioPlacement> (); }