ย  ย  public class Define

ย  ย  {

public enum PlayerType

{

None = 0,

Knight = 1,

}

}


enum์šฉ Define ๋งŒ๋“  ๋‹ด์—



public class Creature

{


Define.PlayerType type;

}


ํฌ๋ฆฌ์ณ ๋งŒ๋“ค๊ณ 



public class Knight : Creature

{


type = Define.PlayerType.Knight;


}




ํฌ๋ฆฌ์ณ๋ฅผ ์ƒ์† ๋ฐ›์€ ๋‚˜์ดํŠธ์—์„œ ์ด๋ ‡๊ฒŒ ํ–ˆ๋Š”๋ฐ ์™œ ์•ˆ๋˜๋Š” ๊ฑฐ์ž„?


Define.PlayerType type;


์ด๊ฑฐย ๊ฐ์ฒดํ™”ย ๋งž์ง€?


PlayerType์— ์†ํ•˜๋Š” type๊ฐ์ฒด๋ฅผ ๋งŒ๋“  ๊ฑฐ์ง€?

๊ทธ๋Ÿฐ ๋‹ด์— type์—ย Define.PlayerType.Knight๋ฅผ ๋„ฃ์œผ๋ ค ํ•œ ๊ฑด๋ฐ ์™œ ์•ˆ๋˜๋Š” ๊ฑฐ์•ผ?


Main์—์„œย ์ธ์Šคํ„ด์Šค ๋งŒ๋“ค๊ณ  ์“ฐ๋Š” ๊ฑด ๋˜๋˜๋ฐ

์ด๊ฑด ์•ˆ๋˜๋Š” ์ด์œ ๋ฅผ ๋ชจ๋ฅด๊ฒ ์–ด