Exemplo n.º 1
1
        public void LoadContent(ContentManager content, GraphicsDeviceManager graphicsDeviceManager)
        {
            texture = content.Load<Texture2D>("brick_texture_map");

            wall = new VertexPositionTexture[22];
            wall[0] = new VertexPositionTexture(new Vector3(200, 0, 200), new Vector2(0, 0));
            wall[1] = new VertexPositionTexture(new Vector3(200, 200, 200), new Vector2(2, 0));
            wall[2] = new VertexPositionTexture(new Vector3(0, 0, 200), new Vector2(0, 2));
            wall[3] = new VertexPositionTexture(new Vector3(0, 200, 200), new Vector2(2, 2));
            wall[4] = new VertexPositionTexture(new Vector3(0, 0, 220), new Vector2(0, 0));
            wall[5] = new VertexPositionTexture(new Vector3(0, 200, 220), new Vector2(2, 0));
            wall[6] = new VertexPositionTexture(new Vector3(200, 0, 220), new Vector2(0, 2));
            wall[7] = new VertexPositionTexture(new Vector3(200, 200, 220), new Vector2(2, 2));
            wall[8] = new VertexPositionTexture(new Vector3(200, 0, 200), new Vector2(0, 0));
            wall[9] = new VertexPositionTexture(new Vector3(200, 200, 220), new Vector2(2, 0));
            wall[10] = new VertexPositionTexture(new Vector3(200, 200, 200), new Vector2(2, 2));
            wall[11] = new VertexPositionTexture(new Vector3(0, 200, 220), new Vector2(0, 2));
            wall[12] = new VertexPositionTexture(new Vector3(0, 200, 200), new Vector2(0, 0));

            // Set vertex data in VertexBuffer
            vertexBuffer = new VertexBuffer(graphicsDeviceManager.GraphicsDevice, typeof(VertexPositionTexture), wall.Length, BufferUsage.None);
            vertexBuffer.SetData(wall);

            // Initialize the BasicEffect
            effect = new BasicEffect(graphicsDeviceManager.GraphicsDevice);
        }
Exemplo n.º 2
0
 public SpaceCommander()
 {
     graphics = new GraphicsDeviceManager(this);
        // graphics.PreferredBackBufferWidth = 1600;
        // graphics.PreferredBackBufferHeight = 900;
     Content.RootDirectory = "Content";
 }
Exemplo n.º 3
0
        public Game1()
        {
            this.Window.Title = "Spectrum";
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";
            graphics.PreferredBackBufferHeight = 720;
            graphics.PreferredBackBufferWidth = 1280;
            aaDisplay = new Display(this);
            mManager = new StateManager();
            mGame = new State_GameState(this);
            mSplash = new State_SplashState(this);
            mMainMenu = new State_Menu_Main(this);
            mShipMenu = new State_Menu_Ship(this);
            mInstructionsMenu = new State_Menu_Instructions(this);
            mHighScoreMenu = new State_Menu_HighScore(this);
            aaHSManager = new GameIO();
            mGameSoundFX = new List<SoundEffectInstance>();
            mGameSoundFXRemove = new List<SoundEffectInstance>();

            this.IsMouseVisible = true;

            Int64 performanceFrequency = 0;
            PerformanceTimer.QueryPerformanceFrequency(out performanceFrequency);
            secondsPerCount = 1.0f / (float)performanceFrequency;
            PerformanceTimer.QueryPerformanceCounter(out currentTimeStamp);
            previousTimeStamp = currentTimeStamp;
        }
Exemplo n.º 4
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            //graphics.IsFullScreen = true;
            Content.RootDirectory = "Content";
            //fullscreen = true;

            if (fullscreen)
            {
                preferredWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
                preferredHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
                graphics.IsFullScreen = true;
            }
            else
            {
                preferredWidth = 1024;
                preferredHeight = 768;
                graphics.IsFullScreen = false;
            }
            //don't want fulscreen deving, want a windowed game.
            graphics.PreferredBackBufferWidth = preferredWidth;
            graphics.PreferredBackBufferHeight = preferredHeight;
            graphics.PreferMultiSampling = false;

            screenSize = new Vector2(preferredWidth, preferredHeight);
        }
