// Update is called once per frame void Update() { if (difficulty.getLevel() == 1) { this.diffculty_level.GetComponent <Text>().text = "Easy"; } else if (difficulty.getLevel() == 2) { this.diffculty_level.GetComponent <Text>().text = "Medium"; } else { this.diffculty_level.GetComponent <Text>().text = "Hard"; } }
// Use this for initialization void Start() { this.cat = GameObject.Find("cat"); this.flag = GameObject.Find("flag"); this.savepoint = FindObjectOfType <SavePoint>(); this.difficulty = FindObjectOfType <Difficulty_Trigger>(); this.stageclear = FindObjectOfType <StageClear>(); this.checkpoint1 = GameObject.Find("checkpoint1"); this.checkpoint2 = GameObject.Find("checkpoint2"); this.savepoint_obj = GameObject.Find("savepoint"); // 초기 난이도 조정 /* * 난이도 조정 스크립트 * * 하(1) : 세이브 포인트 + 체크 포인트 * 중(2) : 세이브 포인트 * 상(3) : 없음 * */ if (difficulty.getLevel() == 2) { checkpoint1.SetActive(false); checkpoint2.SetActive(false); } else if (difficulty.getLevel() == 3) { checkpoint1.SetActive(false); checkpoint2.SetActive(false); savepoint_obj.SetActive(false); } else { checkpoint1.SetActive(true); checkpoint2.SetActive(true); savepoint_obj.SetActive(true); } }