protected override void Draw(GameTime gameTime) { //bloom.BeginDraw(); GraphicsDevice.Clear(Color.Black); //if (sceneManager.GetSceneType() == E_Scene.GAMEPLAY) //{ // Renderer_2D.BeginBlend(); // sceneManager.Draw(); // Renderer_2D.End(); // base.Draw(gameTime); //} //else { // base.Draw(gameTime); // Renderer_2D.Begin(); // sceneManager.Draw(); // Renderer_2D.End(); //} base.Draw(gameTime); TaskManager.Draw(); Renderer_2D.Begin(); sceneManager.Draw(); Renderer_2D.End(); //3D向けの設定変更 //SpriteBatchが変更した設定を元に戻す。(今回はカリングの設定のみでOK) //GraphicsDevice.BlendState = BlendState.Opaque; //GraphicsDevice.DepthStencilState = DepthStencilState.Default; GraphicsDevice.RasterizerState = RasterizerState.CullClockwise; gameDevice.GetParticleGroup.Draw(); }
public void Draw() { Vector2 imgSize = ResouceManager.GetTextureSize(imgName); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(imgName, position, alpha, rect, Vector2.One * size, 0, imgSize / 2); }
public override void Draw() { Renderer_2D.Begin(); Renderer_2D.DrawString(content, Parameter.ScreenSize - new Vector2(300, 100), Color.White, 2); Renderer_2D.End(); aliveTimer.Update(); }
/// <summary> /// 描画 /// </summary> public void Draw() { if (!Parameter.IsDebug) { return; } Renderer_2D.DrawString("ObjectsCount:" + EntityManager.GetEntityCount(), new Vector2(10, 520), Color.Red, 0.5f); Renderer_2D.DrawString("ParticlesCount:" + gameDevice.GetParticlesCount(), new Vector2(10, 550), Color.Red, 0.5f); }
private void DrawFocus() { Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 imgSize = ResouceManager.GetTextureSize("Focus"); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture("Focus", focus, Color.Yellow, 0.2f, rect, Vector2.One, 0, imgSize / 2); Renderer_2D.End(); }
private void DrawDebug() { Renderer_2D.Begin(); Renderer_2D.DrawString("Stage1", Vector2.One * 20, Color.Red, 1.8f); Renderer_2D.DrawString("ObjectsCount:" + objectManager.ObjectsCount(), new Vector2(20, 100), Color.Red, 1.2f); Renderer_2D.DrawString("Position:" + focus, new Vector2(1440, 60), Color.Red, 1.1f); Renderer_2D.DrawString("Page:" + (int)(focus.X / 2000), new Vector2(1440, 120), Color.Red, 1.1f); Renderer_2D.End(); }
/// <summary> /// 描画 /// </summary> /// <param name="renderer">2D描画管理</param> public void Draw() { Vector2 operSize = ResouceManager.GetTextureSize("Page_Ending"); Vector2 operPosition = new Vector2((Parameter.ScreenSize.X - operSize.X) / 2, 0); Renderer_2D.DrawTexture("Page_Ending", operPosition); promptButton.Draw(); }
private void DrawEntityPosition() { string name = "P_Cross"; Vector2 position = entity.transform.Position; Vector2 imgSize = ResouceManager.GetTextureSize(name); float radian = MathHelper.ToRadians(entity.transform.Angle); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(name, position, Color.Red, alpha, rect, Vector2.One * 1.5f, radian, imgSize / 2); }
/// <summary> /// 描画 /// </summary> public void Draw() { //Renderer_2D.DrawTexture("BackGround", Vector2.Zero); promptButton.Draw(); Vector2 staSize = ResouceManager.GetTextureSize("Page_StaffScroll"); Vector2 staPosition = new Vector2((Parameter.ScreenSize.X - staSize.X) / 2, 0); Renderer_2D.DrawTexture("Page_StaffScroll", staPosition); }
/// <summary> /// 描画 /// </summary> public void Draw() { //Renderer_2D.DrawTexture("BackGround", Vector2.Zero); promptButton.Draw(); Vector2 operSize = ResouceManager.GetTextureSize("Page_Operation"); Vector2 operPosition = new Vector2((Parameter.ScreenSize.X - operSize.X) / 2, 0); Renderer_2D.DrawTexture("Page_Operation", operPosition); }
public override void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); string name = energyBar.GetImgName(); Vector2 imgSize = ResouceManager.GetTextureSize(name); Rectangle rect = new Rectangle(0, 0, (int)(imgSize.X * energyBar.GetRate()), (int)imgSize.Y); Vector2 position = entity.transform.Position; while (entity.transform.Angle < 0) { entity.transform.Angle += 360; } float angle = entity.transform.Angle; if (angle % 180 == 0) { angle--; } float radian = MathHelper.ToRadians(angle); Vector2 direction = new Vector2((float)Math.Cos(radian), (float)Math.Sin(radian)); Vector2 offsetVert = Method.RightAngleMove(direction, 270); angle += 90; int area = (int)(angle / 90); radian = MathHelper.ToRadians(angle); direction = new Vector2((float)Math.Cos(radian), (float)Math.Sin(radian)); radian = MathHelper.ToRadians(entity.transform.Angle); Vector2 offsetHori = Vector2.Zero; if (area % 4 == 0 || area % 4 == 2) { offsetHori = Method.RightAngleMove(direction, 40); } else { offsetHori = Method.RightAngleMove(direction, -40); } Renderer_2D.DrawTexture( name, position + offsetVert + offsetHori, Color.LightGreen, alpha, rect, Vector2.One, radian, imgSize / 2 ); Renderer_2D.End(); }
public void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 imgSize = ResouceManager.GetTextureSize("Mouse"); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture("Mouse", GetPosition(), Color.LightBlue, Vector2.One); Renderer_2D.End(); }
public override void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 imgSize = ResouceManager.GetTextureSize(name); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(name, position, alpha, rect, Vector2.One, 0, imgSize / 2); Renderer_2D.End(); }
private void DrawHelpPage() { if (isPause) { Renderer_2D.Begin(); Vector2 imgSize = ResouceManager.GetTextureSize("HelpPage"); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture("HelpPage", Parameter.ScreenSize / 2, Color.White, 1, rect, Vector2.One, 0, imgSize / 2); Renderer_2D.End(); } }
protected virtual void DrawObject() { Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 imgSize = ResouceManager.GetTextureSize(name); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(name, position, Color.White, 1, rect, Vector2.One, 0, imgSize / 2); Renderer_2D.End(); }
public void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); for (int i = 0; i < imgCount; i++) { string imageName = name + i; Renderer_2D.DrawTexture(imageName, layerPositions[i]); } Renderer_2D.End(); }
private void DrawWall() { Renderer_2D.Begin(Camera2D.GetTransform()); for (int i = 0; i < mapPointsList[eObjectType.Wall].Count; i += 2) { Renderer_2D.DrawLine( mapPointsList[eObjectType.Wall][i].Position, mapPointsList[eObjectType.Wall][i + 1].Position, Color.LightGreen ); } Renderer_2D.End(); }
public override void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 position = entity.transform.Position + offset; Vector2 imgSize = ResouceManager.GetTextureSize(name); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Vector2 drawSize = new Vector2(size.X / imgSize.X, size.Y / imgSize.Y) * 2; Renderer_2D.DrawTexture(name, position, color, alpha, rect, drawSize, 0, imgSize / 2); Renderer_2D.End(); }
protected override void DrawObject() { Renderer_2D.Begin(Camera2D.GetTransform()); Color color = isSelected ? Color.Red : Color.White; Vector2 imgSize = ResouceManager.GetTextureSize(name); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(name, position, color, 1, rect, Vector2.One, 0, imgSize / 2); Renderer_2D.End(); }
public C_DrawSeasonUI(C_SeasonState seasonState, float depth = 100, float alpha = 1) { this.seasonState = seasonState; this.alpha = alpha; this.depth = depth; graphicsDevice = Renderer_2D.GetGraphicsDevice(); effect = ResouceManager.GetEffect("CircleBar").Clone(); effect.Parameters["WorldViewProjection"].SetValue(Camera2D.GetView() * Camera2D.GetProjection()); effect.CurrentTechnique = effect.Techniques["Technique1"]; vertexPositions = new VertexPositionTexture[4]; }
protected virtual void DrawCollition() { Renderer_2D.Begin(Camera2D.GetTransform()); Color color = isMouseIn ? Color.Red : Color.Yellow; Vector2 imgSize = ResouceManager.GetTextureSize("CollisionArea"); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Vector2 drawSize = new Vector2(radius / imgSize.X, radius / imgSize.Y) * 2; Renderer_2D.DrawTexture("CollisionArea", position, color, 0.5f, rect, drawSize, 0, imgSize / 2); Renderer_2D.End(); }
public C_DrawRouteEffect(float alpha = 1, float depth = 16) { this.alpha = alpha; this.depth = depth; imageNames = new List <string>(); imageEffects = new List <ImageEffect>(); creatTimer = new Timer(0.1f); creatTimer.Dt = new Timer.timerDelegate(CreatEffectOne); creatNO = 0; size = Vector2.One; graphicsDevice = Renderer_2D.GetGraphicsDevice(); }
public void Draw() { Renderer_2D.Begin(); Renderer_2D.DrawTexture("ToolBar" + pageNo, startPosition); Renderer_2D.DrawTexture("ToolBarMask", startPosition + new Vector2(80 * ((int)nowType % 10), 0)); for (int i = 0; i < 9; i++) { Renderer_2D.DrawString((i + 1).ToString(), startPosition + new Vector2(30, -35) + new Vector2(80 * i, 0), Color.Red, 0.8f); } Renderer_2D.DrawString(0.ToString(), startPosition + new Vector2(30, -35) + new Vector2(80 * 9, 0), Color.Red, 0.8f); Renderer_2D.DrawString("-".ToString(), startPosition + new Vector2(30, -35) + new Vector2(80 * 10, 0), Color.Red, 0.8f); Renderer_2D.DrawString("+".ToString(), startPosition + new Vector2(30, -35) + new Vector2(80 * 11, 0), Color.Red, 0.8f); Renderer_2D.End(); }
public override void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); if (scrollSpeed == 0) { DrawNoScoll(); } else { DrawScoll(); } Renderer_2D.End(); }
public override void Draw() { Renderer_2D.Begin(Camera2D.GetTransform()); for (int i = 0; i < linePoint.Count - 1; i++) { Renderer_2D.DrawLine( linePoint[i], linePoint[i + 1], Color.Yellow ); } Renderer_2D.End(); }
public override void Draw() { actionTimer.Update(); CreatSecondCircle(); SkillAction(); Renderer_2D.Begin(Camera2D.GetTransform()); Vector2 position = entity.transform.Position - new Vector2(0, 130); Rectangle rect = new Rectangle(0, 0, (int)imgSize.X, (int)imgSize.Y); Renderer_2D.DrawTexture(name, position, alpha * 0.8f, rect, Vector2.One * nowSize, 0, imgSize / 2); Renderer_2D.End(); }
/// <summary> /// 描画 /// </summary> public void Draw() { Renderer_2D.Begin(); int currentCount = resourceLoader.CurrentCount; int pasent = (int)(currentCount / (float)totalResouceNum * 100f); //完成率を数字で表示 if (totalResouceNum != 0) { Renderer_2D.DrawString(pasent + "%", new Vector2(1800, 1000), Color.White, 1.5f); } Renderer_2D.End(); }
private void DrawBezierLine() { Renderer_2D.Begin(Camera2D.GetTransform()); for (int i = 0; i < bezierPositions.Count; i++) { for (int j = 0; j < bezierPositions[i].Count - 1; j++) { Renderer_2D.DrawLine( bezierPositions[i][j], bezierPositions[i][j + 1], Color.Yellow ); } } Renderer_2D.End(); }
/// <summary> /// 描画 /// </summary> public void Draw() { //Renderer_2D.DrawTexture("Loading", Vector2.Zero); int currentCount = resourceLoader.CurrentCount; int pasent = (int)(currentCount / (float)totalResouceNum * 100f); //完成率を表示 entity.transform.SetPositionX = startX + (endX - startX) * pasent / 100; //完成率を数字で表示 if (totalResouceNum != 0) { Renderer_2D.DrawString(pasent + "%", new Vector2(1800, 1000), Color.White, 1.5f); } }
private void DrawTextMessage() { Vector2 position = entity.transform.Position; Renderer_2D.DrawString(entity.GetName() + " - Position:" + position, new Vector2(1000, 50), Color.Red, 0.8f); Renderer_2D.DrawString(entity.GetName() + " - Angle:" + entity.transform.Angle, new Vector2(1000, 100), Color.Red, 0.8f); Renderer_2D.DrawString(entity.GetName() + " - Comps:" + entity.GetComponentCount(), new Vector2(1000, 150), Color.Red, 0.8f); Renderer_2D.DrawString(bezier.Print(), new Vector2(1000, 200), Color.Red, 0.8f); collider = entity.GetColliderComponent(entity.GetName()); if (collider == null) { return; } Renderer_2D.DrawString("ColliderCount:" + collider.results.Count, new Vector2(1000, 250), Color.Red, 0.8f); }