예제 #1
0
    public void Clear()
    {
        LowText items = TableMng.Instance.Get(TableType.Item);

        //LowText item = GameMng.Table.Get(TableType.Item);

        for (int i = 0; i < items.GetCount(); i++)
        {
            _identifiedItems[items.ToS(i, "NAME")] = false;
        }
    }
예제 #2
0
    public override void Init()
    {
        _identifiedItems = new Dictionary <string, bool>();

        //LowText items = GameMng.Table.Get(TableType.Item);
        LowText items = TableMng.Instance.Get(TableType.Item);

        for (int i = 0; i < items.GetCount(); i++)
        {
            _identifiedItems.Add(items.ToS(i, "NAME"), false);
        }
    }
예제 #3
0
    private void MapDBRegist()
    {
        //LowText mapsData = GameMng.Table.Get(TableType.Map);
        LowText mapsData = TableMng.Instance.Get(TableType.Map);

        for (int i = 0; i < mapsData.GetCount(); i++)
        {
            Data.MapData mapData = new Data.MapData(mapsData, i);
            _mapInfos.Add(mapData._mapName, mapData);
            _datas.Add(mapData._mapName, mapData);
        }
    }
예제 #4
0
    private void TileDBRegist()
    {
        //LowText tileText = GameMng.Table.Get(TableType.Tile);
        LowText tileText = TableMng.Instance.Get(TableType.Tile);

        for (int i = 0; i < tileText.GetCount(); i++)
        {
            Data.TileData info = new Data.TileData(tileText, i);
            _tileInfos.Add(info._name, info);
            _datas.Add(info._name, info);
        }
    }
예제 #5
0
    private void HeroDBRegist()
    {
        //LowText heroText = GameMng.Table.Get(TableType.Hero);
        LowText heroText = TableMng.Instance.Get(TableType.Hero);

        for (int i = 0; i < heroText.GetCount(); i++)
        {
            Data.HeroData info = new Data.HeroData(heroText, i);
            _heroInfos.Add(info._name, info);
            _datas.Add(info._name, info);
        }
    }
예제 #6
0
    private void MonsterDBRegist()
    {
        //LowText monsterText = GameMng.Table.Get(TableType.Monster);
        LowText monsterText = TableMng.Instance.Get(TableType.Monster);


        for (int i = 0; i < monsterText.GetCount(); i++)
        {
            Data.MonsterData data = new Data.MonsterData(monsterText, i);
            _monsterInfos.Add(data._name, data);
            _datas.Add(data._name, data);
        }
    }
예제 #7
0
    private void ItemDBRegist()
    {
        LowText itemText = TableMng.Instance.Get(TableType.Item);

        //LowText itemText = GameMng.Table.Get(TableType.Item);

        for (int i = 0; i < itemText.GetCount(); i++)
        {
            Data.ItemData info = new Data.ItemData(itemText, i);
            _itemInfos.Add(info._name, info);
            _datas.Add(info._name, info);
        }
    }
예제 #8
0
    public void RegistPool()
    {
        LowText monsters = TableMng.Instance.Get(TableType.Monster);

        //LowText monsters = GameMng.Table.Get(TableType.Monster);

        monParent = new GameObject("Monsters");
        monParent.transform.SetParent(transform);

        for (int i = 0; i < monsters.GetCount(); i++)
        {
            Monster prefab = Resources.Load <Monster>(monsters.ToS(i, "PREFAB"));
            string  name   = monsters.ToS(i, "NAME");
            _monsterPools.Add(name, new TPool <Monster>(new Factory <Monster>(prefab, name, monParent.transform), 5));
        }
        LowText items = TableMng.Instance.Get(TableType.Item);

        //LowText items = GameMng.Table.Get(TableType.Item);


        itemParent = new GameObject("Items");
        itemParent.transform.SetParent(transform);

        for (int i = 0; i < items.GetCount(); i++)
        {
            Item   prefab = Resources.Load <Item>(items.ToS(i, "PREFAB"));
            string name   = items.ToS(i, "NAME");
            _itemPools.Add(name, new TPool <Item>(new Factory <Item>(prefab, name, itemParent.transform), 3));
        }
        LowText tiles = TableMng.Instance.Get(TableType.Tile);

        //LowText tiles = GameMng.Table.Get(TableType.Tile);

        tileParent = new GameObject("Tiles");
        tileParent.transform.SetParent(transform);

        for (int i = 0; i < tiles.GetCount(); i++)
        {
            Tile   prefab = Resources.Load <Tile>(tiles.ToS(i, "PREFAB"));
            string name   = tiles.ToS(i, "NAME");
            _tilesPools.Add(name, new TPool <Tile>(new Factory <Tile>(prefab, name, tileParent.transform), 1));
        }
    }