Exemple #1
0
        public FanForm(Game1 game, FanTile tile)
        {
            InitializeComponent();
            this.game = game;
            this.tile = tile;
            switch (tile.getDirection())
            {
            case EDirection.UP:
            case EDirection.DOWN:
                nrAmount.Value = tile.getRecHit().Width / 50;
                break;

            case EDirection.LEFT:
            case EDirection.RIGHT:
                nrAmount.Value = tile.getRecHit().Height / 50;
                break;
            }
            nrPower.Value = tile.getPower();
            nrTime.Value  = tile.getTime();
            setDirection(tile.getDirection());
        }
Exemple #2
0
 private void nrAmount_ValueChanged(object sender, EventArgs e)
 {
     tile.setRectangle((int)nrAmount.Value, tile.getDirection());
 }
Exemple #3
0
 private static void addFans(List <string> list)
 {
     list.Add("[Fans]");
     foreach (Tile t in Game1.middle)
     {
         if (t is FanTile)
         {
             FanTile   tile = (FanTile)t;
             Rectangle rec  = t.getRecHit();
             String    s    = rec.X / DIVID + ":" + ((rec.Y * -1) - rec.Height) / DIVID + ":" + rec.Width / DIVID + ":" + rec.Height / DIVID + ":" + tile.getPower() + ":" + tile.getDirection().ToString();
             if (tile.getTime() != 0)
             {
                 s += ":" + tile.getTime();
             }
             list.Add(s);
         }
     }
 }