void IMyPlayerCollection.SetControlledEntity(ulong steamUserId, ModAPI.IMyEntity entity) { var e = entity as MyEntity; if (e != null) { SetControlledEntity(steamUserId, e); } }
void IMyPlayerCollection.RemoveControlledEntity(ModAPI.IMyEntity entity) { var e = entity as MyEntity; if (e != null) { RemoveControlledEntity(e); } }
ModAPI.IMyPlayer IMyPlayerCollection.GetPlayerControllingEntity(ModAPI.IMyEntity entity) { var e = entity as MyEntity; if (e != null) { var controller = GetEntityController(e); if (controller != null) { return(controller.Player); } } return(null); }
public MyDebrisPhysics(ModAPI.IMyEntity Entity1, RigidBodyFlag rigidBodyFlag) : base(Entity1, rigidBodyFlag) { }
bool IMyPlayerCollection.TryReduceControl(ModAPI.Interfaces.IMyControllableEntity entityWhichKeepsControl, ModAPI.IMyEntity entityWhichLoosesControl) { var e1 = entityWhichKeepsControl as Sandbox.Game.Entities.IMyControllableEntity; var e2 = entityWhichLoosesControl as MyEntity; if (e1 != null && e2 != null) { return(TryReduceControl(e1, e2)); } return(false); }
void IMyPlayerCollection.TryExtendControl(ModAPI.Interfaces.IMyControllableEntity entityWithControl, ModAPI.IMyEntity entityGettingControl) { var e1 = entityWithControl as Sandbox.Game.Entities.IMyControllableEntity; var e2 = entityGettingControl as MyEntity; if (e1 != null && e2 != null) { TryExtendControl(e1, e2); } }
void IMyPlayerCollection.ReduceControl(ModAPI.Interfaces.IMyControllableEntity entityWhichKeepsControl, ModAPI.IMyEntity entityWhichLoosesControl) { var e1 = entityWhichKeepsControl as Sandbox.Game.Entities.IMyControllableEntity; var e2 = entityWhichLoosesControl as MyEntity; if (e1 != null && e2 != null) { ReduceControl(e1, e2); } }
bool IMyPlayerCollection.HasExtendedControl(ModAPI.Interfaces.IMyControllableEntity firstEntity, ModAPI.IMyEntity secondEntity) { var e1 = firstEntity as Sandbox.Game.Entities.IMyControllableEntity; var e2 = secondEntity as MyEntity; if (e1 != null && e2 != null) { return(HasExtendedControl(e1, e2)); } return(false); }