Exemplo n.º 1
0
        public override void SetObject(Map.Object obj)
        {
            this.obj = obj;
            HoleXfer xfer = obj.GetExtraData <HoleXfer>();

            exitX.Text      = xfer.FallX.ToString();
            exitY.Text      = xfer.FallY.ToString();
            scriptFn.Text   = xfer.UnknownScriptHandler;
            scriptTime.Text = xfer.ScriptTimeout.ToString();
        }
Exemplo n.º 2
0
        void ButtonOKClick(object sender, EventArgs e)
        {
            HoleXfer xfer = obj.GetExtraData <HoleXfer>();

            xfer.FallX = int.Parse(exitX.Text);
            xfer.FallY = int.Parse(exitY.Text);
            xfer.UnknownScriptHandler = scriptFn.Text;
            xfer.ScriptTimeout        = short.Parse(scriptTime.Text);
            DialogResult = DialogResult.OK;
            Close();
        }
Exemplo n.º 3
0
 public void drawTeleWays(Graphics g)
 {
     foreach (KeyValuePair <Map.Object, int> keyValuePair1 in telelist)
     {
         bool       flag = false;
         Map.Object key  = keyValuePair1.Key;
         int        num  = keyValuePair1.Value;
         float      x2   = -1f;
         float      y2   = -1f;
         if (num > 0)
         {
             foreach (KeyValuePair <Map.Object, int> keyValuePair2 in telelist)
             {
                 if (keyValuePair2.Key.Extent == num)
                 {
                     x2 = keyValuePair2.Key.Location.X;
                     y2 = keyValuePair2.Key.Location.Y;
                     if (keyValuePair2.Value == key.Extent)
                     {
                         flag = true;
                     }
                 }
             }
         }
         else if (ThingDb.Things[key.Name].Xfer == "HoleXfer")
         {
             HoleXfer extraData = key.GetExtraData <HoleXfer>();
             x2 = extraData.FallX;
             y2 = extraData.FallY;
         }
         if ((double)x2 >= 0.0 && (double)y2 >= 0.0)
         {
             Color color = Color.FromArgb((int)byte.MaxValue, 237, 204);
             if (flag)
             {
                 color = Color.FromArgb((int)byte.MaxValue, 211, 130);
             }
             else
             {
                 g.FillEllipse(new SolidBrush(color), key.Location.X - 5f, key.Location.Y - 6f, 12f, 12f);
             }
             g.DrawLine(new Pen(color, 2f)
             {
                 CustomEndCap = Arrow
             }, key.Location.X, key.Location.Y, x2, y2);
         }
     }
 }