Exemplo n.º 5
0
        public TrueCraftGame(MultiplayerClient client, IPEndPoint endPoint)
        {
            Window.Title = "TrueCraft";
            Content.RootDirectory = "Content";
            Graphics = new GraphicsDeviceManager(this);
            Graphics.SynchronizeWithVerticalRetrace = false;
            Graphics.IsFullScreen = UserSettings.Local.IsFullscreen;
            Graphics.PreferredBackBufferWidth = UserSettings.Local.WindowResolution.Width;
            Graphics.PreferredBackBufferHeight = UserSettings.Local.WindowResolution.Height;
            Client = client;
            EndPoint = endPoint;
            NextPhysicsUpdate = DateTime.MinValue;
            ChunkMeshes = new List<Mesh>();
            IncomingChunks = new ConcurrentBag<Mesh>();
            PendingMainThreadActions = new ConcurrentBag<Action>();
            MouseCaptured = true;

            var keyboardComponent = new KeyboardComponent(this);
            KeyboardComponent = keyboardComponent;
            Components.Add(keyboardComponent);

            var mouseComponent = new MouseComponent(this);
            MouseComponent = mouseComponent;
            Components.Add(mouseComponent);
        }
 public SpriteSheetBasicsGame()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = 1280;
     graphics.PreferredBackBufferHeight = 720;
     Content.RootDirectory = "Content";
 }
Exemplo n.º 7
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = 835;
     graphics.PreferredBackBufferHeight = 480;
     Content.RootDirectory = "Content";
 }
Exemplo n.º 8
0
        public Game1(IntPtr drawSurface)
        {
            Logger.Instance.log("Game1 creation started.");

            Instance = this;

            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = 800;
            graphics.PreferredBackBufferHeight = 600;

            Content.RootDirectory = "Content";

            Logger.Instance.log("Creating Winform.");
            this.drawSurface = drawSurface;
            graphics.PreparingDeviceSettings += new EventHandler<PreparingDeviceSettingsEventArgs>(graphics_PreparingDeviceSettings);
            winform = (Forms.Form)Forms.Form.FromHandle(Window.Handle);
            winform.VisibleChanged += new EventHandler(Game1_VisibleChanged);
            winform.Size = new System.Drawing.Size(10, 10);
            Mouse.WindowHandle = drawSurface;
            resizebackbuffer(MainForm.Instance.pictureBox1.Width, MainForm.Instance.pictureBox1.Height);
            winform.Hide();
            Logger.Instance.log("Winform created.");

            Logger.Instance.log("Game1 creation ended.");
        }
Exemplo n.º 9
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";


        }
Exemplo n.º 10
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            Components.Add(new GamerServicesComponent(this));
        }
        public XnaCheckersDriver()
        {
            _graphics = new GraphicsDeviceManager(this);
            IsMouseVisible = true;

            Content.RootDirectory = "Content";
        }
Exemplo n.º 12
0
 public Limak()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     graphics.PreferredBackBufferWidth = 820;
     graphics.PreferredBackBufferHeight = 460;
 }
Exemplo n.º 13
0
Arquivo: Game.cs Projeto: vkd/Elasund
        public Game()
        {
            if (Constants.FORM_LOAD_ELASUND)
            {
            #if !DEBUG
                FormLoadGame formLoadGame = new FormLoadGame();
                formLoadGame.ShowDialog();
                if (formLoadGame.DialogResult == System.Windows.Forms.DialogResult.Cancel)
                    this.Exit();
            #endif
            }
            else
            {
                Settings.SCREEN_WIDTH = 1024;
                Settings.SCREEN_HEIGHT = 768;
                Settings.FULL_SCREEN = false;
            }

            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            graphics.PreferredBackBufferWidth = Settings.SCREEN_WIDTH;
            graphics.PreferredBackBufferHeight = Settings.SCREEN_HEIGHT;

            this.Window.Title = Constants.NAME_GAME;
            if (Settings.FULL_SCREEN)
                graphics.ToggleFullScreen();
        }
