|
|
|
|
Item[] mOriginalItem Ar r;
mOriginalItem Ar r=newItem[3];
mOriginalItem Ar r[0].Name= "회복 포션(소)";
mOriginalItem Ar r[0].Value= 5;
mOriginalItem Ar r[0].ID= 0;
Console.WriteLine("==========상점========== ");
Console.WriteLine("1.구매");
Console.WriteLine("2. 판매");
|
|
|
|
텍스트RPG 게임만들기
Class Player
C#텍스트RPG 만들기
내용 추가
내용 수정
구매하는 멤버 선언 부삭제
Item[] mOriginalItem Ar r;
mOriginalItem Ar r=newItem[3];
mOriginalItem Ar r[0].Name= "회복 포션(소)";
mOriginalItem Ar r[2].Name= "파이어스크롤";
mLocaliz ationTypeName=newstring[2];
mLocaliz ationTypeName[0]= "회복 포션";
mLocaliz ationTypeName[1]= "주문 스크롤";
Console.Clear();
Console.WriteLine("==========상점========== ");
Console.WriteLine("1.구매");
Console.WriteLine("2. 판매");
Console.WriteLine("3.나가기");
for(inti= 0;i
Console.WriteLine(string. Form at("{0}\t{1}\t{2}\t{3}\t{4}", (i+1). ToSt ring(), mOriginalItem Ar r[i].Name,
string. Form at(mOriginalItem Ar r[i]. Info, mO riginalItem Ar r[i].Value.ToString()),
mLocaliz ationTypeName[(int)mO riginalItem Ar r[i]. ItemType], mOriginalItem Ar r[i].Cost. ToString()
Console.Write("구매 할 아이템의 번호를 입력하세요");
Item item=mO riginalItem Ar r[purchaseCommand].GetCLone();
if(player.UseGold(item.Cost))
if(player.Ad dItem(item)) |
|
ar, r, t, i, moriginalitem, console, riginalitem, mo, writeline, 텍스트, rpg, name, 포션, 출력, 확인, 만들기, string, if, int, item |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|