Search Results for

    Show / Hide Table of Contents

    Class ResourceGenerator

    Allows a FactionEntity instance (can be a unit or a building) to generate resources.

    Inheritance
    Object
    EntityComponentBase
    ResourceGenerator
    Implements
    IEntityPreInitializable
    IResourceGenerator
    IEntityComponent
    IMonoBehaviour
    IEntityPostInitializable
    Inherited Members
    EntityComponentBase.IsInitialized
    EntityComponentBase.AllowPreEntityInit
    EntityComponentBase.Code
    EntityComponentBase.Entity
    EntityComponentBase.IsActive
    EntityComponentBase.Data
    EntityComponentBase.logger
    EntityComponentBase.playerMsgHandler
    EntityComponentBase.gameMgr
    EntityComponentBase.OnEntityPreInit(IGameManager, IEntity)
    EntityComponentBase.OnEntityPostInit(IGameManager, IEntity)
    EntityComponentBase.Disable()
    EntityComponentBase.OnDisabled()
    EntityComponentBase.ActiveStatusUpdate
    EntityComponentBase.OnFactionUpdateStart()
    EntityComponentBase.OnFactionUpdateComplete()
    EntityComponentBase.SetActive(Boolean, Boolean)
    EntityComponentBase.SetActiveLocal(Boolean, Boolean)
    EntityComponentBase.OnActiveStatusUpdated()
    EntityComponentBase.LaunchAction(Byte, SetTargetInputData)
    EntityComponentBase.OnTaskUIRequest(IReadOnlyList<EntityComponentTaskUIAttributes>, IReadOnlyList<String>)
    EntityComponentBase.OnAwaitingTaskTargetSet(EntityComponentTaskUIAttributes, TargetData<IEntity>)
    Namespace: RTSEngine.EntityComponent
    Assembly: cs.temp.dll.dll
    Syntax
    public class ResourceGenerator : EntityComponentBase, IEntityPreInitializable, IResourceGenerator, IEntityComponent, IMonoBehaviour, IEntityPostInitializable

    Fields

    tabID

    Declaration
    public Int2D tabID
    Field Value
    Type Description
    Int2D

    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
    Type Name Description
    IEntityComponent sourceEntityComponent
    Overrides
    EntityComponentBase.HandleComponentUpgrade(IEntityComponent)

    LaunchActionLocal(Byte, SetTargetInputData)

    Declaration
    public override ErrorMessage LaunchActionLocal(byte actionID, SetTargetInputData input)
    Parameters
    Type Name Description
    System.Byte actionID
    SetTargetInputData input
    Returns
    Type Description
    ErrorMessage
    Overrides
    EntityComponentBase.LaunchActionLocal(Byte, SetTargetInputData)

    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
    EntityComponentBase.OnInit()

    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
    Type Description
    Boolean
    Overrides
    EntityComponentBase.OnTaskUICacheUpdate(List<EntityComponentTaskUIAttributes>, List<String>)

    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
    Type Description
    Boolean
    Overrides
    EntityComponentBase.OnTaskUIClick(EntityComponentTaskUIAttributes)

    Implements

    IEntityPreInitializable
    IResourceGenerator
    IEntityComponent
    IMonoBehaviour
    IEntityPostInitializable
    In This Article
    Back to top Unity RTS Engine Documentation