public KinectAbsoluteScreenspaceCursor(KinectService Kinect, Handedness hand, Game1 MyGame)
 {
     myGame = MyGame;
     kinect = Kinect;
     handSelect = hand;
     kinect.RegisterKinectListener(this);
     _rect = new Rectangle();
     _rect.Width = 48;
     _rect.Height = 48;
     _position = new Vector2();
     bodySpace = new Rectangle();
 }
 public ButterflyPlayer(Game1 MyGame, Vector3 Position, float Rotation, Camera cam)
 {
     myGame = MyGame;
     hands = new List<ICursor>();
     hands.Add(new KinectAbsoluteScreenspaceCursor(myGame.Services.GetService(typeof(KinectService)) as KinectService, KinectAbsoluteScreenspaceCursor.Handedness.Left, myGame));
     hands.Add(new KinectAbsoluteScreenspaceCursor(myGame.Services.GetService(typeof(KinectService)) as KinectService, KinectAbsoluteScreenspaceCursor.Handedness.Right, myGame));
     kinect = myGame.Services.GetService(typeof(KinectService)) as KinectService;
     kinect.RegisterKinectListener(this);
     batch = myGame.Services.GetService(typeof(SpriteBatch)) as SpriteBatch;
     position = Position;
     rotation = Rotation;
 }
Exemple #3
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = 1024;
     graphics.PreferredBackBufferHeight = 768;
       //  graphics.IsFullScreen = true;
     this.Window.Title = "Kinder Kinect";
     Content.RootDirectory = "Content";
     debugDraw = new DebugDrawer(this);
     errorLogger = new Logger(new Uri(@"..\..\..\errorLog.txt", UriKind.Relative));
     kinect = new KinectService(errorLogger);
     player = new PlayerProfile();
 }
 protected override void LoadContent()
 {
     kinect = myGame.Services.GetService(typeof(KinectService)) as KinectService;
     kinectVideoTexture = new Texture2D(myGame.GraphicsDevice, 640, 480);
     kinect.RegisterKinectListener(this);
     myModel = myGame.Content.Load<Model>("Models/simplePlane");
     base.LoadContent();
 }