public void Draw() { _graphics.DrawSprite("menubg", new Rect(0, 0, Screen.Width, Screen.Height), new Rect(200, 200, Screen.Width + 200, Screen.Height + 200)); _dialogManager.Draw(new Rect(160, 200, 130, 120)); _graphics.DrawString("New Game", 180, 220); _graphics.DrawString("Load Game", 180, 240); _graphics.DrawString("Exit", 180, 260); _graphics.DrawSprite("cursor", 160, 223 + (int)_menuItem * 20); }
public void Draw() { _battleManager.Draw("02doukutsu"); _dialog.Draw(new Rect(200, 330, 440, 150)); if (battleState == BattleStateEnum.Idle) { _iconManager.Draw("attack", new Vector(50, 350), ColorStruct.White * (_inputManager.IsPressedKey((int)Keys.Up) ? 1f : 0.7f)); _iconManager.Draw("magic", new Vector(20, 380), ColorStruct.White * (_inputManager.IsPressedKey((int)Keys.Left) ? 1f : 0.7f)); _iconManager.Draw("defend", new Vector(80, 380), ColorStruct.White * (_inputManager.IsPressedKey((int)Keys.Right) ? 1f : 0.7f)); _iconManager.Draw("item", new Vector(50, 410), ColorStruct.White * (_inputManager.IsPressedKey((int)Keys.Down) ? 1f : 0.7f)); _iconManager.Draw("run", new Vector(20, 410), ColorStruct.White * 0.7f); } var i = 0; foreach (var actor in Party.Actors) { DrawActor(i); DrawActorInfo(i, actor); i++; } // draw enemies _enemyManager.Draw("DarkTroll", 60, 200); // draw effects foreach (var effect in Effects) { effect.Draw(); effect.Update(); if (effect.Lifespan <= 0) { Effects.Remove(effect); break; // can't iterate enumeration after removing, ok since we should never really need to have multiple effects die at once } } }
public void Draw() { _dialog.Draw(new Rect(0, 0, 640, 45)); _graphics.DrawString(Text, 50, 15); }
public void Draw(Rect targetRect, int index = 0) { int x = 0, y = 7; var topleft = new Rect(x, y, chipsize, chipsize); var top = new Rect(x + chipsize, y, chipsize, chipsize); var topright = new Rect(x + width - chipsize, y, chipsize, chipsize); var mod = new Rect(x + chipsize, y, targetRect.Width % chipsize, chipsize); _dialogManager.Draw(new Rect(targetRect.X, targetRect.Y, chipsize, chipsize), topleft, ColorStruct.White * 0.5f); for (var i = 1; i < targetRect.Width / chipsize - 1; i++) { _dialogManager.Draw(new Rect(targetRect.X + i * chipsize, targetRect.Y, chipsize, chipsize), top, ColorStruct.White * 0.5f); } if (targetRect.Width % chipsize != 0) { _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize - targetRect.Width % chipsize, targetRect.Y, targetRect.Width % chipsize, chipsize), mod, ColorStruct.White * 0.5f); } _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize, targetRect.Y, chipsize, chipsize), topright, ColorStruct.White * 0.5f); topleft.Y += chipsize; top.Y += chipsize; topright.Y += chipsize; mod.Y += chipsize; for (var j = 1; j < targetRect.Height / chipsize - 1; j++) { _dialogManager.Draw(new Rect(targetRect.X, targetRect.Y + j * chipsize, chipsize, chipsize), topleft, ColorStruct.White * 0.5f); for (var i = 1; i < targetRect.Width / chipsize - 1; i++) { _dialogManager.Draw(new Rect(targetRect.X + i * chipsize, targetRect.Y + j * chipsize, chipsize, chipsize), top, ColorStruct.White * 0.5f); } _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize, targetRect.Y + j * chipsize, chipsize, chipsize), topright, ColorStruct.White * 0.5f); if (targetRect.Width % chipsize != 0) { _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize - targetRect.Width % chipsize, targetRect.Y + j * chipsize, targetRect.Width % chipsize, chipsize), mod, ColorStruct.White * 0.5f); } } topleft.Y = height - chipsize; top.Y = height - chipsize; topright.Y = height - chipsize; mod.Y = height - chipsize; _dialogManager.Draw(new Rect(targetRect.X, targetRect.Y + targetRect.Height - chipsize, chipsize, chipsize), topleft, ColorStruct.White * 0.5f); for (var i = 1; i < targetRect.Width / chipsize - 1; i++) { _dialogManager.Draw(new Rect(targetRect.X + i * chipsize, targetRect.Y + targetRect.Height - chipsize, chipsize, chipsize), top, ColorStruct.White * 0.5f); } if (targetRect.Width % chipsize != 0) { _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize - targetRect.Width % chipsize, targetRect.Y + targetRect.Height - chipsize, targetRect.Width % chipsize, chipsize), mod, ColorStruct.White * 0.5f); } _dialogManager.Draw(new Rect(targetRect.X + targetRect.Width - chipsize, targetRect.Y + targetRect.Height - chipsize, chipsize, chipsize), topright, ColorStruct.White * 0.5f); }