Class ResourceGenerator
Allows a FactionEntity instance (can be a unit or a building) to generate resources.
Inheritance
ResourceGenerator
Implements
IEntityPreInitializable
IEntityPostInitializable
Assembly: cs.temp.dll.dll
Syntax
public class ResourceGenerator : EntityComponentBase, IEntityPreInitializable, IResourceGenerator, IEntityComponent, IMonoBehaviour, IEntityPostInitializable
Fields
tabID
Declaration
Field Value
Properties
audioMgr
Declaration
protected IGameAudioManager audioMgr { get; }
Property Value
Type |
Description |
IGameAudioManager |
|
FactionEntity
Declaration
public IFactionEntity FactionEntity { get; }
Property Value
Type |
Description |
IFactionEntity |
|
globalEvent
Declaration
protected IGlobalEventPublisher globalEvent { get; }
Property Value
Type |
Description |
IGlobalEventPublisher |
|
resourceMgr
Declaration
protected IResourceManager resourceMgr { get; }
Property Value
Type |
Description |
IResourceManager |
|
Resources
Declaration
public IReadOnlyList<ResourceInput> Resources { get; }
Property Value
Type |
Description |
System.Collections.Generic.IReadOnlyList<ResourceInput> |
|
Methods
HandleComponentUpgrade(IEntityComponent)
Declaration
public override void HandleComponentUpgrade(IEntityComponent sourceEntityComponent)
Parameters
Overrides
Declaration
public override ErrorMessage LaunchActionLocal(byte actionID, SetTargetInputData input)
Parameters
Returns
Overrides
OnInit()
Initializer method required for each entity component that gets called by the Entity instance that the component is attached to.
Declaration
protected override void OnInit()
Overrides
OnTaskUICacheUpdate(List<EntityComponentTaskUIAttributes>, List<String>)
Declaration
protected override bool OnTaskUICacheUpdate(List<EntityComponentTaskUIAttributes> taskUIAttributesCache, List<string> disabledTaskCodesCache)
Parameters
Type |
Name |
Description |
List<EntityComponentTaskUIAttributes> |
taskUIAttributesCache |
|
List<String> |
disabledTaskCodesCache |
|
Returns
Overrides
OnTaskUIClick(EntityComponentTaskUIAttributes)
Called when the player clicks on the resource collection task by the TaskUI instance that handles that task.
Declaration
public override bool OnTaskUIClick(EntityComponentTaskUIAttributes taskAttributes)
Parameters
Type |
Name |
Description |
EntityComponentTaskUIAttributes |
taskAttributes |
|
Returns
Overrides
Implements
IEntityPreInitializable
IEntityPostInitializable