Exemplo n.º 14
0
        public TTRGame()
        {
            Content.RootDirectory = "Content";

            // create the TTengine for this game
            TTengineMaster.Create(this);

            // basic XNA graphics init here (before Initialize() and LoadContent() )
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = preferredWindowWidth;
            graphics.PreferredBackBufferHeight = preferredWindowHeight;
#if RELEASE
            graphics.IsFullScreen = true;
#else
            graphics.IsFullScreen = false;
#endif
            //this.TargetElapsedTime = TimeSpan.FromMilliseconds(10);
#if PROFILE
            this.IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = false;
#else
            this.IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = true;
#endif
        }
Exemplo n.º 15
0
        /// <summary>
        /// Create the main instance of the project and run.
        /// </summary>
        public ProjectSkyCrane()
        {
            Content.RootDirectory = "Content";

            // Initialize the graphics manager
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferWidth = INITIAL_WIDTH; // 1280x720 is the XBox 360 default
            graphics.PreferredBackBufferHeight = INITIAL_HEIGHT;
            graphics.SynchronizeWithVerticalRetrace = INITIAL_VSYNC; // Turn off vsync by default

            // Initialize the volume settings
            SoundEffect.MasterVolume = INITIAL_VOLUME;
            MediaPlayer.Volume = INITIAL_VOLUME;

            // Initialize the screen manager
            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            // Activate a few initial screens
            screenManager.AddScreen(new BackgroundScreen());
            screenManager.AddScreen(new MainMenuScreen());

            // Server and client data
            RawClient = null;
            RawServer = null;

            return;
        }
Exemplo n.º 16
0
 public GameWin(Game1 game1, GraphicsDeviceManager graphics, ContentManager Content)
 {
     rectangle = new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight);
     game1.IsMouseVisible = true;
     MediaPlayer.Volume = vol;
     songMenu = Content.Load<Song>("Menu//songMenu");
 }
Exemplo n.º 17
0
 public LoadingScreen(Game game, GraphicsDeviceManager graphics, object[] parameters)
     : base(game)
 {
     this.game = game;
     this.graphics = graphics;
     isSave = (parameters[0].Equals("Save"));
 }
Exemplo n.º 18
0
        /// <summary>
        /// The main game constructor.
        /// </summary>
        public GameStateManagementGame()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
            graphics.IsFullScreen = true;
            TargetElapsedTime = TimeSpan.FromTicks(333333);

            // you can choose whether you want a landscape or portait
            // game by using one of the two helper functions.
            InitializePortraitGraphics();
            // InitializeLandscapeGraphics();

            // Create the screen manager component.
            screenManager = new ScreenManager(this);

            Components.Add(screenManager);

            // attempt to deserialize the screen manager from disk. if that
            // fails, we add our default screens.
            if (!screenManager.DeserializeState())
            {
                // Activate the first screens.
                screenManager.AddScreen(new BackgroundScreen(), null);
                screenManager.AddScreen(new MainMenuScreen(), null);
            }
        }
Exemplo n.º 19
0
        //-ALEX
        public Seizonsha()
            : base()
        {
            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = "Content";
        }
Exemplo n.º 20
0
        public LevelInfo(XElement levelInfo, ContentManager content, IControlScheme controls, GraphicsDeviceManager graphics)
        {
            foreach (XElement element in levelInfo.Elements())
            {
                if (element.Name == XmlKeys.LEVEL_NAME)
                    mLevel = new Level(WorldSelect.LEVEL_DIRECTORY + element.Value.ToString() + ".xml",
                        controls, graphics.GraphicsDevice.Viewport);
                if (element.Name == XmlKeys.TIMERSTAR)
                    mTimeStars = mLevel.TimerStar = Convert.ToInt32(element.Value);

                if (element.Name == XmlKeys.COLLECTIONSTAR)
                    mCollectableStars = mLevel.CollectionStar = Convert.ToInt32(element.Value);

                if (element.Name == XmlKeys.DEATHSTAR)
                    mDeathStars = mLevel.DeathStar = Convert.ToInt32(element.Value);

                if (element.Name == XmlKeys.GOALTIME)
                    mGoalTime = Convert.ToInt32(element.Value);

                if (element.Name == XmlKeys.GOALCOLLECTABLE)
                    mGoalCollectable = Convert.ToInt32(element.Value);

                if (element.Name == XmlKeys.UNLOCKED)
                    mUnlocked = element.Value == XmlKeys.TRUE;
            }
            mContent = content;
            mGraphics = graphics;
            mControls = controls;
        }
