Class CreatureFactory
Class that represents a factory of creatures.
Inheritance
System.Object
CreatureFactory
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fibula.Creatures
Assembly: Fibula.Creatures.dll
Syntax
public class CreatureFactory : ICreatureFactory, IThingFactory
Constructors
| Improve this Doc View SourceCreatureFactory(IApplicationContext, IItemFactory)
Initializes a new instance of the CreatureFactory class.
Declaration
public CreatureFactory(IApplicationContext applicationContext, IItemFactory itemFactory)
Parameters
Type | Name | Description |
---|---|---|
IApplicationContext | applicationContext | A reference to the application context. |
IItemFactory | itemFactory | A reference to the item factory in use. |
Properties
| Improve this Doc View SourceApplicationContext
Gets the application context.
Declaration
public IApplicationContext ApplicationContext { get; }
Property Value
Type | Description |
---|---|
IApplicationContext |
ItemFactory
Gets the item factory in use.
Declaration
public IItemFactory ItemFactory { get; }
Property Value
Type | Description |
---|---|
IItemFactory |
Methods
| Improve this Doc View SourceCreate(IThingCreationArguments)
Creates a new IThing.
Declaration
public IThing Create(IThingCreationArguments creationArguments)
Parameters
Type | Name | Description |
---|---|---|
IThingCreationArguments | creationArguments | The arguments for the IThing creation. |
Returns
Type | Description |
---|---|
IThing | A new instance of the IThing. |
CreateCreature(IThingCreationArguments)
Creates a new implementation instance of ICreature depending on the chosen type.
Declaration
public ICreature CreateCreature(IThingCreationArguments creationArguments)
Parameters
Type | Name | Description |
---|---|---|
IThingCreationArguments | creationArguments | The arguments for the IThing creation. |
Returns
Type | Description |
---|---|
ICreature | A new instance of the chosen ICreature implementation. |