private GameObject CreateTile(TileType type, Vector2 position)
    {
        //Cria um tile de tipo type na posicao position. Tambem o coloca como filho de mapParent, para depois centralizar.
        GameObject tile = tiles[type.GetHashCode()];
        var        go   = Instantiate(tile, position, Quaternion.identity);

        go.transform.parent = mapParent;
        return(go);
    }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TileType != global::MM26.IO.Models.Tile.Types.TileType.Void)
            {
                hash ^= TileType.GetHashCode();
            }
            hash ^= items_.GetHashCode();
            if (GroundSprite.Length != 0)
            {
                hash ^= GroundSprite.GetHashCode();
            }
            if (AboveSprite.Length != 0)
            {
                hash ^= AboveSprite.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #3
0
 // For Equals.
 public override int GetHashCode()
 {
     return(Type.GetHashCode());
 }
 public override int GetHashCode()
 {
     return(Tile.GetHashCode() + (Count << 15));
 }
 public override int GetHashCode() => type.GetHashCode();
Exemple #6
0
 public override int GetHashCode()
 {
     return(coordinates.GetHashCode() + type.GetHashCode());
 }