29 lines
828 B
C#
29 lines
828 B
C#
using System.Collections.Generic;
|
|
namespace Gameplay.Area
|
|
{
|
|
public class AroundCellData
|
|
{
|
|
public int centerCellIndex;
|
|
public int aroundDistance;
|
|
public bool containsCenterCell;
|
|
public List<int> aroundCellIndexs;
|
|
|
|
public AroundCellData(int centerCellIndex,
|
|
int aroundDistance,
|
|
bool containsCenterCell)
|
|
{
|
|
this.centerCellIndex = centerCellIndex;
|
|
this.aroundDistance = aroundDistance;
|
|
this.containsCenterCell = containsCenterCell;
|
|
}
|
|
|
|
public static int GetKey(int centerCellIndex,
|
|
int aroundDistance,
|
|
bool containsCenterCell)
|
|
{
|
|
return centerCellIndex + aroundDistance * 10000 + (containsCenterCell ? 1 : 0) * 10000000;
|
|
}
|
|
|
|
}
|
|
}
|