private void Start() { entity = Battle.playerEntity; animator = GetComponentInChildren <Animator>(); myTransform = GetComponent <Transform>(); ds = gameObject.GetComponentInChildren <DragonSoundPlayer> (); stunGO = null; }
public void Start() { animator = GetComponentInChildren <Animator>(); ds = gameObject.GetComponentInChildren <DragonSoundPlayer> (); fireSound = true; princeAttack = true; ready = true; }
void Start() { curSkill = 0; curTurn = 0; curEnemy = 0; ActivateIndicator(0); battleResults.gameObject.SetActive(false); ds = gameObject.GetComponentInChildren <DragonSoundPlayer> (); }
void Start() { ds = GameObject.FindObjectOfType <DragonSoundPlayer> (); Scene currentScene = SceneManager.GetActiveScene(); if (currentScene.name != "end_game") { cs = GameObject.FindObjectOfType <CameraScript> (); ms = GameObject.FindObjectOfType <MovementScript> (); player = GameObject.FindGameObjectWithTag("Player"); /* Resolutions Dropdown Initialization */ resolutionsDropdown = GameObject.FindGameObjectWithTag("ResolutionsDropdown").GetComponent <TMP_Dropdown>(); resolutionsDropdown.ClearOptions(); resolutions = Screen.resolutions; List <string> options = new List <string> (); int currentResolutionValue = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions [i].width + " x " + resolutions [i].height; options.Add(option); if (resolutions [i].width == Screen.currentResolution.width && resolutions [i].height == Screen.currentResolution.height) { currentResolutionValue = i; } } resolutionsDropdown.AddOptions(options); resolutionsDropdown.value = currentResolutionValue; resolutionsDropdown.RefreshShownValue(); /* Quality Dropdown Initialization */ qualityDropdown = GameObject.FindGameObjectWithTag("QualityDropdown").GetComponent <TMP_Dropdown>(); qualityDropdown.value = QualitySettings.GetQualityLevel(); qualityDropdown.RefreshShownValue(); fullscreenToggle = GameObject.FindGameObjectWithTag("FullscreenToggle").GetComponent <Toggle>(); fullscreenToggle.isOn = Screen.fullScreen; float volume = 0; FMODUnity.RuntimeManager.GetBus("bus:/").getVolume(out volume, out volume); volumeSlider = GameObject.FindGameObjectWithTag("VolumeSlider").GetComponent <Slider>(); volumeSlider.value = volume; /* Hides Pause and Setting Menus */ pauseMenu = GameObject.FindGameObjectWithTag("Pause"); settingsMenu = GameObject.FindGameObjectWithTag("Settings"); if (currentScene.name != "main_menu_scene") { pauseMenu.SetActive(false); } settingsMenu.SetActive(false); if (currentScene.name == "main_menu_scene" && !File.Exists(Application.persistentDataPath + "/playerInfo.dat")) { GameObject.FindGameObjectWithTag("ResumeButton").GetComponent <Button>().interactable = false; } } }
void Start() { sc = FindObjectOfType <StoryController> (); dp = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <DragonSoundPlayer> (); }