当前位置: 首页>>代码示例>>C#>>正文


C# TradeAndTravel.Location类代码示例

本文整理汇总了C#中TradeAndTravel.Location的典型用法代码示例。如果您正苦于以下问题:C# Location类的具体用法?C# Location怎么用?C# Location使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Location类属于TradeAndTravel命名空间,在下文中一共展示了Location类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TravelTo

 public void TravelTo(Location location)
 {
     if (location != null)
     {
         this.Location = location;
     }
 }
开发者ID:BorislavIvanov,项目名称:Telerik_Academy,代码行数:7,代码来源:Merchant.cs

示例2: CreateItem

        protected override Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item)
        {
            switch (itemTypeString)
            {
                case "weapon":
                    {
                        item = new Weapon(itemNameString, itemLocation);
                        return item;
                    }
                case "wood":
                    {
                        item = new Wood(itemNameString, itemLocation);
                        return item;
                    }
                case "iron":
                    {
                        item = new Iron(itemNameString, itemLocation);
                        return item;
                    }

                default:
                    {
                        return base.CreateItem(itemTypeString, itemNameString, itemLocation, item);
                    }
            }
        }
开发者ID:Varbanov,项目名称:TelerikAcademy,代码行数:26,代码来源:AdvancedInteractionManager.cs

示例3: CreatePerson

 protected override Person CreatePerson(string personTypeString, string personNameString, Location personLocation)
 {
     switch (personTypeString)
     { 
         case "merchant":
             return new Merchant(personNameString, personLocation);
         default:
             return base.CreatePerson(personTypeString, personNameString, personLocation);
     }
 }
开发者ID:AndrewMitev,项目名称:Telerik-Academy,代码行数:10,代码来源:ExtendedInteractionManager.cs

示例4: CreatePerson

 protected override Person CreatePerson(string personTypeString, string personNameString, Location personLocation)
 {
     Person person = null;
     switch (personTypeString)
     {
         case "merchant":
             person = new Merchant(personNameString, personLocation);
             break;
         default: return base.CreatePerson(personTypeString, personNameString, personLocation);
     }
     return person;
 }
开发者ID:Roshov,项目名称:Telerik-Software-Academy-,代码行数:12,代码来源:MediatorInteractionManager.cs

示例5: Item

        protected Item(string name, int itemValue, string type, Location location = null)
            : base(name)
        {
            this.Value = itemValue;

            foreach (var itemType in (ItemType[])Enum.GetValues(typeof(ItemType)))
            {
                if (itemType.ToString() == type)
                {
                    this.ItemType = itemType;
                }
            }
        }
开发者ID:jesusico83,项目名称:Telerik,代码行数:13,代码来源:Item.cs

示例6: CreateItem

 protected override Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item)
 {
     switch (itemTypeString)
     {
         case "weapon":
             item = new Weapon(itemNameString, itemLocation);
             break;
         case "iron":
             item = new Iron(itemNameString, itemLocation);
             break;
         default:
             return base.CreateItem(itemTypeString, itemNameString, itemLocation,item);
             break;
     }
     return item;
 }
开发者ID:melliemello,项目名称:TelerikAcademyHomeworks,代码行数:16,代码来源:InteractionsManagerExtended.cs

示例7: CreateItem

        protected override Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item)
        {
            Item itemToBeCreated = null;
            switch (itemTypeString)
            {
                case "weapon":
                    itemToBeCreated = new Weapon(itemNameString, itemLocation);
                    break;
                case "wood":
                    itemToBeCreated = new Wood(itemNameString, itemLocation);
                    break;
                default:
                    itemToBeCreated = base.CreateItem(itemTypeString, itemNameString, itemLocation, itemToBeCreated);
                    break;
            }

            return itemToBeCreated;
        }
开发者ID:monikaBchvarova,项目名称:C-Sharp,代码行数:18,代码来源:InteractionManagerExtended.cs

示例8: CreateItem

 protected virtual Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item)
 {
     switch (itemTypeString)
     {
         case "armor":
             item = new Armor(itemNameString, itemLocation);
             break;
         case "weapon":
             item = new Weapon(itemNameString, itemLocation);
             break;
         case "wood":
             item = new Wood(itemNameString, itemLocation);
             break;
         case "iron":
             item = new Iron(itemNameString, itemLocation);
             break;
         default:
             break;
     }
     return item;
 }
开发者ID:VictorGeorgiev,项目名称:Telerik-Software-Academy,代码行数:21,代码来源:InteractionManager.cs

示例9: CreateItem

        protected override Item CreateItem(string itemTypeString, string itemNameString, Location itemLocation, Item item)
        {
            if (itemTypeString == "armor")
            {
                base.CreateItem(itemTypeString, itemNameString, itemLocation, item);
            }

            switch (itemTypeString)
            {
                case "weapon":
                    item = new Weapon(itemNameString, itemLocation);
                    break;
                case "wood":
                    item = new Wood(itemNameString, itemLocation);
                    break;
                case "iron":
                    item = new Iron(itemNameString, itemLocation);
                    break;
                default:
                    break;
            }

            return item;
        }
开发者ID:dirk-dagger-667,项目名称:telerik-c--OOP-exam-prep,代码行数:24,代码来源:InteractionManagerExtended.cs

示例10: Weapon

 public Weapon(string name, Location location = null)
     : base(name, Weapon.InitialValue, ItemType.Weapon, location)
 {
 }
开发者ID:enchev-93,项目名称:Telerik-Academy,代码行数:4,代码来源:Weapon.cs

示例11: CreatePerson

 protected virtual Person CreatePerson(string personTypeString, string personNameString, Location personLocation)
 {
     Person person = null;
     switch (personTypeString)
     {
         case "shopkeeper":
             person = new Shopkeeper(personNameString, personLocation);
             break;
         case "traveller":
             person = new Traveller(personNameString, personLocation);
             break;
         default:
             break;
     }
     return person;
 }
开发者ID:alex687,项目名称:SoftUni-Homeworks,代码行数:16,代码来源:InteractionManager.cs

示例12: Iron

 public Iron(string name, string type, Location location = null)
     : base(name, 3, type, location) { }
开发者ID:nikolay-radkov,项目名称:Telerik-Academy,代码行数:2,代码来源:Iron.cs

示例13: Traveller

 public Traveller(string name, Location location)
     : base(name, location)
 {
 }
开发者ID:GenoGenov,项目名称:TelerikAcademyAssignments,代码行数:4,代码来源:Text.cs

示例14: Iron

 public Iron(string name, Location location = null)
     : base(name, Iron.GeneralIronValue, ItemType.Iron, location)
 {
 }
开发者ID:NK-Hertz,项目名称:Telerik-Academy-2014,代码行数:4,代码来源:Iron.cs

示例15: Person

 public Person(string name, Location location)
     : base(name)
 {
     this.Location = location;
     this.inventoryItems = new HashSet<Item>();
 }
开发者ID:GenoGenov,项目名称:TelerikAcademyAssignments,代码行数:6,代码来源:Text.cs


注:本文中的TradeAndTravel.Location类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。