Exemplo n.º 1
0
        public HexagonRelation GetHexagonSprite(PlacedHexagon placedHexagon)
        {
            var sprite = _sprites.Dequeue();

            sprite.transform.position = grid.GetCellCenterWorld(placedHexagon.Cell);
            sprite.SetRelation(placedHexagon);
            sprite.SetSprite(placedHexagon.Hexagon.tile.sprite);
            sprite.SetColor(placedHexagon.Hexagon.color);
            sprite.EnableRenderer();
            return(sprite);
        }
Exemplo n.º 2
0
 public void RemoveRelation()
 {
     _placedHexagon = new PlacedHexagon(null, Vector3Int.zero);
 }
Exemplo n.º 3
0
 public void SetRelation(PlacedHexagon placedHexagon)
 {
     _placedHexagon = placedHexagon;
 }
Exemplo n.º 4
0
 private void Awake()
 {
     _spriteRenderer = GetComponent <SpriteRenderer>();
     _placedHexagon  = new PlacedHexagon(null, Vector3Int.zero);
 }