Exemplo n.º 1
0
    public GChess InstansiateChessAt(GameObject prefab, Vector2Int location)
    {
        var res = Instantiate(prefab, chessContainer);

        res.transform.position = GridManager.instance.GetChessPosition3D(location);
        GChess chess = res.GetComponent <GChess>();

        chess.location = location;
        chess.OnGameStart();
        chess.render.GetComponent <Animator>().Play("Birth");
        return(chess);
    }