Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
SpaceEngineers.Game.World.MySpaceRespawnComponent Class Reference
Inheritance diagram for SpaceEngineers.Game.World.MySpaceRespawnComponent:
Sandbox.Game.SessionComponents.MyRespawnComponentBase VRage.Game.Components.MySessionComponentBase VRage.Game.Components.Interfaces.IMyUserInputComponent

Public Member Functions

void RequestSync ()
 
override void InitFromCheckpoint (MyObjectBuilder_Checkpoint checkpoint)
 
override void SaveToCheckpoint (MyObjectBuilder_Checkpoint checkpoint)
 
override void BeforeStart ()
 
override void LoadData ()
 
void SyncCooldownToPlayer (ulong steamId, bool isLocal)
 
override void UpdatingStopped ()
 
override void UpdateBeforeSimulation ()
 
void ResetRespawnCooldown (MyPlayer.PlayerId controllerId)
 
int GetRespawnCooldownSeconds (MyPlayer.PlayerId controllerId, string respawnShipId)
 
override bool HandleRespawnRequest (bool joinGame, bool newIdentity, long medicalRoomId, string respawnShipId, MyPlayer.PlayerId playerId, Vector3D?spawnPosition, VRage.ObjectBuilders.SerializableDefinitionId?botDefinitionId)
 
void SpawnAsNewPlayer (MyPlayer player, Vector3D currentPosition, string respawnShipId, bool resetIdentity, MyBotDefinition botDefinition)
 
void SpawnAtShip (MyPlayer player, string respawnShipId, MyBotDefinition botDefinition)
 
override void AfterRemovePlayer (MyPlayer player)
 
override MyIdentity CreateNewIdentity (string identityName, MyPlayer.PlayerId playerId, string modelName)
 
override void SetupCharacterDefault (MyPlayer player, MyWorldGenerator.Args args)
 
override int CountAvailableSpawns (MyPlayer player)
 
override bool IsInRespawnScreen ()
 
override void CloseRespawnScreen ()
 
override void SetNoRespawnText (StringBuilder text, int timeSec)
 
override void SetupCharacterFromStarts (MyPlayer player, MyWorldGeneratorStartingStateBase[] playerStarts, MyWorldGenerator.Args args)
 
- Public Member Functions inherited from Sandbox.Game.SessionComponents.MyRespawnComponentBase
void ResetPlayerIdentity (MyPlayer player)
 
- Public Member Functions inherited from VRage.Game.Components.MySessionComponentBase
virtual bool UpdatedBeforeInit ()
 
 MySessionComponentBase ()
 
void SetUpdateOrder (MyUpdateOrder order)
 
virtual void InitFromDefinition (MySessionComponentDefinition definition)
 
virtual void Init (MyObjectBuilder_SessionComponent sessionComponent)
 
virtual MyObjectBuilder_SessionComponent GetObjectBuilder ()
 
void AfterLoadData ()
 
void UnloadDataConditional ()
 
virtual void SaveData ()
 
virtual void Simulate ()
 
virtual void UpdateAfterSimulation ()
 
virtual void Draw ()
 
virtual void HandleInput ()
 
override string ToString ()
 

Static Public Member Functions

static void GetSpawnPosition (float collisionRadius, ref Vector3D position, out Vector3D forward, out Vector3D up, float planetSpawnHeightRatio=0.3f, float randomRangeMin=500, float randomRangeMax=650)
 Returns a position that should be safe to spawn at given the radius and position. More...
 

Protected Member Functions

override void UnloadData ()
 

Properties

bool IsSynced [get]
 
static MySpaceRespawnComponent Static [get]
 
- Properties inherited from Sandbox.Game.SessionComponents.MyRespawnComponentBase
static bool ShowPermaWarning [get, set]
 Indicates if permadeath ownership warning should be shown. More...
 
- Properties inherited from VRage.Game.Components.MySessionComponentBase
MyUpdateOrder UpdateOrder [get]
 
MyObjectBuilderType ObjectBuilderType [get]
 
bool Loaded [get]
 
bool Initialized [get]
 
MyDefinitionId Definition [get, set]
 
virtual Type[] Dependencies [get]
 
virtual bool IsRequiredByGame [get]
 Indicates whether a session component should be used in current configuration. Example: MyDestructionData component returns true only when game uses Havok Destruction More...
 

Additional Inherited Members

- Public Attributes inherited from VRage.Game.Components.MySessionComponentBase
readonly string DebugName
 
readonly int Priority
 
readonly Type ComponentType
 
IMySession Session
 

Detailed Description

Definition at line 36 of file MySpaceRespawnComponent.cs.

