예제 #1
0
 internal virtual void ConnectTo(Tube Other)
 {
     if (Endpoint != null)
     {
         throw new InvalidOperationException("Tube already connected");
     }
     Endpoint = Other;
     ConnectedTo?.Invoke(this, Other);
 }
예제 #2
0
        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));
        }
예제 #3
0
        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));
        }
예제 #4
0
        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));
        }
예제 #5
0
        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));
        }