Class ItemAttribute
Inheritance
System.Object
ItemAttribute
Assembly: Eco.Gameplay.dll
Syntax
public abstract class ItemAttribute : Attribute
Constructors
ItemAttribute()
Declaration
protected ItemAttribute()
Methods
BuildCache(IEnumerable<Item>)
Declaration
public static void BuildCache(IEnumerable<Item> allItems)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<Item> |
allItems |
|
Get<T>(Type)
Declaration
public static T Get<T>(Type itemType)
where T : ItemAttribute
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
Returns
Type Parameters
Has(Type, Type)
Declaration
public static bool Has(Type itemType, Type attributeType)
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
System.Type |
attributeType |
|
Returns
Type |
Description |
System.Boolean |
|
Has<T>(Type)
Declaration
public static bool Has<T>(Type itemType)
where T : ItemAttribute
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
TryGet<T>(Type, out T)
Tries to get item attribute of requested type.
Declaration
public static bool TryGet<T>(Type itemType, out T attr)
where T : ItemAttribute
Parameters
Type |
Name |
Description |
System.Type |
itemType |
|
T |
attr |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Extension Methods