/// <inheritdoc /> public override string ToString() { var sb = new StringBuilder(); sb.AppendLine("---------------------"); sb.AppendLine($"Graph ({NodeCount.ToString()} nodes)"); foreach (var t in _connections) { sb.AppendLine($"Node: {t.Key.ToString()}"); foreach (var x1 in t.Value) { sb.AppendLine($"\tConnection to: {x1.ToString()}"); } } sb.AppendLine("---------------------"); return(sb.ToString()); }
public override string ToString() { return(Name + ": " + filename + " (" + NodeCount.ToString() + " nodes)"); }
public override string ToString() { return(CenterX.ToString() + ", " + CenterY.ToString() + ", " + SizeX.ToString() + ", " + SizeY.ToString() + ", " + NodeIndex.ToString() + ", " + NodeCount.ToString() + ", " + Short7.ToString() + ", " + Short8.ToString() + ", " + FloatUtil.ToString(Float1) + ", " + Byte1.ToString() + ", " + Byte2.ToString() + ", " + Byte3.ToString() + ", " + Byte4.ToString()); }
public override void Update(JuixelTime Time) { Location MoveVector = 0; if (Input.KeyIsDown(Keys.W)) { MoveVector += new Location(0, -1); } if (Input.KeyIsDown(Keys.S)) { MoveVector += new Location(0, 1); } if (Input.KeyIsDown(Keys.A)) { MoveVector += new Location(-1, 0); } if (Input.KeyIsDown(Keys.D)) { MoveVector += new Location(1, 0); } if (MoveVector.X != 0 || MoveVector.Y != 0) { Player.Position += MoveVector.Angle.Location * Pixels_Per_Second * Time.ElapsedSec; Tiles.Focus = (Player.Position / 40).Int; } base.Update(Time); if (Input.KeyIsDown(Keys.Y)) { var Player = new Player(); Player.Scale = 10; Player.Position = Location.Random * 1000; Player.Layer = Player.Position.Y; AddChild(Player); Players.Add(Player); Player = new Player(); Player.Scale = 10; Player.Position = Location.Random * 1000; Player.Layer = Player.Position.Y; AddChild(Player); Players.Add(Player); } if (Input.KeyIsDown(Keys.OemPlus)) { for (int i = 0; i < Players.Count; i++) { Players[i].Health += 0.01; } } if (Input.KeyIsDown(Keys.OemMinus)) { for (int i = 0; i < Players.Count; i++) { Players[i].Health -= 0.01; } } IntLocation TilePosition = (Player.Position / Tiles.Scale / 8).IntFloor; Tile CurrentTile = Tiles.Get(TilePosition.X, TilePosition.Y); int TileCount = 0; int WeatherCount = 0; if (CurrentTile != LastTile) { for (int Y = -Weather_Detect_Radius; Y <= Weather_Detect_Radius; Y++) { for (int X = -Weather_Detect_Radius; X <= Weather_Detect_Radius; X++) { Tile Tile = Tiles.Get(TilePosition.X + X, TilePosition.Y + Y); if (Tile != null) { WeatherCount += Tile.WeatherIntensity; TileCount++; } } } LastTile = CurrentTile; TargetIntensity = (WeatherCount / (double)TileCount) * 4; } if (Snow.Intensity != TargetIntensity) { double Difference = TargetIntensity - Snow.Intensity; double Change = Weather_Change_Per_Second * Time.ElapsedSec; if (Math.Abs(Difference) < Change) { Snow.Intensity = TargetIntensity; } else { Snow.Intensity += Change * (Difference / Math.Abs(Difference)); } } JuixelGame.ShowDebugText(NodeCount.ToString(), 2); if (Client != null) { Info.Text = Client.Latency.ToString(); } }