Member Function Documentation

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.AfterRemovePlayer ( MyPlayer  player)
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.BeforeStart ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 121 of file MySpaceRespawnComponent.cs.

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.CloseRespawnScreen ( )
inlinevirtual
override int SpaceEngineers.Game.World.MySpaceRespawnComponent.CountAvailableSpawns ( MyPlayer  player)
inlinevirtual
override MyIdentity SpaceEngineers.Game.World.MySpaceRespawnComponent.CreateNewIdentity ( string  identityName,
MyPlayer.PlayerId  playerId,
string  modelName 
)
inlinevirtual
int SpaceEngineers.Game.World.MySpaceRespawnComponent.GetRespawnCooldownSeconds ( MyPlayer.PlayerId  controllerId,
string  respawnShipId 
)
inline

Definition at line 310 of file MySpaceRespawnComponent.cs.

static void SpaceEngineers.Game.World.MySpaceRespawnComponent.GetSpawnPosition ( float  collisionRadius,
ref Vector3D  position,
out Vector3D  forward,
out Vector3D  up,
float  planetSpawnHeightRatio = 0.3f,
float  randomRangeMin = 500,
float  randomRangeMax = 650 
)
inlinestatic

Returns a position that should be safe to spawn at given the radius and position.

Parameters
collisionRadiusThe radius of the object that is trying to spawn.
positionThe position the object would like to spawn at.
forward(Out) The forward vector the object should spawn with.
up(Out) The up vector the object should spawn with.
planetSpawnHeightRatioThe ratio within the planet's max radius and atmosphere radius you are positioned in.
randomRangeMinThe minimum randomized distance that is added.
randomRangeMaxThe minimum randomized distance that is added.

Definition at line 911 of file MySpaceRespawnComponent.cs.

override bool SpaceEngineers.Game.World.MySpaceRespawnComponent.HandleRespawnRequest ( bool  joinGame,
bool  newIdentity,
long  medicalRoomId,
string  respawnShipId,
MyPlayer.PlayerId  playerId,
Vector3D spawnPosition,
VRage.ObjectBuilders.SerializableDefinitionId botDefinitionId 
)
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.InitFromCheckpoint ( MyObjectBuilder_Checkpoint  checkpoint)
inlinevirtual
override bool SpaceEngineers.Game.World.MySpaceRespawnComponent.IsInRespawnScreen ( )
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.LoadData ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 141 of file MySpaceRespawnComponent.cs.

void SpaceEngineers.Game.World.MySpaceRespawnComponent.RequestSync ( )
inline

Definition at line 80 of file MySpaceRespawnComponent.cs.

void SpaceEngineers.Game.World.MySpaceRespawnComponent.ResetRespawnCooldown ( MyPlayer.PlayerId  controllerId)
inline

Definition at line 290 of file MySpaceRespawnComponent.cs.

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.SaveToCheckpoint ( MyObjectBuilder_Checkpoint  checkpoint)
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.SetNoRespawnText ( StringBuilder  text,
int  timeSec 
)
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.SetupCharacterDefault ( MyPlayer  player,
MyWorldGenerator.Args  args 
)
inlinevirtual
override void SpaceEngineers.Game.World.MySpaceRespawnComponent.SetupCharacterFromStarts ( MyPlayer  player,
MyWorldGeneratorStartingStateBase[]  playerStarts,
MyWorldGenerator.Args  args 
)
inlinevirtual
void SpaceEngineers.Game.World.MySpaceRespawnComponent.SpawnAsNewPlayer ( MyPlayer  player,
Vector3D  currentPosition,
string  respawnShipId,
bool  resetIdentity,
MyBotDefinition  botDefinition 
)
inline

Definition at line 614 of file MySpaceRespawnComponent.cs.

void SpaceEngineers.Game.World.MySpaceRespawnComponent.SpawnAtShip ( MyPlayer  player,
string  respawnShipId,
MyBotDefinition  botDefinition 
)
inline

Definition at line 641 of file MySpaceRespawnComponent.cs.

void SpaceEngineers.Game.World.MySpaceRespawnComponent.SyncCooldownToPlayer ( ulong  steamId,
bool  isLocal 
)
inline

Definition at line 198 of file MySpaceRespawnComponent.cs.

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.UnloadData ( )
inlineprotectedvirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 151 of file MySpaceRespawnComponent.cs.

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.UpdateBeforeSimulation ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 235 of file MySpaceRespawnComponent.cs.

override void SpaceEngineers.Game.World.MySpaceRespawnComponent.UpdatingStopped ( )
inlinevirtual

Reimplemented from VRage.Game.Components.MySessionComponentBase.

Definition at line 228 of file MySpaceRespawnComponent.cs.

Property Documentation

bool SpaceEngineers.Game.World.MySpaceRespawnComponent.IsSynced
get

Definition at line 50 of file MySpaceRespawnComponent.cs.

MySpaceRespawnComponent SpaceEngineers.Game.World.MySpaceRespawnComponent.Static
staticget

Definition at line 52 of file MySpaceRespawnComponent.cs.


The documentation for this class was generated from the following file: