Class HostedObjectExtension
Inheritance
System.Object
HostedObjectExtension
Assembly: Eco.Gameplay.dll
Syntax
public static class HostedObjectExtension : Object
Methods
CalcTimeToDisable(IHostedObject)
Calculate how much time is left until the hosted object is disabled permanently.
Declaration
public static double CalcTimeToDisable(this IHostedObject hostedObject)
Parameters
Returns
Type |
Description |
System.Double |
|
CheckHostState(IHostedObject)
We check the validity of the hosted object.
Declaration
public static Result CheckHostState(this IHostedObject hostedObject)
Parameters
Returns
DisableTime(IHostedObject)
Declaration
public static double DisableTime(this IHostedObject hostedObject)
Parameters
Returns
Type |
Description |
System.Double |
|
GetHostedObject(IEnumerable<Type>, WorldObject)
Returns objects that are currently hosted on this world object.
Declaration
public static IEnumerable<IHostedObject> GetHostedObject(IEnumerable<Type> types, WorldObject obj)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
types |
|
WorldObject |
obj |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IHostedObject> |
|
GetHostedObject(Type, WorldObject)
Declaration
public static IEnumerable<IHostedObject> GetHostedObject(Type type, WorldObject obj)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IHostedObject> |
|
GetHostObject(IHostedObject)
Declaration
public static WorldObject GetHostObject(this IHostedObject hostedObj)
Parameters
Returns
InitializeHostedObject(IHostedObject)
We use this to initialize the hosted object when necessary.
Declaration
public static void InitializeHostedObject(this IHostedObject entry)
Parameters
IsHostedObjectSpecial(IHostedObject)
Declaration
public static bool IsHostedObjectSpecial(this IHostedObject entry)
Parameters
Returns
Type |
Description |
System.Boolean |
|
SetHostObject(IHostedObject, WorldObject)
Set the hosted object on a specified world object(it can be null), doing the proper needed updates.
Declaration
public static void SetHostObject(this IHostedObject hostedObject, WorldObject newHost)
Parameters
UpdateHostedObjectValidity(IHostedObject)
We update the validity of the hosted object according to whether it's still orphan or not.
Declaration
public static void UpdateHostedObjectValidity(this IHostedObject hostedObject)
Parameters
UpdateStatusForContainerObject(WorldObject, IEnumerable<IHostedObject>, Type, ref StatusElement)
Sets/clears a status element on a contained of hosted objects, to inform the user when they open the container object.
Declaration
public static void UpdateStatusForContainerObject(WorldObject obj, IEnumerable<IHostedObject> toDisable, Type objectType, ref StatusElement disableStatus)
Parameters