void Start() { myPanel.enabled = false; boss.SetActive(false); bk_source =GetComponent<AudioSource>(); fade = GetComponent<FadingScript> (); }
private void Awake() { FadingScript fs = gameObject.AddComponent <FadingScript>(); fs.img = loadingImage; loadingImage.enabled = true; fs.nextSceneName = null; fs.StartAnimation(true); }
public void Play() { // Save prefs PlayerPrefs.SetInt("HouseNumber", houseNum); PlayerPrefs.SetInt("GrowTrees", System.Convert.ToInt32(growTrees)); PlayerPrefs.SetInt("IvyGrowingSpeed", (int)ivyGrowingSpeed); PlayerPrefs.SetInt("DestructionStart", (int)destructionStart); PlayerPrefs.SetInt("SitesPerTriangle", sitesPerTriangle); // Change scene FadingScript fs = gameObject.AddComponent <FadingScript>(); fs.img = loadingImage; loadingImage.enabled = true; loadingImage.raycastTarget = true; fs.nextSceneName = "GameScene"; fs.StartAnimation(false); //SceneManager.LoadScene("GameScene"); }
private void Awake() { fading = gameObject.GetComponent<FadingScript>(); }
void Start() { GameObject fadingObject = GameObject.Find("Level Changer"); fadingScript = fadingObject.GetComponent <FadingScript>(); }
public void Fade() { fading = gameObject.GetComponent<FadingScript>(); fading.fadeSpeed = 0.04f; fading.BeginFade(1); }
void Start() { fadeScriptObject = fadeScreen.GetComponent <FadingScript>(); }