示例#1
0
 public VCube(Cube cube, bool generateDirs = false) : base(cube)
 {
     Axial = cube.ToAxial();
     if (generateDirs)
     {
         GenerateDirs();
     }
 }
示例#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();
     }
 }
示例#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;
 }
示例#4
0
 public Axial(Axial s)
 {
     Q = s.Q; R = s.R;
 }
示例#5
0
 public bool IsCell(Axial axial)
 {
     return IsCell(axial.Q, axial.R);
 }
示例#6
0
 public BMapCell Cell(Axial position)
 {
     return Cells[position.Q, position.R];
 }
示例#7
0
 public BMapCell(int q, int r)
 {
     Axial = new Axial(q, r);
     Cube  = new Cube(Axial);
 }
示例#8
0
 public Unit(Unit unit, Axial startPos, int teamId) : this(unit)
 {
     StartPos = startPos;
     TeamId   = teamId;
 }