Ejemplo n.º 1
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     Vector2 textLocation;
     textLocation.X = 1000.0f;
     textLocation.Y = (float)(SharedResources.Game.GraphicsDevice.Viewport.Bounds.Bottom) - 30.0f;
     SharedResources.FontManager.BeginText();
     SharedResources.FontManager.DrawText(FontType.ArialLarge, "*", textLocation, Color.Crimson, false);
     SharedResources.FontManager.EndText();
 }
Ejemplo n.º 2
0
        public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
        {
            Vector2 textLocation;

            textLocation.X = 1000.0f;
            textLocation.Y = (float)(SharedResources.Game.GraphicsDevice.Viewport.Bounds.Bottom) - 30.0f;
            SharedResources.FontManager.BeginText();
            SharedResources.FontManager.DrawText(FontType.ArialLarge, "*", textLocation, Color.Crimson, false);
            SharedResources.FontManager.EndText();
        }
Ejemplo n.º 3
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     Matrix cameraTransform = mMapCamera.Transform;
     Actor actor = GameResources.ActorManager.GetActorById(mActorId);
     cameraTransform.Translation = actor.GetComponent<TransformComponent>(ActorComponent.ComponentType.Transform).Translation + Vector3.Up * CameraHeight;
     mMapCamera.Transform = cameraTransform;
     drawSegment.Scene.SceneGraph.ResetTraversal();
     drawSegment.Scene.SceneGraph.ExternalMaterialFlags = TraversalContext.MaterialFlags.Simplified;
     drawSegment.Scene.SceneGraph.VisibilityFrustum = mMapCamera.Frustum;
     drawSegment.Scene.SceneGraph.EyePosition = mMapCamera.Transform.Translation;
     drawSegment.Scene.SceneGraph.Draw();
 }
Ejemplo n.º 4
0
        public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
        {
            Matrix cameraTransform = mMapCamera.Transform;
            Actor  actor           = GameResources.ActorManager.GetActorById(mActorId);

            cameraTransform.Translation = actor.GetComponent <TransformComponent>(ActorComponent.ComponentType.Transform).Translation + Vector3.Up * CameraHeight;
            mMapCamera.Transform        = cameraTransform;
            drawSegment.Scene.SceneGraph.ResetTraversal();
            drawSegment.Scene.SceneGraph.ExternalMaterialFlags = TraversalContext.MaterialFlags.Simplified;
            drawSegment.Scene.SceneGraph.VisibilityFrustum     = mMapCamera.Frustum;
            drawSegment.Scene.SceneGraph.EyePosition           = mMapCamera.Transform.Translation;
            drawSegment.Scene.SceneGraph.Draw();
        }
Ejemplo n.º 5
0
        public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
        {
            Rectangle chRect = SharedResources.Game.GraphicsDevice.Viewport.Bounds;
            int size = (int)(MathHelper.Min(chRect.Width, chRect.Height) * 0.06f);

            chRect.Y = (chRect.Height - size) / 2;
            chRect.X = (chRect.Width - size) / 2;
            chRect.Width = size;
            chRect.Height = size;

            SharedResources.SpriteBatch.Begin();
            SharedResources.SpriteBatch.Draw(mCrosshairs, chRect,  Color.White);
            SharedResources.SpriteBatch.End();
        }
Ejemplo n.º 6
0
        public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
        {
            Rectangle chRect = SharedResources.Game.GraphicsDevice.Viewport.Bounds;
            int       size   = (int)(MathHelper.Min(chRect.Width, chRect.Height) * 0.06f);

            chRect.Y      = (chRect.Height - size) / 2;
            chRect.X      = (chRect.Width - size) / 2;
            chRect.Width  = size;
            chRect.Height = size;

            SharedResources.SpriteBatch.Begin();
            SharedResources.SpriteBatch.Draw(mCrosshairs, chRect, Color.White);
            SharedResources.SpriteBatch.End();
        }
Ejemplo n.º 7
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     Actor avatar = GameResources.ActorManager.GetActorById(mActorId);
     if (avatar != null)
     {
         TransformComponent avatarTransform = avatar.GetComponent<TransformComponent>(ActorComponent.ComponentType.Transform);
         if (avatarTransform != null)
         {
             Vector2 textLocation;
             textLocation.X = 20.0f;
             textLocation.Y = (float)(SharedResources.Game.GraphicsDevice.Viewport.Bounds.Bottom) - 30.0f;
             SharedResources.FontManager.BeginText();
             SharedResources.FontManager.DrawText(FontType.ArialSmall, avatarTransform.Translation.ToString(), textLocation, Color.LightGray, false);
             SharedResources.FontManager.EndText();
         }
     }
 }
Ejemplo n.º 8
0
        public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
        {
            Actor avatar = GameResources.ActorManager.GetActorById(mActorId);

            if (avatar != null)
            {
                TransformComponent avatarTransform = avatar.GetComponent <TransformComponent>(ActorComponent.ComponentType.Transform);
                if (avatarTransform != null)
                {
                    Vector2 textLocation;
                    textLocation.X = 20.0f;
                    textLocation.Y = (float)(SharedResources.Game.GraphicsDevice.Viewport.Bounds.Bottom) - 30.0f;
                    SharedResources.FontManager.BeginText();
                    SharedResources.FontManager.DrawText(FontType.ArialSmall, avatarTransform.Translation.ToString(), textLocation, Color.LightGray, false);
                    SharedResources.FontManager.EndText();
                }
            }
        }
Ejemplo n.º 9
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     SharedResources.SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise);
     SharedResources.SpriteBatch.Draw((Texture2D)(drawSegment.Scene.Resources.ShadowMap), SharedResources.Game.GraphicsDevice.Viewport.Bounds, Color.White);
     SharedResources.SpriteBatch.End();
 }
Ejemplo n.º 10
0
 // Usually a subclass will need to use the Scene object to draw itself and will make a call like this:
 // drawSegment.Scene.Draw(drawSegment.Camera);
 public abstract void Draw(UIElementsWindow drawSegment, GameTime gameTime);
Ejemplo n.º 11
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     drawSegment.Scene.Draw(drawSegment.Camera);
 }
Ejemplo n.º 12
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     SharedResources.SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque, SamplerState.PointClamp, DepthStencilState.Default, RasterizerState.CullCounterClockwise);
     SharedResources.SpriteBatch.Draw((Texture2D)(drawSegment.Scene.Resources.ShadowMap), SharedResources.Game.GraphicsDevice.Viewport.Bounds, Color.White);
     SharedResources.SpriteBatch.End();
 }
Ejemplo n.º 13
0
 public override void Draw(UIElementsWindow drawSegment, GameTime gameTime)
 {
     drawSegment.Scene.Draw(drawSegment.Camera);
 }
Ejemplo n.º 14
0
 // Usually a subclass will need to use the Scene object to draw itself and will make a call like this:
 // drawSegment.Scene.Draw(drawSegment.Camera);
 public abstract void Draw(UIElementsWindow drawSegment, GameTime gameTime);