static public SoundManager instance;
์ด๋ ๊ฒ ์์ฑํด๋๊ฒ ๋ค๋ฅธ ์คํฌ๋ฆฝํธ์์ SoundManager์ ๋ถ๋ฅด๋ฉด ๋ฐ์์ ์ํ๋ค์
static์ผ๋ก ์์ฑํ๊ฑด ์ด๋์๋ ๋ถ๋ฅผ ์ ์๋๊ฑธ๋ก ์๊ณ ์์๋๋ฐ ์...
static public SoundManager instance;
์ด๋ ๊ฒ ์์ฑํด๋๊ฒ ๋ค๋ฅธ ์คํฌ๋ฆฝํธ์์ SoundManager์ ๋ถ๋ฅด๋ฉด ๋ฐ์์ ์ํ๋ค์
static์ผ๋ก ์์ฑํ๊ฑด ์ด๋์๋ ๋ถ๋ฅผ ์ ์๋๊ฑธ๋ก ์๊ณ ์์๋๋ฐ ์...
์ด๋ป๊ฒ ๋ถ๋ ๋์ง์
์ ์ง instance๊ฐ null์ผ๊บผ ๊ฐ์๋ฐ..
ํธ์ถ์์ ๋ ์ฒดํฌํ๊ณ ์ธ์คํด์ค ์ต์ด ์์ฑ ํ์ จ๋์ฌ
์ผ๋จ public static์ผ๋ก ์์๋ฅผ ๋ฐ๊ฟ์ผํ ๊ฑฐ๊ฐ์์ ใ ใ - dc App
๋ ํฌ๊ฒ ์ ์ธํด๋ณด์ธ์~
INSTANCE!!!!!!!!!!!!!
static public ์ด ์๋๋ผ public static์ผ๋ก ๊ณ ์น๊ณ , SoundManager์์ instance๋ฅผ ์ด๊ธฐํ์์ผฐ๋์ง ๋ณด์ .
์ด๊ธฐํ ์ชฝ์์ ์ค์๋ฅผ ํ๋๋ผ๊ตฌ์ ใ ใ ๋๋ถ์ ์ฒดํฌํ๋ฉด์ ๊ณ ์ณฃ์ต๋๋ค.
๊ตฟ๊ตฟ
์ด๊ธฐํ๋ ํ๋๋ฐ ๊ทธ๋ฅ instance = this; ์ด๋ฐ์์ผ๋ก ํด์ SoundManger.instance = this; ๋ก ๊ณ ์น๋ ํด๊ฒฐ ๋์์ต๋๋น