Exemple #1
0
 public VCube(Cube cube, bool generateDirs = false) : base(cube)
 {
     Axial = cube.ToAxial();
     if (generateDirs)
     {
         GenerateDirs();
     }
 }
Exemple #2
0
 public void Scale(int direction, int distance)
 {
     for (int i = 0; i < distance; i++)
     {
         Axial = Dirs[direction].Axial;
         var cube = Axial.ToCube(); X = cube.X; Y = cube.Y; Z = cube.Z;
         GenerateDirs();
     }
 }
Exemple #3
0
 public List<BMapCell> GetCellsInRange(Axial c, int n)
 {
     var result = new List<BMapCell>();
     var circle = c.GetInRange(n);
     for (int i = 0; i < circle.Count; i++)
         for (int j = 0; j < _notNullCells.Length; j++)
             if (circle[i] == _notNullCells[j].Axial)
             {
                 result.Add(_notNullCells[j]);
                 break;
             }
     return result;
 }
Exemple #4
0
 public Axial(Axial s)
 {
     Q = s.Q; R = s.R;
 }
Exemple #5
0
 public bool IsCell(Axial axial)
 {
     return IsCell(axial.Q, axial.R);
 }
Exemple #6
0
 public BMapCell Cell(Axial position)
 {
     return Cells[position.Q, position.R];
 }
Exemple #7
0
 public BMapCell(int q, int r)
 {
     Axial = new Axial(q, r);
     Cube  = new Cube(Axial);
 }
Exemple #8
0
 public Unit(Unit unit, Axial startPos, int teamId) : this(unit)
 {
     StartPos = startPos;
     TeamId   = teamId;
 }