Search Results for

    Show / Hide Table of Contents

    Class Entity

    Inheritance
    Object
    Entity
    FactionEntity
    Resource
    Implements
    IEntity
    IMonoBehaviour
    Namespace: RTSEngine.Entities
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class Entity : MonoBehaviour, IEntity, IMonoBehaviour, IEquatable<IEntity>

    Fields

    tabID

    Declaration
    public Int2D tabID
    Field Value
    Type Description
    Int2D

    Properties

    ActiveAttackComponents

    Declaration
    public IEnumerable<IAttackComponent> ActiveAttackComponents { get; }
    Property Value
    Type Description
    IEnumerable<IAttackComponent>

    AddableUnitComponents

    Declaration
    public IReadOnlyDictionary<string, IAddableUnit> AddableUnitComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<String, IAddableUnit>

    AnimatorController

    Declaration
    public IAnimatorController AnimatorController { get; }
    Property Value
    Type Description
    IAnimatorController

    AttackComponents

    Declaration
    public IReadOnlyList<IAttackComponent> AttackComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<IAttackComponent>

    AttackComponentsDic

    Declaration
    public IReadOnlyDictionary<string, IAttackComponent> AttackComponentsDic { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<String, IAttackComponent>

    attackMgr

    Declaration
    protected IAttackManager attackMgr { get; }
    Property Value
    Type Description
    IAttackManager

    AudioSourceComponent

    Declaration
    public AudioSource AudioSourceComponent { get; }
    Property Value
    Type Description
    AudioSource

    CanAttack

    Declaration
    public bool CanAttack { get; }
    Property Value
    Type Description
    Boolean

    CanLaunchTask

    Declaration
    public virtual bool CanLaunchTask { get; }
    Property Value
    Type Description
    Boolean

    Category

    Declaration
    public IEnumerable<string> Category { get; }
    Property Value
    Type Description
    IEnumerable<String>

    Code

    Declaration
    public string Code { get; }
    Property Value
    Type Description
    String

    Description

    Declaration
    public string Description { get; }
    Property Value
    Type Description
    String

    EntityComponents

    Declaration
    public IReadOnlyDictionary<string, IEntityComponent> EntityComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<String, IEntityComponent>

    entityComponentUpgradeMgr

    Declaration
    protected IEntityComponentUpgradeManager entityComponentUpgradeMgr { get; }
    Property Value
    Type Description
    IEntityComponentUpgradeManager

    EntityTargetComponents

    Declaration
    public IReadOnlyDictionary<string, IEntityTargetComponent> EntityTargetComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<String, IEntityTargetComponent>

    EntityTargetProgressComponents

    Declaration
    public IReadOnlyDictionary<string, IEntityTargetProgressComponent> EntityTargetProgressComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyDictionary<String, IEntityTargetProgressComponent>

    FactionID

    Declaration
    public int FactionID { get; protected set; }
    Property Value
    Type Description
    Int32

    FirstActiveAttackComponent

    Declaration
    public IAttackComponent FirstActiveAttackComponent { get; }
    Property Value
    Type Description
    IAttackComponent

    gameMgr

    Declaration
    protected IGameManager gameMgr { get; }
    Property Value
    Type Description
    IGameManager

    globalEvent

    Declaration
    protected IGlobalEventPublisher globalEvent { get; }
    Property Value
    Type Description
    IGlobalEventPublisher

    Health

    Declaration
    public IEntityHealth Health { get; protected set; }
    Property Value
    Type Description
    IEntityHealth

    Icon

    Declaration
    public Sprite Icon { get; }
    Property Value
    Type Description
    Sprite

    inputMgr

    Declaration
    protected IInputManager inputMgr { get; }
    Property Value
    Type Description
    IInputManager

    IsDummy

    Declaration
    public virtual bool IsDummy { get; }
    Property Value
    Type Description
    Boolean

    IsFree

    Declaration
    public bool IsFree { get; protected set; }
    Property Value
    Type Description
    Boolean

    IsIdle

    Declaration
    public bool IsIdle { get; }
    Property Value
    Type Description
    Boolean

    IsInitialized

    Declaration
    public bool IsInitialized { get; }
    Property Value
    Type Description
    Boolean

    IsInteractable

    Declaration
    public bool IsInteractable { get; protected set; }
    Property Value
    Type Description
    Boolean

    IsSearchable

    Declaration
    public bool IsSearchable { get; }
    Property Value
    Type Description
    Boolean

    Key

    Declaration
    public int Key { get; }
    Property Value
    Type Description
    Int32

    logger

    Declaration
    protected IGameLoggingService logger { get; }
    Property Value
    Type Description
    IGameLoggingService

    MinimapIconHandler

    Declaration
    public IEntityMinimapIconHandler MinimapIconHandler { get; }
    Property Value
    Type Description
    IEntityMinimapIconHandler

    Model

    Declaration
    public GameObject Model { get; }
    Property Value
    Type Description
    GameObject

    MovementComponent

    Declaration
    public IMovementComponent MovementComponent { get; }
    Property Value
    Type Description
    IMovementComponent

    mvtMgr

    Declaration
    protected IMovementManager mvtMgr { get; }
    Property Value
    Type Description
    IMovementManager

    Name

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    String

    PendingTaskEntityComponents

    Declaration
    public IReadOnlyList<IPendingTaskEntityComponent> PendingTaskEntityComponents { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<IPendingTaskEntityComponent>

    PendingTasksHandler

    Declaration
    public IPendingTasksHandler PendingTasksHandler { get; }
    Property Value
    Type Description
    IPendingTasksHandler

    playerMsgHandler

    Declaration
    protected IPlayerMessageHandler playerMsgHandler { get; }
    Property Value
    Type Description
    IPlayerMessageHandler

    Radius

    Declaration
    public float Radius { get; protected set; }
    Property Value
    Type Description
    System.Single

    Selection

    Declaration
    public IEntitySelection Selection { get; }
    Property Value
    Type Description
    IEntitySelection

    SelectionColor

    Declaration
    public Color SelectionColor { get; protected set; }
    Property Value
    Type Description
    Color

    SelectionMarker

    Declaration
    public IEntitySelectionMarker SelectionMarker { get; }
    Property Value
    Type Description
    IEntitySelectionMarker

    selectionMgr

    Declaration
    protected ISelectionManager selectionMgr { get; }
    Property Value
    Type Description
    ISelectionManager

    selector

    Declaration
    protected ISelector selector { get; }
    Property Value
    Type Description
    ISelector

    Slot

    Declaration
    public IFactionSlot Slot { get; }
    Property Value
    Type Description
    IFactionSlot

    taskMgr

    Declaration
    protected ITaskManager taskMgr { get; }
    Property Value
    Type Description
    ITaskManager

    TasksQueue

    Declaration
    public IEntityTasksQueueHandler TasksQueue { get; }
    Property Value
    Type Description
    IEntityTasksQueueHandler

    Type

    Declaration
    public abstract EntityType Type { get; }
    Property Value
    Type Description
    EntityType

    WorkerMgr

    Declaration
    public IEntityWorkerManager WorkerMgr { get; }
    Property Value
    Type Description
    IEntityWorkerManager

    Methods

    CanMove()

    Declaration
    public bool CanMove()
    Returns
    Type Description
    Boolean

    CanMove(Boolean)

    Declaration
    public virtual bool CanMove(bool playerCommand)
    Parameters
    Type Name Description
    Boolean playerCommand
    Returns
    Type Description
    Boolean

    CompleteInit()

    Declaration
    protected void CompleteInit()

    Disable(Boolean, Boolean)

    Declaration
    protected virtual void Disable(bool isUpgrade, bool isFactionUpdate)
    Parameters
    Type Name Description
    Boolean isUpgrade
    Boolean isFactionUpdate

    DisableComponents()

    Declaration
    protected void DisableComponents()

    Equals(IEntity)

    Declaration
    public bool Equals(IEntity other)
    Parameters
    Type Name Description
    IEntity other
    Returns
    Type Description
    Boolean

    FetchComponents()

    Declaration
    protected virtual void FetchComponents()

    GetEntityComponent<T>()

    Declaration
    protected T GetEntityComponent<T>()
        where T : IEntityComponent
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetEntityComponents<T>()

    Declaration
    protected IEnumerable<T> GetEntityComponents<T>()
        where T : IEntityComponent
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    Init(IGameManager, InitEntityParameters)

    Declaration
    public virtual void Init(IGameManager gameMgr, InitEntityParameters initParams)
    Parameters
    Type Name Description
    IGameManager gameMgr
    InitEntityParameters initParams

    InitComponents(Boolean, Boolean)

    Declaration
    protected void InitComponents(bool initPre = false, bool initPost = false)
    Parameters
    Type Name Description
    Boolean initPre
    Boolean initPost

    InitPrefab(IGameManager)

    Declaration
    public virtual void InitPrefab(IGameManager gameMgr)
    Parameters
    Type Name Description
    IGameManager gameMgr

    InitPriorityComponents()

    Declaration
    protected void InitPriorityComponents()

    OnInitComplete()

    Declaration
    protected virtual void OnInitComplete()

    RaiseFactionUpdateComplete(FactionUpdateArgs)

    Declaration
    protected void RaiseFactionUpdateComplete(FactionUpdateArgs eventArgs)
    Parameters
    Type Name Description
    FactionUpdateArgs eventArgs

    RaiseFactionUpdateStart(FactionUpdateArgs)

    Declaration
    protected void RaiseFactionUpdateStart(FactionUpdateArgs eventArgs)
    Parameters
    Type Name Description
    FactionUpdateArgs eventArgs

    SetFaction(IEntity, Int32)

    Declaration
    public abstract ErrorMessage SetFaction(IEntity source, int targetFactionID)
    Parameters
    Type Name Description
    IEntity source
    Int32 targetFactionID
    Returns
    Type Description
    ErrorMessage

    SetFactionLocal(IEntity, Int32)

    Declaration
    public abstract ErrorMessage SetFactionLocal(IEntity source, int targetFactionID)
    Parameters
    Type Name Description
    IEntity source
    Int32 targetFactionID
    Returns
    Type Description
    ErrorMessage

    SetIdle(IEntityTargetComponent, Boolean)

    Declaration
    public void SetIdle(IEntityTargetComponent source, bool includeMovement = true)
    Parameters
    Type Name Description
    IEntityTargetComponent source
    Boolean includeMovement

    SetIdle(Boolean)

    Declaration
    public void SetIdle(bool includeMovement = true)
    Parameters
    Type Name Description
    Boolean includeMovement

    SetTargetFirst(SetTargetInputData)

    Declaration
    public ErrorMessage SetTargetFirst(SetTargetInputData input)
    Parameters
    Type Name Description
    SetTargetInputData input
    Returns
    Type Description
    ErrorMessage

    SubToEvents()

    Declaration
    protected virtual void SubToEvents()

    UnsubFromEvents()

    Declaration
    protected virtual void UnsubFromEvents()

    UpdateRadius(Single)

    Updates the 'Radius' property of the entity. Make sure this call is done locally on all client instances in case of a multiplayer game to avoid desync!

    Declaration
    public void UpdateRadius(float newRadius)
    Parameters
    Type Name Description
    System.Single newRadius

    New radius value.

    UpdateSelectionColor()

    Declaration
    protected abstract void UpdateSelectionColor()

    UpgradeComponent(UpgradeElement<IEntityComponent>)

    Declaration
    public void UpgradeComponent(UpgradeElement<IEntityComponent> upgradeElement)
    Parameters
    Type Name Description
    UpgradeElement<IEntityComponent> upgradeElement

    Events

    EntityComponentUpgraded

    Declaration
    public event CustomEventHandler<IEntity, EntityComponentUpgradeEventArgs> EntityComponentUpgraded
    Event Type
    Type Description
    CustomEventHandler<IEntity, EntityComponentUpgradeEventArgs>

    EntityEnterIdle

    Declaration
    public event CustomEventHandler<IEntity, EventArgs> EntityEnterIdle
    Event Type
    Type Description
    CustomEventHandler<IEntity, System.EventArgs>

    EntityExitIdle

    Declaration
    public event CustomEventHandler<IEntity, EventArgs> EntityExitIdle
    Event Type
    Type Description
    CustomEventHandler<IEntity, System.EventArgs>

    EntityInitiated

    Declaration
    public event CustomEventHandler<IEntity, EventArgs> EntityInitiated
    Event Type
    Type Description
    CustomEventHandler<IEntity, System.EventArgs>

    FactionUpdateComplete

    Declaration
    public event CustomEventHandler<IEntity, FactionUpdateArgs> FactionUpdateComplete
    Event Type
    Type Description
    CustomEventHandler<IEntity, FactionUpdateArgs>

    FactionUpdateStart

    Declaration
    public event CustomEventHandler<IEntity, FactionUpdateArgs> FactionUpdateStart
    Event Type
    Type Description
    CustomEventHandler<IEntity, FactionUpdateArgs>

    Implements

    IEntity
    IMonoBehaviour
    In This Article
    Back to top Unity RTS Engine Documentation