Space Engineers
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Properties | Events | List of all members
Sandbox.Game.World.MyPlayer Class Reference
Inheritance diagram for Sandbox.Game.World.MyPlayer:
VRage.Game.ModAPI.IMyPlayer

Classes

struct  PlayerId
 

Public Member Functions

 MyPlayer (MyNetworkClient client, PlayerId id)
 
void Init (MyObjectBuilder_Player objectBuilder)
 
MyObjectBuilder_Player GetObjectBuilder ()
 
void SetDefaultColors ()
 
void ChangeOrSwitchToColor (Vector3 color)
 
void SetBuildColorSlots (List< Vector3 > newColors)
 
Vector3D GetPosition ()
 
void SpawnAt (MatrixD worldMatrix, Vector3 velocity, MyEntity spawnedBy, MyBotDefinition botDefinition, bool findFreePlace=true)
 
void SpawnIntoCharacter (MyCharacter character)
 
VRage.Game.MyRelationsBetweenPlayerAndBlock GetRelationTo (long playerId)
 
void RemoveGrid (long gridEntityId)
 
void AddGrid (long gridEntityId)
 

Static Public Member Functions

static bool IsColorsSetToDefaults (List< Vector3 > colors)
 
static VRage.Game.MyRelationsBetweenPlayerAndBlock GetRelationBetweenPlayers (long playerId1, long playerId2)
 
static MyRelationsBetweenPlayers GetRelationsBetweenPlayers (long playerId1, long playerId2)
 
static MyPlayer GetPlayerFromCharacter (MyCharacter character)
 
static MyPlayer GetPlayerFromWeapon (IMyGunBaseUser gunUser)
 

Public Attributes

List< long > RespawnShip = new List<long>()
 
HashSet< long > Grids = new HashSet<long>()
 Grids in which this player has at least one block More...
 
List< long > CachedControllerId
 

Properties

MyNetworkClient Client [get]
 
MyIdentity Identity [get, set]
 
MyEntityController Controller [get]
 This is created with the creation of the player, so it should never be null More...
 
string DisplayName [get]
 
static int BuildColorSlotCount [get]
 
int SelectedBuildColorSlot [get, set]
 
Vector3 SelectedBuildColor [get, set]
 
static int SelectedColorSlot [get]
 
static Vector3 SelectedColor [get]
 
static ListReader< Vector3ColorSlots [get]
 
List< Vector3BuildColorSlots [get]
 
bool IsLocalPlayer [get]
 
bool IsRemotePlayer [get]
 
bool IsRealPlayer [get]
 
bool IsBot [get]
 
bool IsAdmin [get]
 
bool IsSpaceMaster [get]
 
bool IsScripter [get]
 
bool IsModerator [get]
 
MyCharacter Character [get]
 
PlayerId Id [get, protected set]
 
- Properties inherited from VRage.Game.ModAPI.IMyPlayer
IMyNetworkClient Client [get]
 
HashSet< long > Grids [get]
 
IMyEntityController Controller [get]
 
ulong SteamUserId [get]
 
string DisplayName [get]
 
long PlayerID [get]
 
long IdentityId [get]
 
bool IsAdmin [get]
 
bool IsPromoted [get]
 

Events

Action< MyPlayer, MyIdentityIdentityChanged
 

Detailed Description

Definition at line 24 of file MyPlayer.cs.

Constructor & Destructor Documentation

Sandbox.Game.World.MyPlayer.MyPlayer ( MyNetworkClient  client,
PlayerId  id 
)
inline

Definition at line 240 of file MyPlayer.cs.

Member Function Documentation

void Sandbox.Game.World.MyPlayer.AddGrid ( long  gridEntityId)
inline

Implements VRage.Game.ModAPI.IMyPlayer.

Definition at line 496 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.ChangeOrSwitchToColor ( Vector3  color)
inline

Definition at line 355 of file MyPlayer.cs.

MyObjectBuilder_Player Sandbox.Game.World.MyPlayer.GetObjectBuilder ( )
inline

Definition at line 296 of file MyPlayer.cs.

static MyPlayer Sandbox.Game.World.MyPlayer.GetPlayerFromCharacter ( MyCharacter  character)
inlinestatic

Definition at line 501 of file MyPlayer.cs.

static MyPlayer Sandbox.Game.World.MyPlayer.GetPlayerFromWeapon ( IMyGunBaseUser  gunUser)
inlinestatic

Definition at line 517 of file MyPlayer.cs.

Vector3D Sandbox.Game.World.MyPlayer.GetPosition ( )
inline

Implements VRage.Game.ModAPI.IMyPlayer.

Definition at line 375 of file MyPlayer.cs.

