/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (Game1 game = new Game1()) { game.Run(); } }
public TCheckBoxOption(Game1.StructOptionsMain structOptionsMain, StructCheckBox structCheckBox) { //GRAPHICS this.graphics = structOptionsMain.Graphics; //TEXTURES this.txCheckedBox = structCheckBox.TxCheckedBox; this.txUnCheckedBox = structCheckBox.TxUnCheckedBox; if (stateCheckBoxLeft) { this.txCheckBoxLeft = txCheckedBox; this.txCheckBoxRight = txUnCheckedBox; } else { stateCheckBoxLeft = true; this.txCheckBoxLeft = txUnCheckedBox; this.txCheckBoxRight = txCheckedBox; } //TEXTURES POSITIONS this.PosCheckBoxLeft = structCheckBox.PosCheckBoxLeft; this.PosCheckBoxRight = structCheckBox.PosCheckBoxRight; //TEXTURES SIZES this.vecSizeCheckBox = structCheckBox.VecSizeCheckBox; //COLOUR this.col = Color.White; //INITIALIZE Init(); }
public Game1() { graphics = new GraphicsDeviceManager(this); gsm = new GamestateManager(); //graphics.IsFullScreen = true; graphics.PreferredBackBufferHeight = 500; graphics.PreferredBackBufferWidth = 900; Content.RootDirectory = "Content"; ExitGame = this; ch = new ControlHandler(); r = new Random(); p = new Player(ch); scores = new Highscores(); intro = new AsteroidsIntro(); credit = new Credit(); screenHeight = graphics.PreferredBackBufferHeight; screenWidth = graphics.PreferredBackBufferWidth; drawShield = false; intersected = false; randomized = false; shield = new Classes.Perks.ShieldPerk(Content, p); speedUp = new Classes.Perks.SpeedUpPerk(Content, p); extraLife = new Classes.Perks.ExtraLifePerk(Content, p); machineGun = new Classes.Perks.MachineGunPerk(Content, p); hud = new HUD(screenWidth, screenHeight, shield); pickUp = new Pickup(); numOfAsteroids = 3; currentGameState = 1; }
public TSoundOption(Game1.StructOptionsMain structOptionsMain, StructSound structSound) { //GRAPHICS this.graphics = structOptionsMain.Graphics; //TEXTURES this.txSoundBar = structSound.TxSoundBar; this.txBarCursor = structSound.TxSoundBarCursor; this.txArrowLeft = structSound.TxArrowLeft; this.txArrowRight = structSound.TxArrowRight; //TEXTURES POSITIONS this.posSoundBar = structSound.PosSoundBar; this.posArrowLeft = structSound.PosArrowLeft; this.posArrowRight = structSound.PosArrowRight; //TEXTURES SIZES this.sizeSoundBar = structSound.SizeSoundBar; this.sizeBarCursor = structSound.SizeSoundBarCursor; this.sizeArrow = structSound.SizeArrow; //COLOUR this.col = Color.White; //INITIALIZE barCursorHeigthFloat = posSoundBar.Y += 0.30f; MakeResolutionArray(); Init(); }
public TResolutionOption(Game1.StructOptionsMain structOptionsMain, StructResolution structResolution) { //GRAPHICS this.graphics = structOptionsMain.Graphics; //TEXTURES this.txResolutionBar = structResolution.TxResolutionBar; this.txArrowLeft = structResolution.TxArrowLeft; this.txArrowRight = structResolution.TxArrowRight; //TEXTURES POSITIONS this.posResolutionBar = structResolution.PosResolutionBar; this.posArrowLeft = structResolution.PosArrowLeft; this.posArrowRight = structResolution.PosArrowRight; //TEXTURES SIZED this.sizeResolutionBar = structResolution.SizeResolutionBar; this.sizeArrow = structResolution.SizeArrow; this.sizeResolutionBar = structResolution.SizeResolutionBar; //COLOUR this.col = Color.White; //INITIALIZE this.temp = posResolutionBar; Init(); }
public Game1() { graphics = new GraphicsDeviceManager(this); gsm = new GamestateManager(); //graphics.IsFullScreen = true; graphics.PreferredBackBufferHeight = 500; graphics.PreferredBackBufferWidth = 900; Content.RootDirectory = "Content"; ExitGame = this; ch = new ControlHandler(); r = new Random(); p = new Player(); hud = new HUD(); oMenu = new OptionsMenu(graphics, Content); intro = new AsteroidsIntro(); screenHeight = graphics.PreferredBackBufferHeight; screenWidth = graphics.PreferredBackBufferWidth; numOfAsteroids = 3; currentGameState = 1; }
static void Main() { game = new Game1(); game.Run(); }
public OptionsMenu(Game1.StructOptionsMain structOptionsMain) { this.structOptionsMain = structOptionsMain; this.graphics = structOptionsMain.Graphics; this.Content = structOptionsMain.Content; this.ch = structOptionsMain.Ch; }