예제 #1
0
        public override void Close()
        {
            if ((m_smokeCue != null) && m_smokeCue.Value.IsPlaying)
            {
                m_smokeCue.Value.Stop(SharpDX.XACT3.StopFlags.Release);
            }

            base.Close();
            MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
        }
예제 #2
0
 public override void Close()
 {
     if (m_hologramShip != null)
     {
         MyHologramShips.Remove(m_hologramShip);
         m_hologramShip.MarkForClose();
         m_hologramShip = null;
     }
     base.Close();
     MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
 }
예제 #3
0
        public override void Close()
        {
            var ownerShip = OwnerEntity as MySmallShip;

            if (ownerShip != null)
            {
                ownerShip.RemoveRemoteBomb(this);
            }

            base.Close();
            MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
        }
예제 #4
0
        public override void Close()
        {
            var ownerShip = OwnerEntity as MySmallShip;

            if (ownerShip != null)
            {
                ownerShip.RemoveRemoteCamera(this);
            }
            m_directionAfterContact = null;

            base.Close();

            MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
        }
예제 #5
0
        public override void Close()
        {
            foreach (var particle in m_particles)
            {
                if (particle.ParticleEffect != null)
                {
                    particle.ParticleEffect.Stop();
                    particle.ParticleEffect = null;
                }
            }

            if ((m_flareLoop != null) && m_flareLoop.Value.IsPlaying)
            {
                m_flareLoop.Value.Stop(SharpDX.XACT3.StopFlags.Release);
            }

            m_flaresFired = false;
            Visible       = true;
            base.Close();
            MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
        }
        bool Shot <T>() where T : class, IUniversalLauncherShell, new()
        {
            T shell = MyUniversalLauncherShells.Allocate <T>(Parent.EntityId.Value.PlayerId);

            if (shell != null)
            {
                Vector3 forwardVelocity = MyMath.ForwardVectorProjection(this.WorldMatrix.Forward,
                                                                         GetParentMinerShip().Physics.LinearVelocity);

                if (MinerWars.AppCode.Game.Managers.Session.MySession.Is25DSector)
                {
                    m_positionMuzzleInWorldSpace.Y = 0;
                }

                shell.Start(m_positionMuzzleInWorldSpace, forwardVelocity, WorldMatrix.Forward, 100, Parent);

                return(true);
            }

            return(false);
        }
예제 #7
0
 public override void Close()
 {
     base.Close();
     MyUniversalLauncherShells.Remove(this, m_ownerEntityID.PlayerId);
 }