Ejemplo n.º 1
0
        /// <summary>
        /// Initializes class and components
        /// </summary>
        protected override void Initialize()
        {
            this.Components.Add(this.colorStream);

            // Create the avatar animator
            this.animator = new AvatarAnimator(this);
            this.Components.Add(this.animator);

            this.ui = new SimpleGUI(this);
            this.ui.DrawOrder = 1000;
            //Components.Add(this.ui);

            // Add XUI Component
            //_G.Game = this;

            // add core components
            Components.Add(new GamerServicesComponent(this));

            // add layers
            //UiLayer = new UiLayer(this);
            _G.UI = UiLayer;

            // add other components
            _G.GameInput = new GameInput((int)E_GameButton.Count, (int)E_GameAxis.Count);
            GameControls.Setup(); // initialise mappings

            base.Initialize();

            this.Components.Add(camera);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes class and components
        /// </summary>
        protected override void Initialize()
        {
            this.Components.Add(this.colorStream);

            // Create the avatar animator
            this.animator = new AvatarAnimator(this);
            //this.Components.Add(this.animator);

            // Add XUI Component
            _G.Game = this;

            // add core components
            Components.Add(new GamerServicesComponent(this));

            // add layers
            UiLayer = new UiLayer(this);
            _G.UI = UiLayer;

            // add other components
            _G.GameInput = new GameInput((int)E_GameButton.Count, (int)E_GameAxis.Count);
            GameControls.Setup(); // initialise mappings

            camera = new Camera(this);
            camera.Position = Vector3.Forward * 12;

            this.Services.AddService(typeof(Camera), this.camera);

            List<Camera> kinectCamera = new List<Camera>();
            kinectCamera.Add(new Camera(this));
            kinectCamera[0].Position = Vector3.Zero;
            kinectCamera[0].View = Matrix.CreateLookAt(
                   new Vector3(0.0f, 0.0f, 0.0f),
                   new Vector3(0.0f, 0.0f, 1.0f),
                   Vector3.Down);
            this.Services.AddService(typeof(List<Camera>), kinectCamera);

            this.Components.Add(camera);

            base.Initialize();
        }