Пример #1
0
        public void SetPossibleSpawnPoints(Vector2 pos, GridTags tag)
        {
            Vector2Int posInt = new Vector2Int((int)pos.x, (int)pos.y);

            posInt = CoordinatesConverter.MatrixIndexToCoordinate(posInt, SharedVariables.matrixDimensions.x);
            if (tag == GridTags.Empty)
            {
                if (!possibleSpawnPoints.Contains(posInt))
                {
                    possibleSpawnPoints.Add(posInt);
                }
            }
            else
            {
                if (possibleSpawnPoints.Contains(posInt))
                {
                    possibleSpawnPoints.Remove(posInt);
                }
            }
        }