本文整理汇总了C#中PlantHue类的典型用法代码示例。如果您正苦于以下问题:C# PlantHue类的具体用法?C# PlantHue怎么用?C# PlantHue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlantHue类属于命名空间,在下文中一共展示了PlantHue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: PlantClippings
public PlantClippings(PlantHue hue)
: base(0x4022)
{
m_PlantHue = hue;
InvalidatePlantHue();
Stackable = true;
}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:PlantClippings.cs
示例2: ConsumeReeds
public static bool ConsumeReeds( Container cont, PlantHue hue, int amount )
{
List<SoftenedReeds> reeds = GetReeds( cont, hue );
if ( GetTotalReeds( reeds, hue ) >= amount )
{
for ( int i = 0; i < reeds.Count; i++ )
{
SoftenedReeds reed = reeds[i];
if ( amount >= reed.Amount )
{
amount -= reed.Amount;
reed.Delete();
}
else
{
reed.Amount -= amount;
break;
}
}
return true;
}
else
{
return false;
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:29,代码来源:SoftenedReeds.cs
示例3: SoftenedReeds
public SoftenedReeds( int amount, PlantHue plantHue )
: base(0x4006)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:SoftenedReeds.cs
示例4: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if(v > 0)
m_PlantHue = (PlantHue)reader.ReadInt();
}
开发者ID:Crome696,项目名称:ServUO,代码行数:8,代码来源:PlantClippings.cs
示例5: PlantClippings
public PlantClippings( int amount, PlantHue plantHue )
: base(0x4022)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:PlantClippings.cs
示例6: PlantPigment
public PlantPigment( int amount, PlantHue plantHue )
: base(0xF04)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:PlantPigment.cs
示例7: DryReeds
public DryReeds( int amount, PlantHue plantHue )
: base(0x1BD5)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:8,代码来源:DryReeds.cs
示例8: GetInfo
public static PlantHueInfo GetInfo( PlantHue plantHue )
{
PlantHueInfo info = null;
if (m_Table.TryGetValue(plantHue, out info))
return info;
else
return m_Table[PlantHue.Plain];
}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:9,代码来源:PlantHue.cs
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
/*int version = */
reader.ReadInt();
m_PlantHue = (PlantHue) reader.ReadInt();
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:PlantClippings.cs
示例10: NaturalDye
public NaturalDye( int amount, PlantHue plantHue )
: base(0x182B)
{
PlantHue = plantHue;
Stackable = false;
Weight = 1.0;
Amount = amount;
m_UsesRemaining = 5;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:NaturalDye.cs
示例11: GetInfo
public static PlantHueInfo GetInfo( PlantHue plantHue )
{
PlantHueInfo info = m_Table[plantHue] as PlantHueInfo;
if ( info != null )
return info;
else
return (PlantHueInfo)m_Table[PlantHue.Plain];
}
开发者ID:Godkong,项目名称:Origins,代码行数:9,代码来源:PlantHue.cs
示例12: GetInfo
public static PlantResourceInfo GetInfo( PlantType plantType, PlantHue plantHue )
{
foreach ( PlantResourceInfo info in m_ResourceList )
{
if ( info.PlantType == plantType && info.PlantHue == plantHue )
return info;
}
return null;
}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:10,代码来源:PlantResources.cs
示例13: Seed
public Seed( PlantType plantType, PlantHue plantHue, bool showType ) : base( 0xDCF )
{
Weight = 1.0;
m_PlantType = plantType;
m_PlantHue = plantHue;
m_ShowType = showType;
Hue = PlantHueInfo.GetInfo( plantHue ).Hue;
}
开发者ID:jsrn,项目名称:MidnightWatchServer,代码行数:10,代码来源:Seed.cs
示例14: GetInfo
public static PlantHueInfo GetInfo( PlantHue plantHue )
{
PlantHueInfo info;
m_Table.TryGetValue( plantHue, out info );
if ( info != null )
return info;
else
return m_Table[PlantHue.Plain] as PlantHueInfo;
}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:10,代码来源:PlantHue.cs
示例15: Seed
public Seed(PlantType plantType, PlantHue plantHue, bool showType)
: base(0xDCF)
{
this.Weight = 1.0;
this.Stackable = Core.SA;
this.m_PlantType = plantType;
this.m_PlantHue = plantHue;
this.m_ShowType = showType;
this.Hue = PlantHueInfo.GetInfo(plantHue).Hue;
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:12,代码来源:Seed.cs
示例16: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
this.m_PlantHue = (PlantHue)reader.ReadInt();
break;
}
}
开发者ID:m309,项目名称:ForkUO,代码行数:13,代码来源:MiscSAResources.cs
示例17: InvalidatePlantHue
public void InvalidatePlantHue()
{
PlantHueInfo info = PlantHueInfo.GetInfo(m_PlantHue);
if (info == null)
{
m_PlantHue = PlantHue.Plain;
Hue = 0;
}
else
Hue = info.Hue;
InvalidateProperties();
}
开发者ID:Crome696,项目名称:ServUO,代码行数:14,代码来源:PlantClippings.cs
示例18: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch ( version )
{
case 2:
case 1:
{
m_Level = (SecureLevel) reader.ReadInt();
goto case 0;
}
case 0:
{
if ( version < 1 )
m_Level = SecureLevel.CoOwners;
m_PlantStatus = (PlantStatus) reader.ReadInt();
m_PlantType = (PlantType) reader.ReadInt();
m_PlantHue = (PlantHue) reader.ReadInt();
m_ShowType = reader.ReadBool();
if ( m_PlantStatus < PlantStatus.DecorativePlant )
m_PlantSystem = new PlantSystem( this, reader );
if ( version < 2 && PlantHueInfo.IsCrossable( m_PlantHue ) )
m_PlantHue |= PlantHue.Reproduces;
break;
}
}
m_Instances.Add( this );
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:36,代码来源:PlantItem.cs
示例19: GetTotalReeds
public static int GetTotalReeds( List<SoftenedReeds> reeds, PlantHue hue )
{
int total = 0;
for ( int i = 0; i < reeds.Count; i++ )
total += reeds[i].Amount;
return total;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:9,代码来源:SoftenedReeds.cs
示例20: GetReeds
public static List<SoftenedReeds> GetReeds( List<SoftenedReeds> reeds, PlantHue hue )
{
List<SoftenedReeds> validReeds = new List<SoftenedReeds>();
for ( int i = 0; i < reeds.Count; i++ )
{
SoftenedReeds reed = reeds[i];
if ( reed.PlantHue == hue )
validReeds.Add( reed );
}
return validReeds;
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:14,代码来源:SoftenedReeds.cs
注:本文中的PlantHue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论