Exemplo n.º 1
0
 public FallAnimation(GridAnimator parant, Vector2 startPosition, Vector2 endPosition, HexagonContent content, Hex endHex)
 {
     this.parant        = parant;
     this.startPosition = startPosition;
     this.endPosition   = endPosition;
     this.content       = content;
     end             = endHex;
     currentPosition = startPosition;
     direction       = endPosition - startPosition;
     direction.Normalize();
 }
Exemplo n.º 2
0
 public Grid(short hexagonSize, Vector2 center, byte maxValue, int mapRadius = 3)
 {
     this.hexagonSize = hexagonSize;
     Center           = center;
     hexMap           = new Hexagon[mapRadius * 2 + 1, mapRadius * 2 + 1];
     bufferMap        = new Hexagon[mapRadius * 2 + 1, mapRadius * 2 + 1];
     selectedHex      = new List <Hexagon>((mapRadius * 2 + 1) * (mapRadius * 2 + 1));
     this.maxValue    = maxValue;
     this.mapRadius   = mapRadius;
     rand             = new Random();
     animator         = new GridAnimator(this, 500f);
 }