Exemplo n.º 21
0
 public Scene0()
 {
     Gm = new GraphicsDeviceManager(this);
     Gm.PreferredBackBufferWidth = 800;
     Gm.PreferredBackBufferHeight = 600;
     Cm = new ContentManager(Services);
 }
Exemplo n.º 22
0
 public Line(GraphicsDeviceManager graphics)
 {
     pixel = new Texture2D(graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
     pixel.SetData(new[] { Color.White });
     point1 = Vector2.Zero;
     point2 = Vector2.Zero;
 }
Exemplo n.º 23
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            map.Open(@"C:\Users\Stephen\Dropbox\Map Editor\New Maps\Fried.adm");
        }
Exemplo n.º 24
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            Content.RootDirectory = "Content";
            IsMouseVisible = true;
        }
Exemplo n.º 25
0
        public FieldPong()
        {
            graphics = new GraphicsDeviceManager(this);
            content = new ContentManager(Services);

            graphics.PreferredBackBufferWidth = 1024;
            graphics.PreferredBackBufferHeight = 768;
            graphics.MinimumPixelShaderProfile = ShaderProfile.PS_2_0;
            graphics.SynchronizeWithVerticalRetrace = true;

            physicsSimulator = new PhysicsSimulator(new Vector2(0));
            physicsSimulator.AllowedPenetration = 0.3f;
            physicsSimulator.BiasFactor = 1.0f;
            Services.AddService(typeof(PhysicsSimulator), physicsSimulator);

            screenManager = new ScreenManager(this);
            Components.Add(screenManager);

            bloomProcessor = new BloomPostProcessor(this);
            Components.Add(bloomProcessor);

            // Uncomment this to monitor the FPS:

            //fpsCounter = new FrameRateCounter(this);
            //Components.Add(fpsCounter);

            audioEngine = new AudioEngine("Content\\Audio\\FieldPongAudio.xgs");
            waveBank = new WaveBank(audioEngine, "Content\\Audio\\Wave Bank.xwb");
            soundBank = new SoundBank(audioEngine, "Content\\Audio\\Sound Bank.xsb");

            backgroundMusic = soundBank.GetCue("GameSong0010 16 Bit");
            backgroundMusic.Play();
        }
Exemplo n.º 26
0
 public Game1()
     : base()
 {
     graphics = new GraphicsDeviceManager(this);
     scene = new GameScene(this);
     Content.RootDirectory = "Content";
 }
Exemplo n.º 27
0
 public BalloonFW()
 {
     Content.RootDirectory = "Content";
     graphics = new GraphicsDeviceManager(this);
     inputHelper = new InputHelper();
     this.IsMouseVisible = true;
 }
Exemplo n.º 28
0
 public Camera(GraphicsDeviceManager grph)
 {
     zoom = 1.0f;
     rotation = 0.0f;
     pos = Vector2.Zero;
     graphics = grph;
 }
