예제 #1
0
        public void Start()
        {
            Console.ForegroundColor = ConsoleColor.Cyan;
            Console.WriteLine("Hello Friend! What do you go by?");
            string name = Console.ReadLine();
            char   input;

            GetInput(out input, "knight", "wizzard", "mage", "Welecome " + name + " !" + " Please select a role");


            if (input == '1')
            {
                player = new player(name, 250, 50, "Knight");
            }

            else if (input == '2')
            {
                player = new player(name, 300, 70, "Wizzard");
            }

            else if (input == '3')
            {
                player = new player(name, 150, 25, "Mage");
            }
            else
            {
                Console.WriteLine("Invalid input. Using default stats");
            }
            //Prints player stats to the screen
            Console.WriteLine("Player Name: " + player.getName());
            Console.WriteLine("Player Level: " + level);
            Console.WriteLine("Player Role: " + player.getRole());
            Console.WriteLine("Player Health: " + player.getHealth());
            Console.WriteLine("Press any key to continue");
            input = Console.ReadKey().KeyChar;
            Console.Clear();
        }
예제 #2
0
파일: shop.cs 프로젝트: kenjare/shop
 //gets called when the player runs away                        //refrences the palyer purchase
 public void OpenShopMenu(player p)
 {
     _shieldMod = p._shieldValue;
     _arrowMod  = p._weaponValue;
 }
예제 #3
0
파일: shop.cs 프로젝트: kenjare/shop
 public void TryBuy(string item, int cost, player p)
 {
     if (p.GetGold() >= cost)
     {
     }
 }
예제 #4
0
 public bool Sell(player _player, int shopIndex, int playerIndex)
 {
     return(player.Buy(_inventory[shopIndex], playerIndex));
 }