コード例 #1
0
ファイル: Player.cs プロジェクト: aspirecya/ynov_rpg_project
        //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//


        public static Player MakeStartingPlayer(string name)
        {
            Player player        = new Player(name);
            Weapon defaultWeapon = WorldInitialization.GetWeapon(WorldInitialization.ITEM_WOODEN_SWORD);

            player.currentWeapon  = defaultWeapon;
            player.playerLocation = WorldInitialization.GetLocation(WorldInitialization.LOC_HOME);

            return(player);
        }
コード例 #2
0
        public static void ShowItemInfo(string input)
        {
            string id = input.Substring(4).Trim();

            if (!int.TryParse(id, out int itemID))
            {
                Console.WriteLine("Aucun ID d'item reconnu.");

                ShowPlayerWeapons();
                ShowPlayerPotions();
            }
            else
            {
                Console.WriteLine("{0} - {1}", WorldInitialization.GetItem(itemID).name, WorldInitialization.GetItem(itemID).desc);
            }
        }
コード例 #3
0
ファイル: Player.cs プロジェクト: aspirecya/ynov_rpg_project
 public void Respawn()
 {
     GoTo(WorldInitialization.GetLocation(WorldInitialization.LOC_HOME));
     FullHeal();
 }