public class ๋ณ์๋ช : MonoBehaviour
{
public void LevelSelect(int _int = 0)
{
level = _int;
๊ฒ์ ๋ฐฉ๋ฒ.SetActive(false);
๋ ๋ฒจ ์ ํ.SetActive(true);
GameObject.FindGameObjectWithTag("NextButton").
GetComponent<Button>().interactable = false; // Next Button ์์ผ๋ฉด Null Ex~์๋ฌ ๋ฐ์
if (level == 1)
{
SetEasyMode();
}
if (level == 2)
{
SetHardMode();
}
}
protected void SetEasyMode()
{
LvPanel.SetActive(false);
study8Panel.SetActive(true);
study9Panel.SetActive(false);
if (study8Panel == true)
{
panelstream = 3;
}
Debug.Log("์ฌ์ ์ ์ฅ");
GameObject.FindGameObjectWithTag("NextButton").
GetComponent<Button>().interactable = true; // LevelSelect ์์ ๋นํ์ฑํ ํ Next ๋ฒํผ ํ์ฑํ
}
}
์ด๊ฑฐ๋ฅผ setEzmode๋ง ๋จ๊ฒจ์ ์์ํด๋์ค์์ setezmode๋ฅผ ๋ง์๋๋ก ์ฃผ๋ฌด๋ฅด๊ณ ์์ ํ๊ฒ๋ ํ๋ ค ํ๋๋ฐ ์๋๋๊ฑฐ์ผ??
base ์ฐ๋๊ฑด๊ฐ?
์ฑ ์ผ๋ก๋ ๋ดค๋๋ฐ ์ด์ ๊ธฐ์ต์ด ์๋... ๋ฏธ์น๊ฒ ์ด...
public class ๋ณ์๋ช
2 : ๋ณ์๋ช
{
ย protected void lvSelect()
ย ย {
ย ย ย ย SetEasyMode();
ย ย }
...}
์ฌ๊ธฐ์ ์ ๊ดํธ ์์ ์ฝ๋๋ฅผ ์ง๊ฑฐ๋ ๋๊ดํธ ์ฐ๋๊น ์๋๋ค๊ณ ๊ทธ๋
๋ถ๋ชจํด๋ผ์ค์ protected virtual ๋ฐํ๊ฐ ๋ฉ์๋์ด๋ฆ, ์์์๋ override ๋ฉ์๋์ด๋ฆ ํ๋ฉด ๋๊ฒ ๋ค
์ ๋ฏธ์น ์ด๋ฐ๊ฒ ์๊ตฌ๋ ์ง์ง ๊ณ ๋ง์ ๋๋ ์ฒ์ฌ์ผ