Beispiel #1
0
        public float JumpRange      = 10; //Pixels

        public Kintouch(NeatGame game, KinectEngine kinect = null) : base(game)
        {
            Debug.WriteLine("Kintouch object created.", "Kintouch");
            Debug.WriteLineIf(kinect == null, "Kinect is null.", "Kintouch");

            this.Game   = game;
            this.Kinect = kinect;

            TrackPoints = new List <TrackPointData>()
            {
                new TrackPointData(),
                new TrackPointData()
                {
                    TrackJoint        = JointType.HandRight,
                    BackupJoint       = JointType.WristRight,
                    TextureName       = "handright",
                    PushedTextureName = "handright_pushed"
                },
                new TrackPointData()
                {
                    SkeletonId = 1, Tint = Color.Pink
                },
                new TrackPointData()
                {
                    TrackJoint        = JointType.HandRight,
                    BackupJoint       = JointType.WristRight,
                    TextureName       = "handright",
                    PushedTextureName = "handright_pushed",
                    SkeletonId        = 1, Tint = Color.Pink
                }
            };
        }
Beispiel #2
0
        public void Create()
        {
            Ram = new RAM(this);

            videos       = new Dictionary <string, Video>();
            videoPlayers = new List <VideoPlayer>();
            sounds       = new Dictionary <string, SFXList>();
            songs        = new Dictionary <string, Song>();
            effects      = new Dictionary <string, Effect>();
            fonts        = new Dictionary <string, SpriteFont>();

            Console           = new Neat.Components.Console(this);
            TextEffects       = new Neat.Components.TextEffects(this);
            ElegantTextEngine = new Neat.Components.ElegantTextEngine(this);
            Event.Engine      = this;

            Components.Add(Console);
            Components.Add(TextEffects);
            Components.Add(ElegantTextEngine);

#if KINECT
            Components.Add(
                Kinect = new KinectEngine(this,
                                          ColorImageFormat.RgbResolution640x480Fps30,
                                          DepthImageFormat.Resolution640x480Fps30));
            Components.Add(
                Touch = new Kintouch(this, Kinect));
#endif

#if LIVE
            Components.Add(new GamerServicesComponent(this));
#endif

            Graphics              = new GraphicsDeviceManager(this);
            RandomGenerator       = new Random();
            Content.RootDirectory = "Content";

            SetFrameRate(60);

            Screens = new Dictionary <string, Screen>();
            AddScreens();
        }