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(); }
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(); }
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(); }
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(); }
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(); } } }
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(); } } }
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(); }
// 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);
public override void Draw(UIElementsWindow drawSegment, GameTime gameTime) { drawSegment.Scene.Draw(drawSegment.Camera); }