コード例 #1
0
ファイル: Game1.cs プロジェクト: Nerminkrus/Spel
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            tex = Content.Load<Texture2D>("ball");

            Ball b = new Ball_Mouse(tex);
            gameObjects.Add(b);
            b = new Ball_Bounce(tex, new Vector2(200, Window.ClientBounds.Height - 30), Window);
            gameObjects.Add(b);
            b = new Ball_Keyboard(tex, new Vector2(50, Window.ClientBounds.Height - 30), Window);
            gameObjects.Add(b);
        }
コード例 #2
0
        /// </summary>
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            tex         = Content.Load <Texture2D>("ball");


            Ball b = new Ball_Mouse(tex);

            gameObjects.Add(b);
            b = new Ball_Bounce(tex, new Vector2(200, Window.ClientBounds.Height - 30), Window);
            gameObjects.Add(b);
            b = new Ball_Keyboard(tex, new Vector2(50, Window.ClientBounds.Height - 30), Window);
            gameObjects.Add(b);
        }