Exemplo n.º 29
0
        public MainGame()
        {
            this.IsMouseVisible = true;

            graphics = new GraphicsDeviceManager(this);
            this.graphics.PreparingDeviceSettings += this.GraphicsDevicePreparingDeviceSettings;

            Content.RootDirectory = "Content";

            this.chooser = new Kinect(this, ColorImageFormat.RgbResolution640x480Fps30, DepthImageFormat.Resolution640x480Fps30);
            this.Services.AddService(typeof(Kinect), this.chooser);

            this.Components.Add(this.chooser);

            this.statusCheck = new KinectStatusCheck(this);
            this.Components.Add(this.statusCheck);

            this.depthComponent = new DepthStreamRenderer(this);

            this.plane = new Plane(this);
            this.Components.Add(this.plane);

            UpdateStreamSizeAndLocation();

            // Obliczenia
            a = 7;
            b = 3;

            sum1 = Add(true);
            b1 = BasicTest();

            sum2 = Add(false);
            b2 = BasicTest();
        }
Exemplo n.º 30
0
        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);

            graphics.PreferredBackBufferWidth = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;

            ScreenRectangle = new Rectangle(
                0,
                0,
                screenWidth,
                screenHeight);

            Content.RootDirectory = "Content";

            Components.Add(new InputHandler(this));

            stateManager = new GameStateManager(this);
            Components.Add(stateManager);

            TitleScreen = new TitleScreen(this, stateManager);
            StartMenuScreen = new StartMenuScreen(this, stateManager);
            GamePlayScreen = new GamePlayScreen(this, stateManager);
            CharacterGeneratorScreen = new CharacterGeneratorScreen(this, stateManager);
            LoadGameScreen = new LoadGameScreen(this, stateManager);
            SkillScreen = new GameScreens.SkillScreen(this, stateManager);

            stateManager.ChangeState(TitleScreen);

            this.IsFixedTimeStep = false;
            graphics.SynchronizeWithVerticalRetrace = false;
        }
Exemplo n.º 31
0
 public abstract void Enable(GraphicsDevice device, GraphicsDeviceManager graphicsDeviceManager, bool requireMirror, int mirrorWidth, int mirrorHeight);
Exemplo n.º 32
0
        public void Draw(GraphicsDeviceManager graphics, BasicEffect effect, AlphaTestEffect alpha)
        {
            if (indices != null && verts != null)
            {
                if (verts.Count > 0)
                {
                    effect.TextureEnabled = textureEnabled;

                    if (textureEnabled)
                    {
                        if (Game1.textures.ContainsKey(textureName))
                        {
                            effect.Texture = Game1.textures[textureName];
                            if (alpha != null)
                            {
                                alpha.Texture = effect.Texture;
                            }
                        }
                        else
                        {
                            //Console.WriteLine("missing texture: " + textureName);
                            effect.Texture = Game1.textures["test"];
                            if (alpha != null)
                            {
                                alpha.Texture = effect.Texture;
                            }
                        }
                    }


                    foreach (var pass in (alpha != null ? alpha.CurrentTechnique.Passes : effect.CurrentTechnique.Passes))
                    {
                        pass.Apply();

                        graphics.GraphicsDevice.DrawUserIndexedPrimitives(
                            PrimitiveType.TriangleList,
                            verts_sealed, 0, verts_sealed.Length,
                            indices, 0, indices.Length / 3,
                            VertexPositionColorTexture.VertexDeclaration
                            );
                    }


                    if (Samplers.EnableWireframe)
                    {
                        effect.TextureEnabled = false;

                        Samplers.SetToDevice(graphics, EngineRasterizer.Wireframe);

                        foreach (var pass in effect.CurrentTechnique.Passes)
                        {
                            pass.Apply();

                            graphics.GraphicsDevice.DrawUserIndexedPrimitives(
                                PrimitiveType.TriangleList,
                                verts_sealed, 0, verts_sealed.Length,
                                indices, 0, indices.Length / 3,
                                VertexPositionColorTexture.VertexDeclaration
                                );
                        }

                        Samplers.SetToDevice(graphics, EngineRasterizer.Default);
                    }
                }
                else
                {
                    Console.WriteLine("Empty QuadList!");
                }
            }
        }
Exemplo n.º 33
0
 // constructor
 public ScreenManager(Game game, GraphicsDeviceManager graphics)
     : base(game)
 {
     Graphics = graphics;
 }
