Class SimulationObjectModel
- Namespace
- KSP.Sim.impl
- Assembly
- Assembly-CSharp.dll
public class SimulationObjectModel : IGuidIdentity
- Inheritance
-
SimulationObjectModel
- Implements
-
- Inherited Members
-
- Extension Methods
-
Constructors
SimulationObjectModel(IGGuid, string, byte, byte, ulong, string, string, double, string)
public SimulationObjectModel(IGGuid globalId, string ownerPlayerGuidString, byte ownerPlayerId, byte authorityPlayerId, ulong objectId, string viewPrefabAssetKey, string name, double utCreationTime, string globalNameKey)
Parameters
globalId IGGuid
ownerPlayerGuidString string
ownerPlayerId byte
authorityPlayerId byte
objectId ulong
viewPrefabAssetKey string
name string
utCreationTime double
globalNameKey string
Properties
ActiveTargetable
public bool ActiveTargetable { get; set; }
Property Value
- bool
AltitudeFromSeaLevel
public double AltitudeFromSeaLevel { get; }
Property Value
- double
AuthorizingPlayerId
public byte AuthorizingPlayerId { get; }
Property Value
- byte
CelestialBody
public CelestialBodyComponent CelestialBody { get; }
Property Value
- CelestialBodyComponent
Colony
public ColonyComponent Colony { get; }
Property Value
- ColonyComponent
Components
public IEnumerable<ObjectComponent> Components { get; }
Property Value
- IEnumerable<ObjectComponent>
CrewMember
public CrewMemberComponent CrewMember { get; }
Property Value
- CrewMemberComponent
DebugName
public string DebugName { get; }
Property Value
- string
DebugObjectIdString
public string DebugObjectIdString { get; }
Property Value
- string
DebugObjectIdStringAbbrev
public string DebugObjectIdStringAbbrev { get; }
Property Value
- string
Description
public string Description { get; }
Property Value
- string
DisplayName
public string DisplayName { get; }
Property Value
- string
FwdVector
public Vector FwdVector { get; }
Property Value
- Vector
Game
public GameInstance Game { get; }
Property Value
- GameInstance
GlobalId
public IGGuid GlobalId { get; }
Property Value
- IGGuid
GlobalNameKey
public string GlobalNameKey { get; }
Property Value
- string
IsActiveVessel
public bool IsActiveVessel { get; }
Property Value
- bool
IsCelestialBody
public bool IsCelestialBody { get; }
Property Value
- bool
IsDestroyed
public bool IsDestroyed { get; }
Property Value
- bool
IsDestroyedOrBeingDestroyed
public bool IsDestroyedOrBeingDestroyed { get; }
Property Value
- bool
IsKerbal
public bool IsKerbal { get; }
Property Value
- bool
IsLocalPlayerOrHostOverrideAuthorized
public bool IsLocalPlayerOrHostOverrideAuthorized { get; }
Property Value
- bool
IsLocallyAuthorized
public bool IsLocallyAuthorized { get; }
Property Value
- bool
IsLocallyOwned
public bool IsLocallyOwned { get; }
Property Value
- bool
IsNobodyAuthorized
public bool IsNobodyAuthorized { get; }
Property Value
- bool
IsPart
public bool IsPart { get; }
Property Value
- bool
IsPlayerOwned
public bool IsPlayerOwned { get; }
Property Value
- bool
IsVessel
public bool IsVessel { get; }
Property Value
- bool
Kerbal
public KerbalComponent Kerbal { get; }
Property Value
- KerbalComponent
LocalizationNameKey
public string LocalizationNameKey { get; set; }
Property Value
- string
ManeuverPlan
public ManeuverPlanComponent ManeuverPlan { get; }
Property Value
- ManeuverPlanComponent
Name
public string Name { get; set; }
Property Value
- string
ObjectId
public ulong ObjectId { get; }
Property Value
- ulong
ObservedCameraGimbal
public GimbalState ObservedCameraGimbal { get; set; }
Property Value
- GimbalState
ObtVelocity
public Vector ObtVelocity { get; }
Property Value
- Vector
Orbit
public IKeplerOrbit Orbit { get; }
Property Value
- IKeplerOrbit
Orbiter
public OrbiterComponent Orbiter { get; }
Property Value
- OrbiterComponent
OwnerPlayerGuidString
public string OwnerPlayerGuidString { get; }
Property Value
- string
OwnerPlayerId
public byte OwnerPlayerId { get; }
Property Value
- byte
Part
public PartComponent Part { get; }
Property Value
- PartComponent
PartOwner
public PartOwnerComponent PartOwner { get; }
Property Value
- PartOwnerComponent
Position
public Position Position { get; }
Property Value
- Position
Rigidbody
public RigidbodyComponent Rigidbody { get; }
Property Value
- RigidbodyComponent
Rotation
public Rotation Rotation { get; }
Property Value
- Rotation
SpawnLocationString
public string SpawnLocationString { get; }
Property Value
- string
SrfVelocity
public Vector SrfVelocity { get; }
Property Value
- Vector
Staging
public StagingComponent Staging { get; }
Property Value
- StagingComponent
TargetingMode
public VesselTargetMode TargetingMode { get; set; }
Property Value
- VesselTargetMode
Telemetry
public TelemetryComponent Telemetry { get; }
Property Value
- TelemetryComponent
UTCreationTime
public double UTCreationTime { get; }
Property Value
- double
Vessel
public VesselComponent Vessel { get; }
Property Value
- VesselComponent
VesselDeltaV
public VesselDeltaVComponent VesselDeltaV { get; }
Property Value
- VesselDeltaVComponent
ViewPrefabAssetKey
public string ViewPrefabAssetKey { get; }
Property Value
- string
objVesselBehavior
public VesselBehavior objVesselBehavior { get; set; }
Property Value
- VesselBehavior
public ITransformModel transform { get; }
Property Value
- ITransformModel
Methods
AddComponent(ObjectComponent, Type, double)
public void AddComponent(ObjectComponent component, Type componentType, double universalTime)
Parameters
component ObjectComponent
componentType Type
universalTime double
AddComponent<T>(T, double)
public void AddComponent<T>(T component, double universalTime) where T : ObjectComponent
Parameters
component T
universalTime double
Type Parameters
T
AssumeAuthority()
public void AssumeAuthority()
AssumeOwnership()
public void AssumeOwnership()
ClearSpawnLocationString()
public void ClearSpawnLocationString()
Destroy()
Destroy(double)
public void Destroy(double universeTime)
Parameters
universeTime double
DestroyViewObject()
public void DestroyViewObject()
FindComponent(Type)
public ObjectComponent FindComponent(Type type)
Parameters
type Type
Returns
- ObjectComponent
FindComponent<T>()
public T FindComponent<T>() where T : ObjectComponent
Returns
- T
Type Parameters
T
GetDebugString()
public string GetDebugString()
Returns
- string
InstantiateViewObject()
public SimulationObjectView InstantiateViewObject()
Returns
- SimulationObjectView
InstantiateViewObjectAsync(Action<SimulationObjectView>)
public void InstantiateViewObjectAsync(Action<SimulationObjectView> finishedCallback = null)
Parameters
finishedCallback Action<SimulationObjectView>
InstantiateViewObjectAsync(Vector3, Quaternion, Action<SimulationObjectView>)
public void InstantiateViewObjectAsync(Vector3 worldPosition, Quaternion worldRotation, Action<SimulationObjectView> finishedCallback = null)
Parameters
worldPosition Vector3
worldRotation Quaternion
finishedCallback Action<SimulationObjectView>
Is(IGuidIdentity)
public bool Is(IGuidIdentity other)
Parameters
other IGuidIdentity
Returns
- bool
IsAuthorizedBy(byte)
public bool IsAuthorizedBy(byte playerId)
Parameters
playerId byte
Returns
- bool
IsOwnedBy(byte)
public bool IsOwnedBy(byte playerId)
Parameters
playerId byte
Returns
- bool
OnFixedUpdate(double, double)
public void OnFixedUpdate(double universalTime, double deltaUniversalTime)
Parameters
universalTime double
deltaUniversalTime double
OnLateUpdate(double)
public void OnLateUpdate(double universalTime)
Parameters
universalTime double
OnStart(double)
public void OnStart(double universalTime)
Parameters
universalTime double
OnUpdate(double, double)
public void OnUpdate(double universalTime, double deltaUniversalTime)
Parameters
universalTime double
deltaUniversalTime double
RemoveComponent(ObjectComponent, double)
public void RemoveComponent(ObjectComponent component, double universalTime)
Parameters
component ObjectComponent
universalTime double
RemoveComponent<T>(double)
public void RemoveComponent<T>(double universalTime) where T : ObjectComponent
Parameters
universalTime double
Type Parameters
T
SetAuthoritativePlayerId(byte)
public void SetAuthoritativePlayerId(byte playerId)
Parameters
playerId byte
SetObjectId(ulong)
public void SetObjectId(ulong objectId)
Parameters
objectId ulong
SetOwnerPlayerGuidString(string)
public void SetOwnerPlayerGuidString(string ownerPlayerGuidString)
Parameters
ownerPlayerGuidString string
SetOwnerPlayerId(byte)
public void SetOwnerPlayerId(byte ownerPlayerId)
Parameters
ownerPlayerId byte
SetSpawnLocationString(string)
public void SetSpawnLocationString(string spawnLocationString)
Parameters
spawnLocationString string
SetState(SimulationObjectState?, ISimulationModelMap)
public void SetState(SimulationObjectState? state, ISimulationModelMap simulationModelMap)
Parameters
state SimulationObjectState?
simulationModelMap ISimulationModelMap
SwitchPrefabAssets(string)
public void SwitchPrefabAssets(string newKey)
Parameters
newKey string
ToString()
public override string ToString()
Returns
- string
TryFindComponent<T>(out T)
public bool TryFindComponent<T>(out T component) where T : ObjectComponent
Parameters
component T
Returns
- bool
Type Parameters
T
UpdateDefinition(Dictionary<Type, object>, Dictionary<Type, object>)
public void UpdateDefinition(Dictionary<Type, object> componentDefinitions, Dictionary<Type, object> viewGraphUpdates)
Parameters
componentDefinitions Dictionary<Type, object>
viewGraphUpdates Dictionary<Type, object>
UpdateMe(SimulationObjectState?, Dictionary<Type, object>, ISimulationModelMap, Dictionary<Type, object>)
public void UpdateMe(SimulationObjectState? state, Dictionary<Type, object> componentStates, ISimulationModelMap simulationModelMap, Dictionary<Type, object> viewGraphUpdates)
Parameters
state SimulationObjectState?
componentStates Dictionary<Type, object>
simulationModelMap ISimulationModelMap
viewGraphUpdates Dictionary<Type, object>
bound(SimulationObjectModel, ISimulationObjectView)
public void bound(SimulationObjectModel model, ISimulationObjectView view)
Parameters
model SimulationObjectModel
view ISimulationObjectView
unbound(SimulationObjectModel, ISimulationObjectView)
public void unbound(SimulationObjectModel model, ISimulationObjectView view)
Parameters
model SimulationObjectModel
view ISimulationObjectView
Events
onComponentAdded
public event Action<Type, ObjectComponent> onComponentAdded
Event Type
- Action<Type, ObjectComponent>
onComponentRemoved
public event Action<Type, ObjectComponent> onComponentRemoved
Event Type
- Action<Type, ObjectComponent>
onStarted
public event Action onStarted
Event Type
- Action
onViewLoad
public event Action<ISimulationObjectView> onViewLoad
Event Type
- Action<ISimulationObjectView>
onViewUnload
public event Action<ISimulationObjectView> onViewUnload
Event Type
- Action<ISimulationObjectView>