public Game1() { graphics = new GraphicsDeviceManager(this); this.graphics.PreferredBackBufferWidth = 1280; this.graphics.PreferredBackBufferHeight = 720; this.graphics.IsFullScreen = false; Content.RootDirectory = "Content"; kinect = new Kinect(); }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; //Set some basic stuff for my game graphics.IsFullScreen = false; //set it to full screen no graphics.PreferredBackBufferWidth = Defualt.Default._W; //set the screen dimension width graphics.PreferredBackBufferHeight = Defualt.Default._H; //set the screen dimension height this.Window.Title = "WongPong"; //set window title kinect = new Kinect(); //Make kinect object }
private Model model; //player's 3D model #endregion Fields #region Constructors //Constructor for the player class public Player(Model newmodel = null) { model = newmodel; position = new Vector3(0,0,0); crosshair_position = new Vector2(settings.Default.ScreenWidth/2,settings.Default.ScreenHeight/2); //Initailze kinect if needed if (settings.Default.EnableKinect) { kinect = new Kinect(); kinect.initialize(); } }
//Defualt Constructor public Player() { //set important properties health = 100; //player's hitpoints speed = 5; //Move speed laserDamage = 25; //per laser hit damage bulletspeed = 20f; //speed of the laser firerate = 10f; //fire rate of lasers //set other stuff texture = null; position = new Vector2(300, 650); isVisible = true; bullets = new List<Bullet>(); bulletDelay = firerate; score = 0; sm = new SoundManager(); kinect = new Kinect(); }
//Initialize Function protected override void Initialize() { //initialize kinect stuff if needed if (Defualt.Default.UsingKinect) { kinect = new Kinect(); kinect.initialize(); } base.Initialize(); }
public MainForm() { InitializeComponent(); FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; WindowState = System.Windows.Forms.FormWindowState.Maximized; /* //This code will produce some LSD results, do not uncomment ScreenWidth = Screen.FromControl(this).Bounds.X; ScreenHeight = Screen.FromControl(this).Bounds.Y; */ updater = new System.Timers.Timer(gameTime); updater.Elapsed += new ElapsedEventHandler(Update); kinect = new Kinect(); //Make kinect object updater.Start(); }
public virtual void Initialize() { kinect = new Kinect(); kinect.initialize(); Terminated = false; }
//load content public void LoadContent(ContentManager Content) { texture = Content.Load<Texture2D>("Artwork/player"); bulletTexture = Content.Load<Texture2D>("Artwork/playerbullet"); sm.LoadContent(Content); //if (Defualt.Default.UsingKinect) { kinect = new Kinect(); kinect.initialize(); //} }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { IsMouseVisible = true; Rectangle window = new Rectangle(0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height); games = new List<GameBase>(); loadedGame = -1; Game1 game1 = new Game1(Content, window); games.Add((GameBase)game1); //Game2 game2 = new Game2(Content, window); //games.Add((GameBase)game2); Tetris tetris = new Tetris(Content, window); games.Add((GameBase)tetris); buttonFont = Content.Load<SpriteFont>("buttonText"); //games.Add(new Game1(Content)); button1 = new Button(GraphicsDevice, new Rectangle(100, 10, 300, 100), Color.DarkGreen, Color.Green, buttonFont, "GAME 1"); button2 = new Button(GraphicsDevice, new Rectangle(100, 120, 300, 100), Color.Blue, Color.SkyBlue, buttonFont, "Tetris"); Quit = new Button(GraphicsDevice, new Rectangle(100, 230, 300, 100), Color.Crimson, Color.OrangeRed, buttonFont, "QUIT"); endgame = new Button(GraphicsDevice, new Rectangle(100, 10, 300, 100), Color.Crimson, Color.OrangeRed, buttonFont, "ENDGAME"); kinect = new Kinect(); kinect.initialize(); base.Initialize(); }