Class CastleHeartSystem
System for locating CastleHeart entities in the world.
public class CastleHeartSystem : System, ISystem, IManageableLifecycle<SystemManager>, IManageableLifecycle, IReloadable, IManageable<SystemManager>, IManageable
- Inheritance
-
CastleHeartSystem
- Implements
- Inherited Members
- Extension Methods
Constructors
CastleHeartSystem()
Default constructor.
public CastleHeartSystem()
Fields
CastleHeartQuery
Lazily initialized query for all CastleHeart + Team components.
public static readonly LazyRetry<EntityQuery> CastleHeartQuery
Field Value
- LazyRetry<EntityQuery>
Methods
TryGetById(NetworkId, out Entity)
Attempts to find the castle entity matching the given castleId
.
public static bool TryGetById(NetworkId castleId, out Entity castle)
Parameters
castleId
NetworkIdcastle
Entity
Returns
TryGetByOwnerUser(User, out Entity)
Attempts to find a castle entity owned by the specified user
.
public static bool TryGetByOwnerUser(User user, out Entity castle)
Parameters
user
UserUser whose castle to find.
castle
EntityOutput entity if found; otherwise Unity.Entities.Entity.Null.
Returns
- bool
True if an owned castle entity is found.