Exemplo n.º 34
0
 public virtual void Update(GameTime gametime, Vector2 velocity, GraphicsDeviceManager graphics)
 {
     Sprite.Update(gametime, SpriteVelocity, graphics);
 }
Exemplo n.º 35
0
 protected GameBase()
 {
     Graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
Exemplo n.º 36
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory             = "Content";
     graphics.PreferredBackBufferWidth = 640;
 }
Exemplo n.º 37
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="BoxingViewportAdapter" />.
 ///     Use this constructor only if you're using DirectX due to a bug in MonoGame.
 ///     https://github.com/mono/MonoGame/issues/4018
 ///     This constructor will be made obsolete and eventually removed once the bug has been fixed.
 /// </summary>
 public BoxingViewportAdapter(GameWindow window, GraphicsDeviceManager graphicsDeviceManager, int virtualWidth,
                              int virtualHeight)
     : this(window, graphicsDeviceManager, virtualWidth, virtualHeight, 0, 0)
 {
 }
 public EntityPlayground()
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
 }
Exemplo n.º 39
0
 public void Draw(SpriteBatch spriteBatch, GraphicsDeviceManager graphics)
 {
     spriteBatch.Draw(level14Background, new Rectangle(0, 0, graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight), Color.White);
     spriteBatch.DrawString(level14StoryText, level14Text, new Vector2((LEVEL_WIDTH / 2) - level14Text.Length * 4.5f, 280), Color.White);
 }
 public AnimatedSpritesLab()
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
 }
Exemplo n.º 41
0
 //Constructor
 public MasterController()
 {
     this.m_graphics            = new GraphicsDeviceManager(this);
     this.Content.RootDirectory = "Content";
 }
Exemplo n.º 42
0
 public ShooterGame()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     this.IsMouseVisible   = true;
 }
Exemplo n.º 43
0
 public ConwaysGame()
 {
     graphics = new GraphicsDeviceManager(this);
 }
Exemplo n.º 44
0
 public ECSRogue()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     stateStack            = new Stack <IState>();
 }
Exemplo n.º 45
0
 internal static void SetupCamera(Camera cameraToSetUp, GraphicsDeviceManager graphicsDeviceManager, int width = 800, int height = 600)
 {
     cameraToSetUp.UsePixelCoordinates();
 }
Exemplo n.º 46
0
        public NormalMappingEffectGame()
        {
            Content.RootDirectory = "Content";

            graphics = new GraphicsDeviceManager(this);
        }
 public WindowsRendererGateway(GraphicsDeviceManager graphicsDeviceManager, ResourceManager resourceManager) : base(graphicsDeviceManager, resourceManager)
 {
 }
