本文整理汇总了C#中BeverageType类的典型用法代码示例。如果您正苦于以下问题:C# BeverageType类的具体用法?C# BeverageType怎么用?C# BeverageType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BeverageType类属于命名空间,在下文中一共展示了BeverageType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GobletOfCelebration
public GobletOfCelebration( BeverageType type )
: base(type)
{
LootType = LootType.Blessed;
Weight = 1.0;
Hue = 1158;
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:7,代码来源:GobletOfCelebration.cs
示例2: MurkyMilk
public MurkyMilk( BeverageType type )
: base( type )
{
Name = "Murky Milk";
Weight = 1.0;
Hue = 2306;
LootType = LootType.Blessed;
}
开发者ID:greeduomacro,项目名称:xrunuo,代码行数:8,代码来源:MurkyMilk.cs
示例3: BeverageBuyInfo
public BeverageBuyInfo( string name, Type type, BeverageType content, int price, int amount, int itemID, int hue ) : base( name, type, price, amount, itemID, hue )
{
m_Content = content;
if ( type == typeof( Pitcher ) )
Name = (1048128 + (int)content).ToString();
else if ( type == typeof( BeverageBottle ) )
Name = (1042959 + (int)content).ToString();
else if ( type == typeof( Jug ) )
Name = (1042965 + (int)content).ToString();
}
开发者ID:Godkong,项目名称:Origins,代码行数:11,代码来源:BeverageBuy.cs
示例4: GetCoffee
/// <summary>
/// Get Coffee given the Beverage Type
/// Is Factory Method
/// </summary>
/// <param name="beverageType"></param>
/// <returns></returns>
public IBeverage GetCoffee(BeverageType beverageType)
{
IBeverage coffee = null;
switch (beverageType)
{
case BeverageType.HouseBlend:
coffee = new SpecialHouseBlend();
break;
case BeverageType.Roast:
coffee = new AmazonRoast();
break;
}
return coffee;
}
开发者ID:RookieOne,项目名称:Patterns,代码行数:23,代码来源:ExoticFactory.cs
示例5: GetCoffee
public IBeverage GetCoffee(StoreType storeType, BeverageType beverageType)
{
IBeverage coffee = null;
switch(storeType)
{
case StoreType.RegularStore :
switch (beverageType)
{
case BeverageType.HouseBlend:
coffee = new HouseBlend();
break;
case BeverageType.Roast:
coffee = new DarkRoast();
break;
}
break;
case StoreType.ExoticStore:
switch (beverageType)
{
case BeverageType.HouseBlend:
coffee = new SpecialHouseBlend();
break;
case BeverageType.Roast:
coffee = new AmazonRoast();
break;
}
break;
}
return coffee;
}
开发者ID:RookieOne,项目名称:Patterns,代码行数:37,代码来源:CoffeeStore.cs
示例6: FillableBvrge
public FillableBvrge(int weight, Type type, BeverageType content)
: base(weight, type)
{
this.m_Content = content;
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:5,代码来源:FillableContainers.cs
示例7: BeverageBottle
public BeverageBottle( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例8: GlassMug
public GlassMug( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例9: PewterMug
public PewterMug( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例10: Jug
public Jug( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例11: BaseBeverage
public BaseBeverage( BeverageType type )
{
m_Content = type;
m_Quantity = MaxQuantity;
ItemID = ComputeItemID();
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:6,代码来源:Beverage.cs
示例12: BaseBeverage
public BaseBeverage(BeverageType type)
{
this.m_Content = type;
this.m_Quantity = this.MaxQuantity;
this.ItemID = this.ComputeItemID();
}
开发者ID:rokann,项目名称:JustUO,代码行数:6,代码来源:Beverage.cs
示例13: Drink
/// <summary>
/// Constructor for a beverage
/// </summary>
/// <param name="Ingredients"></param>
/// <param name="Instructions"></param>
/// <param name="Name"></param>
/// <param name="Type"></param>
public void Drink(List<Ingredient> Ingredients, List<string> Instructions, string Name, BeverageType Type)
{
}
开发者ID:adamus1red,项目名称:barduino,代码行数:10,代码来源:Beverage.cs
示例14: GreenGlass
public GreenGlass( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:4,代码来源:GreenGlass.cs
示例15: ConsumeTotal
public static bool ConsumeTotal( Container pack, BeverageType content, int quantity )
{
return ConsumeTotal( pack, typeof( BaseBeverage ), content, quantity );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例16: ConsumeTotal
public static bool ConsumeTotal(Container pack, Type itemType, BeverageType content, int quantity)
{
Item[] items = pack.FindItemsByType(itemType);
// First pass, compute total
int total = items.OfType<BaseBeverage>()
.Where(bev => bev.Content == content && !bev.IsEmpty)
.Sum(bev => bev.Quantity);
if (total >= quantity)
{
// We've enough, so consume it
int need = quantity;
foreach (BaseBeverage bev in items.OfType<BaseBeverage>())
{
if (bev.Content != content || bev.IsEmpty)
{
continue;
}
int theirQuantity = bev.Quantity;
if (theirQuantity < need)
{
bev.Quantity = 0;
need -= theirQuantity;
}
else
{
bev.Quantity -= need;
return true;
}
}
}
return false;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:38,代码来源:Beverage.cs
示例17: Deserialize
public void Deserialize( GenericReader reader, bool read )
{
base.Deserialize( reader );
if ( !read )
return;
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
m_Poisoner = reader.ReadMobile();
goto case 0;
}
case 0:
{
m_Poison = Poison.Deserialize( reader );
m_Content = (BeverageType)reader.ReadInt();
m_Quantity = reader.ReadInt();
break;
}
}
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:25,代码来源:Beverage.cs
示例18: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 4:
ContentName = reader.ReadString();
goto case 3;
case 3:
case 2:
Kick = reader.ReadInt();
goto case 1;
case 1:
Poisoner = reader.ReadMobile();
goto case 0;
case 0:
{
Poison = Poison.Deserialize(reader);
_Content = (BeverageType)reader.ReadInt();
_Quantity = reader.ReadInt();
}
break;
}
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:Beverage.cs
示例19: CeramicMug
public CeramicMug( BeverageType type ) : base( type )
{
Weight = 1.0;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:4,代码来源:Beverage.cs
示例20: BeverageEntry
//default constructor: set up one type, a name, and default 0 quantity
public BeverageEntry( Type type, BeverageType beveragetype, string name ) : this( type, beveragetype, name, 0 )
{
}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:4,代码来源:StoreEntries.cs
注:本文中的BeverageType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论