示例#1
0
    public static UIAtlas GetLevelAtlas(string atlasname)
    {
        string     path = XGamePath.GetAtlasPath(atlasname);
        GameObject go   = Load <GameObject>(path);
        UIAtlas    ua   = go.GetComponent <UIAtlas>();

        return(ua);
    }
示例#2
0
    public static void GetAtlasAsync(string atlasname, Action <UIAtlas> callback)
    {
        string path = XGamePath.GetAtlasPath(atlasname);

        LoadAsync <GameObject>(path, (o) =>
        {
            Log(Tag, "GetAtlasAsync", path);
            UIAtlas ua = o.GetComponent <UIAtlas>();
            callback(ua);
        });
    }