Exemplo n.º 48
0
    public cAngelIsland(IServiceProvider serviceProvider, GraphicsDeviceManager graphics, int NumPerso)
        : base(serviceProvider, graphics)
    {
        this.NumPerso = NumPerso;
        Hud           = new HUD(NumPerso);
        camera        = new Camera(graphics.GraphicsDevice.Viewport);
        CheckPoints.Add(new Checkpoint(new Vector2(100, 360), 1));
        CheckPoints.Add(new Checkpoint(new Vector2(2200, 360), 2));
        CheckPoints.Add(new Checkpoint(new Vector2(4500, 650), 3));
        CheckPoints.Add(new Checkpoint(new Vector2(5500, 650), 4));


        Joueur          = new PlayerSonic(false, true, NumPerso);
        Joueur.Position = GestionExterne.LoadingPosition(CheckPoints, this);


        TexturesObject.Add(new ObjectMapping(1, new Vector2(-130, 230)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(120, 230)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(320, 220)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(780, 220)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(1260, 230)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(850, -130)));
        BackTextures.Add(new BackGroundTexture(1, new Vector2(-350, -540)));
        BackTextures.Add(new BackGroundTexture(2, new Vector2(150, -520)));
        BackTextures.Add(new BackGroundTexture(3, new Vector2(880, -520)));
        BackTextures.Add(new BackGroundTexture(2, new Vector2(1560, -520)));
        BackTextures.Add(new BackGroundTexture(1, new Vector2(2400, -900)));
        BackTextures.Add(new BackGroundTexture(1, new Vector2(2100, -700)));
        BackTextures.Add(new BackGroundTexture(4, new Vector2(2600, -1250)));
        BackTextures.Add(new BackGroundTexture(3, new Vector2(3700, -850)));
        BackTextures.Add(new BackGroundTexture(2, new Vector2(5000, -850)));
        BackTextures.Add(new BackGroundTexture(1, new Vector2(6000, -500)));
        BackTextures.Add(new BackGroundTexture(0, new Vector2(6600, -500)));
        BackTextures.Add(new BackGroundTexture(1, new Vector2(6900, -500)));

        Teles.Add(new Tele(1, new Vector2(920, -10), NumPerso));
        Rhinobots.Add(new Rhinobot(new Vector2(700, 350), 300));
        Tremplins.Add(new Tremplin(new Vector2(1300, 350), false, false));
        Tremplins.Add(new Tremplin(new Vector2(1300, 50), false, true));
        Tremplins.Add(new Tremplin(new Vector2(1650, 50), false, true));
        Rings.Add(new Ring(new Vector2(400, 350)));
        Rings.Add(new Ring(new Vector2(500, 350)));
        Rings.Add(new Ring(new Vector2(600, 350)));
        Rings.Add(new Ring(new Vector2(700, 350)));
        Rings.Add(new Ring(new Vector2(800, 350)));
        Rings.Add(new Ring(new Vector2(1450, 375)));
        Rings.Add(new Ring(new Vector2(1550, 320)));
        Rings.Add(new Ring(new Vector2(1850, 320)));
        Rings.Add(new Ring(new Vector2(1950, 375)));
        // -------------
        Rings.Add(new Ring(new Vector2(1680, 480)));
        Rings.Add(new Ring(new Vector2(1680, 600)));
        Rings.Add(new Ring(new Vector2(1680, 720)));
        Rings.Add(new Ring(new Vector2(1680, 840)));
        //----------------------------------------------------------
        TexturesObject.Add(new ObjectMapping(1, new Vector2(1800, 220)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(2000, 220)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(2200, 220)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(2400, 220)));
        Pics.Add(new Pic(new Vector2(2500, 360), false));
        Pics.Add(new Pic(new Vector2(2600, 360), false));
        Pics.Add(new Pic(new Vector2(2700, 360), false));
        Tremplins.Add(new Tremplin(new Vector2(2850, 340), false, false));
        Rings.Add(new Ring(new Vector2(2900, 300)));
        Rings.Add(new Ring(new Vector2(2900, 250)));
        Rings.Add(new Ring(new Vector2(2900, 200)));
        //-------------------------------------------------------------
        TexturesObject.Add(new ObjectMapping(3, new Vector2(3050, -200)));
        Tremplins.Add(new Tremplin(new Vector2(3000, 100), false, false));
        Rings.Add(new Ring(new Vector2(3050, 50)));
        Rings.Add(new Ring(new Vector2(3050, 0)));
        Rings.Add(new Ring(new Vector2(3050, -50)));
        Teles.Add(new Tele(2, new Vector2(3250, -70), NumPerso));
        Pentes.Add(new Pente(1, new Vector2(3555, -10), false));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(4500, -10)));
        Teles.Add(new Tele(3, new Vector2(4650, 100), NumPerso));
        Tremplins.Add(new Tremplin(new Vector2(4800, 100), true, true));
        Tremplins.Add(new Tremplin(new Vector2(5300, 100), false, true));
        //-----------------------------------------------------------
        TexturesObject.Add(new ObjectMapping(2, new Vector2(1600, 620)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(1800, 620)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(2000, 620)));
        TexturesObject.Add(new ObjectMapping(1, new Vector2(2200, 620)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(2400, 620)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(2600, 620)));
        Tremplins.Add(new Tremplin(new Vector2(2000, 720), true, true));
        Rings.Add(new Ring(new Vector2(2550, 710)));
        Rings.Add(new Ring(new Vector2(2600, 710)));
        Rings.Add(new Ring(new Vector2(2650, 710)));
        Rings.Add(new Ring(new Vector2(2700, 710)));
        Pics.Add(new Pic(new Vector2(2500, 750), false));
        Pics.Add(new Pic(new Vector2(2600, 750), false));
        Pentes.Add(new Pente(1, new Vector2(3110, 590), true));
        Rings.Add(new Ring(new Vector2(3750, 650)));
        Rings.Add(new Ring(new Vector2(3800, 650)));
        Rings.Add(new Ring(new Vector2(3850, 650)));
        Rings.Add(new Ring(new Vector2(3900, 650)));
        //-------------------------------------------------------------------
        TexturesObject.Add(new ObjectMapping(2, new Vector2(4000, 510)));
        TexturesObject.Add(new ObjectMapping(1, new Vector2(4200, 510)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(4400, 510)));
        Teles.Add(new Tele(2, new Vector2(4400, 650), NumPerso));
        Rhinobots.Add(new Rhinobot(new Vector2(4600, 650), 100));
        Pics.Add(new Pic(new Vector2(4700, 650), false));
        Pics.Add(new Pic(new Vector2(4800, 650), false));
        //-------------------------------------------------------------------
        Pentes.Add(new Pente(1, new Vector2(5000, 700), true));
        TexturesObject.Add(new ObjectMapping(1, new Vector2(5520, 520)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(5720, 520)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(5920, 520)));
        Pics.Add(new Pic(new Vector2(5750, 680), false));
        Pics.Add(new Pic(new Vector2(5850, 680), false));
        Singes.Add(new SingeArticuler(new Vector2(5920, 340)));
        Pentes.Add(new Pente(1, new Vector2(6245, 465), true));
        //----------------------------------------------------------------------
        TexturesObject.Add(new ObjectMapping(2, new Vector2(6775, 290)));
        Teles.Add(new Tele(1, new Vector2(6800, 410), NumPerso));
        Pentes.Add(new Pente(1, new Vector2(7000, 470), false));
        //----------------------------------------------------------------------<
        TexturesObject.Add(new ObjectMapping(3, new Vector2(7510, 500)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(7610, 500)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(7900, 500)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(8000, 500)));
        TexturesObject.Add(new ObjectMapping(2, new Vector2(8100, 500)));
        TexturesObject.Add(new ObjectMapping(3, new Vector2(8200, 500)));
        MiniBoss.Add(new FireBreath(new Vector2(8300, 250)));
        //------------------------------------------------------------------
    }
