Ejemplo n.º 1
0
    public void UpdateUI(Model_UnitGroup unitGroup, BattleFormationPanel battlePanel)
    {
        model_UnitGroup      = unitGroup;
        battleFormationPanel = battlePanel;

        // 更新阵型数据
        if (!unitGroup.isEmpty)
        {
            InitSlotItemUI();
        }
    }
Ejemplo n.º 2
0
    public void Init(BattleFormationPanel battlePanel)
    {
        _formationHeroCategory = new UIHeroCategory(InstancePlayer.instance.model_User.model_heroGroup.heroesMap);

        _battleFormationPanel = battlePanel;

        GameObject container = UIHelper.FindChildInObject(gameObject, "HeroContainer");

        _scrollView = UIHelper.FindChildInObject(container, "hero_scView_0").GetComponent <UIScrollView>();
        _grid       = UIHelper.FindChildInObject(container, "ui_grid").GetComponent <UIGrid> ();

        dragDropRoot = _battleFormationPanel.dragDropRoot;
    }