コード例 #1
0
ファイル: Form1.cs プロジェクト: jkotzi/Ball
 private void MainForm_Load(object sender, EventArgs e)
 {
     DoubleBuffered = true;
     m_Ball = new Ball();
 }
コード例 #2
0
ファイル: Game1.cs プロジェクト: Shereef/Ball
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            ballTexture = Content.Load<Texture2D>("Images\\ball");
            ball1 = new Ball(++ballcount, ballTexture, new Vector2(100, 100));
            ball2 = new Ball(++ballcount, ballTexture, new Vector2(400, 100));
        }