Exemplo n.º 49
0
 public Main()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory    = "Content";
     graphics.GraphicsProfile = GraphicsProfile.HiDef;
 }
Exemplo n.º 50
0
 public Bubble_MonoGame_Init()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
Exemplo n.º 51
0
 public Game1()
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
 }
Exemplo n.º 52
0
        //Stopwatch stopwatch;

        //long tickCount = 0;
        //double sumOfMilliseconds = 0;
        //double averageMilliseconds = 0;
        //double maxMills = double.MinValue;
        //double minMills = double.MaxValue;

        #endregion

        public NewKarmaScreen(string key, GraphicsDeviceManager graphics)
        {
            Key      = key;
            Graphics = graphics;
        }
Exemplo n.º 53
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
Exemplo n.º 54
0
 public Starve()
     : base()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
Exemplo n.º 55
0
 public TextEntryGame()
 {
     _graphics             = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
 }
 /// <summary>
 /// A game demonstrating collision detection
 /// </summary>
 public AudioExampleGame()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = true;
 }
Exemplo n.º 57
0
 internal static void initialize(GraphicsDeviceManager graphicsManager)
 {
     _graphicsManager = graphicsManager;
 }
Exemplo n.º 58
0
 public Talos()
 {
     manager = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content/bin";
 }
Exemplo n.º 59
0
 public MainGame()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     manager = Content;
 }
Exemplo n.º 60
0
 public Dodgeball()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     IsMouseVisible        = false;
 }