internal virtual void ConnectTo(Tube Other) { if (Endpoint != null) { throw new InvalidOperationException("Tube already connected"); } Endpoint = Other; ConnectedTo?.Invoke(this, Other); }
public override string GetCombatReplayJSON(CombatReplayMap map) { RectangleSerializable aux = new RectangleSerializable { Type = "Rectangle", Width = Width, Height = Height, Fill = Filled, Color = Color, Growing = Growing, Start = Lifespan.Item1, End = Lifespan.Item2, ConnectedTo = ConnectedTo.GetConnectedTo(map) }; return(JsonConvert.SerializeObject(aux)); }
public override string GetCombatReplayJSON(CombatReplayMap map) { DoughnutSerializable aux = new DoughnutSerializable { Type = "Doughnut", OuterRadius = OuterRadius, InnerRadius = InnerRadius, Fill = Filled, Color = Color, Growing = Growing, Start = Lifespan.Item1, End = Lifespan.Item2, ConnectedTo = ConnectedTo.GetConnectedTo(map) }; return(JsonConvert.SerializeObject(aux)); }
public override string GetCombatReplayJSON(CombatReplayMap map) { CircleSerializable aux = new CircleSerializable { Type = "Circle", Radius = Radius, MinRadius = MinRadius, Fill = Filled, Color = Color, Growing = Growing, Start = Lifespan.Item1, End = Lifespan.Item2, ConnectedTo = ConnectedTo.GetConnectedTo(map) }; return(JsonConvert.SerializeObject(aux)); }
public override string GetCombatReplayJSON(CombatReplayMap map) { PieSerializable aux = new PieSerializable { Type = "Pie", Radius = Radius, Direction = Direction, OpeningAngle = OpeningAngle, Fill = Filled, Color = Color, Growing = Growing, Start = Lifespan.Item1, End = Lifespan.Item2, ConnectedTo = ConnectedTo.GetConnectedTo(map) }; return(JsonConvert.SerializeObject(aux)); }