예제 #1
0
        public override void Draw(CustomSpriteBatch g, Matrix View)
        {
            Matrix World = Matrix.CreateTranslation(0f, 0f, 0f);

            VehiculeDrawablePart.ArrayParticles[0].Position     = Position;
            VehiculeDrawablePart.ArrayParticles[0 + 1].Position = Position;
            VehiculeDrawablePart.ArrayParticles[0 + 2].Position = Position;
            VehiculeDrawablePart.ArrayParticles[0 + 3].Position = Position;

            VehiculeDrawablePart.MoveParticle(0, Vector3.Zero);
            VehiculeDrawablePart.SetViewProjection(World * View, Projection);
            VehiculeDrawablePart.Draw(g.GraphicsDevice);

            foreach (Object3D AntiGravPropulsor in ArrayAntiGravPropulsor)
            {
                AntiGravPropulsor.Draw(g, View);
            }
        }
예제 #2
0
        public override void Draw(CustomSpriteBatch g, Matrix View, Matrix Projection, int ScreenWidth, int ScreenHeight)
        {
            int MaxRepeatX = 0;

            if (ActiveBillboardSystem.RepeatX)
            {
                MaxRepeatX = MaxRepeat;
            }

            for (int X = -MaxRepeatX; X <= MaxRepeatX; ++X)
            {
                int MaxRepeatY = 0;
                if (ActiveBillboardSystem.RepeatY)
                {
                    MaxRepeatY = MaxRepeat;
                }

                for (int Y = -MaxRepeatY; Y <= MaxRepeatY; Y++)
                {
                    int MaxRepeatZ = 0;
                    if (ActiveBillboardSystem.RepeatZ)
                    {
                        MaxRepeatZ = MaxRepeat;
                    }

                    for (int Z = -MaxRepeatZ; Z <= MaxRepeatZ; Z++)
                    {
                        Matrix World = Matrix.CreateTranslation(X * ActiveBillboardSystem.RepeatOffset.X, Y * ActiveBillboardSystem.RepeatOffset.Y, Z * ActiveBillboardSystem.RepeatOffset.Z);

                        ActiveBillboardSystem.SetViewProjection(World * View, Projection);

                        //g.GraphicsDevice.Viewport.Unproject(MyVector3Location, Projection, View, World);
                        ActiveBillboardSystem.Draw(GameScreen.GraphicsDevice);
                    }
                }
            }
        }