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; }
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(); }