Example #1
0
        void IMyPlayerCollection.SetControlledEntity(ulong steamUserId, ModAPI.IMyEntity entity)
        {
            var e = entity as MyEntity;

            if (e != null)
            {
                SetControlledEntity(steamUserId, e);
            }
        }
Example #2
0
        void IMyPlayerCollection.RemoveControlledEntity(ModAPI.IMyEntity entity)
        {
            var e = entity as MyEntity;

            if (e != null)
            {
                RemoveControlledEntity(e);
            }
        }
Example #3
0
        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);
        }
Example #4
0
 public MyDebrisPhysics(ModAPI.IMyEntity Entity1, RigidBodyFlag rigidBodyFlag)
     : base(Entity1, rigidBodyFlag)
 {
 }
Example #5
0
        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);
        }
Example #6
0
        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);
            }
        }
Example #7
0
        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);
            }
        }
Example #8
0
        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);
        }