本文整理汇总了C#中PlantHue类的典型用法代码示例。如果您正苦于以下问题:C# PlantHue类的具体用法?C# PlantHue怎么用?C# PlantHue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlantHue类属于命名空间,在下文中一共展示了PlantHue类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PlantClippings
public PlantClippings(PlantHue hue)
: base(0x4022)
{
m_PlantHue = hue;
InvalidatePlantHue();
Stackable = true;
}
示例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;
}
}
示例3: SoftenedReeds
public SoftenedReeds( int amount, PlantHue plantHue )
: base(0x4006)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
示例4: Deserialize
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if(v > 0)
m_PlantHue = (PlantHue)reader.ReadInt();
}
示例5: PlantClippings
public PlantClippings( int amount, PlantHue plantHue )
: base(0x4022)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
示例6: PlantPigment
public PlantPigment( int amount, PlantHue plantHue )
: base(0xF04)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
示例7: DryReeds
public DryReeds( int amount, PlantHue plantHue )
: base(0x1BD5)
{
PlantHue = plantHue;
Stackable = true;
Weight = 1.0;
Amount = amount;
}
示例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];
}
示例9: Deserialize
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
/*int version = */
reader.ReadInt();
m_PlantHue = (PlantHue) reader.ReadInt();
}
示例10: NaturalDye
public NaturalDye( int amount, PlantHue plantHue )
: base(0x182B)
{
PlantHue = plantHue;
Stackable = false;
Weight = 1.0;
Amount = amount;
m_UsesRemaining = 5;
}
示例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];
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}