SHARE
TWEET

Osztály

a guest Oct 6th, 2014 176 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Drawing;
  6.  
  7. namespace Street_Race_Easy2D
  8. {
  9.     public class Level : GameWindow
  10.     {
  11.         private Graphics DrawHandle;
  12.         private string Location = @"Data//GFX//bg.png";
  13.         public static int imagex = 0;
  14.         public static int imagey = 0;
  15.  
  16.         public Level(Graphics g)
  17.         {
  18.             DrawHandle = g;
  19.         }        
  20.  
  21.         public void init()
  22.         {
  23.             Render();
  24.         }
  25.  
  26.         private void Render()
  27.         {          
  28.             Image image = new Bitmap(Location);
  29.             //------------------------------------------------------------------
  30.             DrawHandle.DrawImage(image, imagex, imagey - 120);
  31.             DrawHandle.DrawImage(image, imagex, imagey + 360);
  32.             DrawHandle.DrawImage(image, imagex, imagey + 240);
  33.             DrawHandle.DrawImage(image, imagex, imagey + 120);
  34.             DrawHandle.DrawImage(image, imagex, imagey);
  35.             //------------------------------------------------------------------
  36.         }
  37.     }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top