void Start() { anim.GetComponent <Image>().sprite = spriteToFade; anim.gameObject.SetActive(true); save = gameObject.GetComponent <Saveing>(); save.notmenu = false; LastLevel = save.LastLevel; PlayerPrefs.DeleteKey("beforeBorders0"); anim.SetBool("FadeOut", false); gotolevel = -1; fade = false; ExitUI.SetActive(false); NewGameUI.SetActive(false); sc = gameObject.GetComponent <LoadTargetScript>(); Cursor.lockState = CursorLockMode.None; //Odblokowanie kursora myszy. Cursor.visible = true; //Pokazanie kursora. infoDeskActive = false; //tablica z informacją o projekcie jest wyłączona InfoDesk.SetActive(false); keyMenager = GameObject.Find("KeyMenager").GetComponent <KeyMenager>(); }
//static public GameObject powerUI; void Start() { //początkowe wartości PlayerFighting = false; ChangeToZero = true; YouGetBoard.SetActive(false); YouGet.text = " "; for (int i = 0; i < note.Length; i++) { note[i] = 0; } LevelId = Application.loadedLevel; save = gameObject.GetComponent <Saveing>(); DeadScreenImage.SetActive(false); NewLevelInstantiate = false; // data = gameObject.GetComponent<itemDataBase>(); awake = true; soundHolder = GameObject.Find("SoundHolder").GetComponent <SoundHolder>(); keyMenager = GameObject.Find("KeyMenager").GetComponent <KeyMenager>(); soundHolder.isloading = true; eq = GameObject.Find("Equipment").GetComponent <CanvasEkwipunek>(); saving = false; loadScene = false; player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Controller>(); playerAtckScript = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerAttack>(); loadScript = gameObject.GetComponent <LoadTargetScript>(); itd = gameObject.GetComponent <itemDataBase>(); Debug.Log("itd nie jest null"); save.Load(); itemDataBaseChest = gameObject.GetComponent <itemDataBaseChest>(); if (itemDataBaseChest != null) //jezeli znajduje się skrzynia na planszy { Debug.Log("itemDataBaseChest nie jest null"); save.ChestLoad(LevelId); } RefreshEqStats(); soundHolder.isloading = false; if (PlayerPrefs.HasKey("difficultLevel")) //załadowanie poziomu trudności { difficultLevel = PlayerPrefs.GetInt("difficultLevel"); } settings.load(); //załadowanie ustawień exp_Slider = GameObject.Find("SkillUI").GetComponent <Exp_Slider>(); }