static VRage.Game.MyRelationsBetweenPlayerAndBlock Sandbox.Game.World.MyPlayer.GetRelationBetweenPlayers ( long  playerId1,
long  playerId2 
)
inlinestatic

Definition at line 443 of file MyPlayer.cs.

static MyRelationsBetweenPlayers Sandbox.Game.World.MyPlayer.GetRelationsBetweenPlayers ( long  playerId1,
long  playerId2 
)
inlinestatic

Definition at line 470 of file MyPlayer.cs.

VRage.Game.MyRelationsBetweenPlayerAndBlock Sandbox.Game.World.MyPlayer.GetRelationTo ( long  playerId)
inline

Implements VRage.Game.ModAPI.IMyPlayer.

Definition at line 463 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.Init ( MyObjectBuilder_Player  objectBuilder)
inline

Definition at line 247 of file MyPlayer.cs.

static bool Sandbox.Game.World.MyPlayer.IsColorsSetToDefaults ( List< Vector3 colors)
inlinestatic

Definition at line 317 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.RemoveGrid ( long  gridEntityId)
inline

Implements VRage.Game.ModAPI.IMyPlayer.

Definition at line 491 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.SetBuildColorSlots ( List< Vector3 newColors)
inline

Definition at line 368 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.SetDefaultColors ( )
inline

Definition at line 328 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.SpawnAt ( MatrixD  worldMatrix,
Vector3  velocity,
MyEntity  spawnedBy,
MyBotDefinition  botDefinition,
bool  findFreePlace = true 
)
inline

Definition at line 384 of file MyPlayer.cs.

void Sandbox.Game.World.MyPlayer.SpawnIntoCharacter ( MyCharacter  character)
inline

Definition at line 435 of file MyPlayer.cs.

Member Data Documentation

List<long> Sandbox.Game.World.MyPlayer.CachedControllerId

Definition at line 233 of file MyPlayer.cs.

HashSet<long> Sandbox.Game.World.MyPlayer.Grids = new HashSet<long>()

Grids in which this player has at least one block

#warning: This should probably be on the identity. Check whether it's correct

Definition at line 231 of file MyPlayer.cs.

List<long> Sandbox.Game.World.MyPlayer.RespawnShip = new List<long>()

Definition at line 225 of file MyPlayer.cs.

Property Documentation

int Sandbox.Game.World.MyPlayer.BuildColorSlotCount
staticget

Definition at line 151 of file MyPlayer.cs.

List<Vector3> Sandbox.Game.World.MyPlayer.BuildColorSlots
get

Definition at line 166 of file MyPlayer.cs.

MyCharacter Sandbox.Game.World.MyPlayer.Character
get

Definition at line 215 of file MyPlayer.cs.

MyNetworkClient Sandbox.Game.World.MyPlayer.Client
get

Definition at line 122 of file MyPlayer.cs.

ListReader<Vector3> Sandbox.Game.World.MyPlayer.ColorSlots
staticget

Definition at line 161 of file MyPlayer.cs.

MyEntityController Sandbox.Game.World.MyPlayer.Controller
get

This is created with the creation of the player, so it should never be null

Definition at line 145 of file MyPlayer.cs.

string Sandbox.Game.World.MyPlayer.DisplayName
get

Definition at line 147 of file MyPlayer.cs.

PlayerId Sandbox.Game.World.MyPlayer.Id
getprotected set

Definition at line 223 of file MyPlayer.cs.

MyIdentity Sandbox.Game.World.MyPlayer.Identity
getset

Definition at line 125 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsAdmin
get

Definition at line 175 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsBot
get

Definition at line 172 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsLocalPlayer
get

Definition at line 168 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsModerator
get

Definition at line 205 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsRealPlayer
get

Definition at line 171 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsRemotePlayer
get

Definition at line 169 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsScripter
get

Definition at line 195 of file MyPlayer.cs.

bool Sandbox.Game.World.MyPlayer.IsSpaceMaster
get

Definition at line 185 of file MyPlayer.cs.

Vector3 Sandbox.Game.World.MyPlayer.SelectedBuildColor
getset

Definition at line 156 of file MyPlayer.cs.

int Sandbox.Game.World.MyPlayer.SelectedBuildColorSlot
getset

Definition at line 154 of file MyPlayer.cs.

Vector3 Sandbox.Game.World.MyPlayer.SelectedColor
staticget

Definition at line 160 of file MyPlayer.cs.

int Sandbox.Game.World.MyPlayer.SelectedColorSlot
staticget

Definition at line 159 of file MyPlayer.cs.

Event Documentation

Action<MyPlayer, MyIdentity> Sandbox.Game.World.MyPlayer.IdentityChanged

Definition at line 140 of file MyPlayer.cs.


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