// Start is called before the first frame update void Start() { savedScore = PlayerPrefs.GetInt(KeyString, 0); if (Advertisement.IsReady()) { Advertisement.Show("video"); } try { fs = GameObject.Find("forScore").GetComponent <forScore>(); Score_int = fs.score_save; } catch { Score_int = 0; } if (savedScore < Score_int) { PlayerPrefs.SetInt(KeyString, Score_int); } Score_Text.text = "점수 : " + Score_int + "점"; }
void Start() { //요것저것 찾는 과정 se1 = GameObject.Find("1").GetComponent <AudioSource>(); se2 = GameObject.Find("2").GetComponent <AudioSource>(); se3 = GameObject.Find("3").GetComponent <AudioSource>(); se4 = GameObject.Find("4").GetComponent <AudioSource>(); se5 = GameObject.Find("4").GetComponent <AudioSource>(); fs = GameObject.Find("forScore").GetComponent <forScore>(); }