public Match3Tile SpawnSpecificTile(System.Type tileType, TileColorType prefabDefaultColor, bool isBoardSetup = false)
    {
        Match3Tile newTile = (Instantiate(tilesDictionary[tileType, prefabDefaultColor].gameObject) as GameObject).GetComponent <Match3Tile>();

        newTile.cachedTransform.parent = cachedTransform;
        newTile.BoardRenderer          = this;

        if (!isBoardSetup)
        {
            newTile.InitComponent();
        }

        return(newTile);
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        targetTile.InitComponent();

        SerializerUtils.WriteToBinaryStream(targetTile, null);
    }