Example #1
0
        PolyNav2D GetNav(BaibianType type)
        {
            if (type == BaibianType.none)
            {
                return(null);
            }
            PolyNav2D ins;

            if (!_navCache.TryGetValue(type, out ins))
            {
                ins = Instantiate(Resources.Load <PolyNav2D>("baibian/nav/nav_" + type.ToString()));
                ins.transform.SetParent(nav, false);
                _navCache[type] = ins;
            }
            return(ins);
        }
Example #2
0
 protected override string GetBodyPath(BaibianType type)
 {
     return("baibian/world/jiejie/jiejie_" + type.ToString());
 }
Example #3
0
        Animation GetBgfg(BaibianType type)
        {
            if (type == BaibianType.none)
            {
                return(null);
            }
            Animation anim;

            if (!_bgfgCache.TryGetValue(type, out anim))
            {
                anim = Instantiate(Resources.Load <Animation>("baibian/world/bgfg/bgfg_" + type.ToString()));
                anim.transform.SetParent(bgfg, false);
                _bgfgCache[type] = anim;
            }
            return(anim);
        }