internal override void Draw(SpriteBatch sb, DebugStrings ds, int order, StereoEye stereoEye) { if (order == _order) { Draw(sb, ds, stereoEye); } }
internal override void Draw(SpriteBatch sb, DebugStrings ds, int order, StereoEye stereoEye) { foreach (VisibleObject obj in collection) { obj.Draw(sb, ds, order, stereoEye); } }
internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye) { for (int i = 0; i < 7; i++) { Draw(sb, ds, i, stereoEye); } }
internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye) { float currentX = X + Config.OffsetX; float currentY = Y + Config.OffsetY; float offsetScale = 0; if (stereoEye == StereoEye.Left) { offsetScale = -Config.offsetScale; } if (stereoEye == StereoEye.Right) { offsetScale = Config.offsetScale; } sb.Draw(Texture, currentX - offsetScale, currentY, Config.HEX_SIZE, Config.HEX_SIZE, ((Team)Parent).Color); float x = ((Team)Parent).TeamId % 2 == 0 ? currentX + 230 * Config.HEX_SIZE / 1000 : currentX + 50 * Config.HEX_SIZE / 1000; float y = currentY + 380 * Config.HEX_SIZE / 1000; int starSize = Config.HEX_SIZE / 3; for (int i = 0; i < _healths; i++) { sb.Draw(_health, x - offsetScale, y + Config.HEX_SIZE / 3, starSize, starSize, ((Team)Parent).Color); x += starSize * 55 / 100 + 1; } }
private void SetMessage(List <String> message) { //App.Current.Dispatcher.BeginInvoke(new Action(() => { DebugStrings.Insert(0, "***************************************************"); message.ForEach(x => DebugStrings.Insert(0, string.Format("--->> {0}", x))); DebugStrings.Insert(0, DateTime.Now.ToShortDateString() + " / " + DateTime.Now.ToLongTimeString()); DebugStrings.Insert(0, "***************************************************"); //})); }
private void ExportList() { var folder = new FolderBrowserDialog(); var result = folder.ShowDialog(); if (result == DialogResult.OK) { var selectedPath = folder.SelectedPath; // TODO: Create download file and name it 'DebugWindowList.log' // TODO: and copy it into the selected path var fileName = string.Format("{0}_{1}-{2}-{3} {4}-{5}.log", "DebugWindowList", DateTime.Now.Day, DateTime.Now.Month, DateTime.Now.Year, DateTime.Now.Hour, DateTime.Now.Minute); var blah = fileName.Replace('/', '-'); var filePath = Path.Combine(selectedPath, blah); using (var sw = new StreamWriter(filePath, false)){ DebugStrings.ForEach(x => sw.WriteLine(x)); } } }
internal override void Draw(SpriteBatch sb, DebugStrings ds, int order, StereoEye stereoEye) { base.Draw(sb, ds, order, stereoEye); int k = 0; if (Config.HEX_SIZE < 24) { k = 1; } int j = 1; if (Config.HEX_SIZE < 24) { j = 0; } int pinY = ((int)Field.Field[Config.FIELD_HEIGHT - 1, Config.FIELD_WIDTH - 1].Y + Config.HEX_SIZE * 11 / 8) + TeamId * k * Config.HEX_SIZE; int pinX = (int)Field.Field[0, 0].X + TeamId * j * (int)Field.Field[0, (Config.FIELD_WIDTH - 1) / 2].X; object[] o = new object[Submarines.Count * 4]; int i = 0; String str = ""; foreach (Submarine sub in Submarines) { o[i] = Config.Names[sub.Number]; str += "{" + i++ + "} - "; o[i] = sub.Health; str += "{" + i++ + "}/"; o[i] = sub.TorpedoCount; str += "{" + i++ + "}/"; o[i] = sub.MinesCount; str += "{" + i++ + "} "; } sb.DrawDebugString(pinX, pinY, string.Format(str, o), Color); }
internal abstract void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye);
internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye) { }
internal override void Draw(SpriteBatch sb, DebugStrings ds, StereoEye stereoEye) { sb.Draw(Texture, Cell.X - 1.4f, Cell.Y - 1.4f, Config.HEX_SIZE + 2.8f, Config.HEX_SIZE + 2.8f, Color.White); }