Team API - HY-CtrlS/Invaders-SDP GitHub Wiki

CurrencyManager

๋ฉ”์„œ๋“œ๋ช… ํŒŒ๋ผ๋ฏธํ„ฐ ๋ฐ˜ํ™˜๊ฐ’ ์„ค๋ช… ์™ธ๋ถ€ ๋ฉ”์„œ๋“œ
addCurrency int amount void amount๋งŒํผ์˜ ํ™”ํ๋ฅผ ํŒŒ์ผ์— ์ €์žฅํ•œ๋‹ค. FileManager.loadCurrency, FileManager.saveCurrency
spendCurrency int amount boolean amount๊ฐ€ ํ˜„์žฌ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ํ™”ํ๋ณด๋‹ค ํฌ์ง€ ์•Š์œผ๋ฉด, amount๋งŒํผ ํ™”ํ๋ฅผ ๊ฐ์†Œ์‹œํ‚ค๊ณ  true๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค. ๊ทธ๋ ‡์ง€ ์•Š์œผ๋ฉด false๋ฅผ ๋ฐ˜ํ™˜ํ•œ๋‹ค. FileManager.loadCurrency, FileManager.saveCurrency
getCurrency - int ํŒŒ์ผ์—์„œ ํ™”ํ๋Ÿ‰์„ ์ฝ์–ด์™€ ๋ฐ˜ํ™˜ํ•œ๋‹ค. FileManager.loadCurrency ์‚ฌ์šฉ
calculateCurrency int score, double hitrate int ์ ์ˆ˜์™€ ๋ช…์ค‘๋ฅ ์„ ๋ฐ”ํƒ•์œผ๋กœ ์–ป๋Š” ํ™”ํ ์–‘์„ ๊ณ„์‚ฐํ•œ๋‹ค. ๊ทธ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค. -

FileManager

๋ฉ”์„œ๋“œ๋ช… ํŒŒ๋ผ๋ฏธํ„ฐ ๋ฐ˜ํ™˜๊ฐ’ ์„ค๋ช… ์™ธ๋ถ€ ๋ฉ”์„œ๋“œ
loadCurrency - int 'currency' ํŒŒ์ผ์—์„œ ํ™”ํ๋ฅผ ์ฝ์–ด์™€ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
saveCurrency int currency - currency์˜ ์–‘์œผ๋กœ 'currency' ํŒŒ์ผ์— ์ €์žฅํ•œ๋‹ค.
loadGem - int 'currency' ํŒŒ์ผ์—์„œ gem์˜ ์–‘์„ ์ฝ์–ด์™€ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
saveGem int gem - gem์˜ ์–‘์œผ๋กœ 'currency' ํŒŒ์ผ์— gem์„ ์ €์žฅํ•œ๋‹ค.