Beispiel #1
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        m_PageTitle = m_CanvasObj.GetComponentInChildren <PageTitle>();
        if (m_PageTitle != null)
        {
            m_PageTitle.Title = GameTextUtil.GetText("unit_shojititle");
            m_PageTitle.SetPositionAjustStatusBar(new Vector2(0, -152));
        }

        //ページ初期化処理
        if (m_UnitGrid == null)
        {
            //ユニットグリッド取得
            m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>();
            //サイズ設定
            m_UnitGrid.SetPositionAjustStatusBar(new Vector2(0, -25), new Vector2(-48, -295));

            m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());
        }

        updateUnitList();

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.UNIT;
    }
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        AndroidBackKeyManager.Instance.StackPush(m_CanvasObj.gameObject, OnSelectReturn);

        //--------------------------------
        //	オブジェクトの取得
        //--------------------------------
        m_PartyMemberUnitGroup = m_CanvasObj.GetComponentInChildren <PartyMemberUnitGroup>();
        m_PartyMemberUnitGroup.SetPositionAjustStatusBar(new Vector2(0, -132));
        m_PartyMemberUnitGroup.SetSizeParfect(new Vector2(0, 100));

        m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>(); //ユニットグリッド取得
        m_UnitGrid.SetPositionAjustStatusBar(new Vector2(0, -15), new Vector2(-48, -355));
        m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());

        m_ExpandWindow = m_CanvasObj.GetComponentInChildren <ExpandWindow>();
        m_ExpandWindow.SetPositionAjustStatusBar(new Vector2(0, -232));
        m_ExpandWindow.DidSelectButton = SelectWindowButton;

        m_PartyMemberStatusPanel = m_CanvasObj.GetComponentInChildren <PartyMemberStatusPanel>();

        m_UnitPartyAssignButtonPanel = m_CanvasObj.GetComponentInChildren <UnitPartyAssignButtonPanel>();

        m_SelectPartyCharaIndex = GlobalDefine.PartyCharaIndex.ERROR;
        m_IsPartyMemberChange   = false;

        //カレントパーティ設定
        m_CurrentSelectPartyIndex = UserDataAdmin.Instance.m_StructPlayer.unit_party_current;

        CreatePartyMemberUnitGroup(); // パーティメンバーの作成
        CreateUnitGrid();             // ユニットリストの作成
        CreatePatyStatusPanel();
        ChangeUnitGridMark();

        if (m_UnitPartyAssignButtonPanel != null)
        {
            m_UnitPartyAssignButtonPanel.ClickExecuteButton = OnClickDecision;
            m_UnitPartyAssignButtonPanel.ClickReturnButton  = OnSelectReturn;
        }

        m_ExpandWindow.Close(true);

        if (MainMenuParam.m_PartyAssignPrevPage == MAINMENU_SEQ.SEQ_QUEST_SELECT_PARTY)
        {
            MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.QUEST;
        }
        else
        {
            MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.UNIT;
        }
        m_IsShowChangeConfirmation   = false;
        m_IsFinishChangeConfirmation = false;
        CheckUnitSpace();
    }
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //ページ初期化処理
        if (m_UnitBGPanel == null)
        {
            m_UnitBGPanel = m_CanvasObj.GetComponentInChildren <UnitBGPanel>();
            m_UnitBGPanel.SetPositionAjustStatusBar(new Vector2(0, 40), new Vector2(0, -345));
            m_UnitBGPanel.IsViewPointEvolve  = true;
            m_UnitBGPanel.IsViewEvolve       = true;
            m_UnitBGPanel.IsViewResetButton  = false;
            m_UnitBGPanel.IsViewExecButton   = false;
            m_UnitBGPanel.IsViewReturnButton = false;
            m_UnitBGPanel.Title        = GameTextUtil.GetText("unit_function_evolve");
            m_UnitBGPanel.TotalTitle   = GameTextUtil.GetText("unit_function_point");
            m_UnitBGPanel.Evolve_arrow = GameTextUtil.GetText("unit_function_evolve_arrow");
            m_UnitBGPanel.TotalPoint   = (int)UserDataAdmin.Instance.m_StructPlayer.have_unit_point;

            m_UnitBGPanel.DidSelect                    = SelectEvolve;
            m_UnitBGPanel.DidReturn                    = SelectReturn;
            m_UnitBGPanel.DidSelectIcon                = SelectUnitIcon;
            m_UnitBGPanel.DidSelectEvolveIcon          = SelectEvolveUnitIcon;
            m_UnitBGPanel.DidSelectEvolveIconLongpress = SelectEvolveUnitIcon;
        }
        if (m_ExpandWindow == null)
        {
            m_ExpandWindow = m_CanvasObj.GetComponentInChildren <ExpandWindow>();
            m_ExpandWindow.SetPositionAjustStatusBar(new Vector2(0, -232));
            m_ExpandWindow.ViewHeightSize  = 210.0f;
            m_ExpandWindow.DidSelectButton = SelectWindowButton;
        }

        if (m_UnitStatusPanel == null)
        {
            m_UnitStatusPanel = m_CanvasObj.GetComponentInChildren <UnitStatusPanel>();
            if (m_ExpandWindow != null)
            {
                m_UnitStatusPanel.SetParent(m_ExpandWindow.Content);
            }
        }

        if (m_UnitGrid == null)
        {
            //ユニットグリッド取得
            m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>();
            //サイズ設定
            m_UnitGrid.SetPositionAjustStatusBar(new Vector2(0, -35), new Vector2(-48, -315));

            m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());
        }

        updateEvolveStatus(true);

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.UNIT;
    }
Beispiel #4
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        //ページ初期化処理
        if (m_UnitGrid == null)
        {
            //ユニットグリッド取得
            m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>();
            //サイズ設定
            m_UnitGrid.SetPosition(new Vector2(0, -90), new Vector2(-48, -360));
            //ボタン
            m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());
        }

        updateUnitList();
    }
Beispiel #5
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        if (m_UnitBGPanel == null)
        {
            m_UnitBGPanel = m_CanvasObj.GetComponentInChildren <UnitBGPanel>();
            m_UnitBGPanel.SetPositionAjustStatusBar(new Vector2(0, 40), new Vector2(0, -345));
            m_UnitBGPanel.IsViewIcon         = false;
            m_UnitBGPanel.IsViewSale         = true;
            m_UnitBGPanel.IsViewResetButton  = false;
            m_UnitBGPanel.IsViewExecButton   = true;
            m_UnitBGPanel.ExecButtonImage    = ResourceManager.Instance.Load("confirm_button");
            m_UnitBGPanel.IsViewReturnButton = false;
            m_UnitBGPanel.IsViewResetButton  = true;
            m_UnitBGPanel.Title          = GameTextUtil.GetText("unit_function_sell");
            m_UnitBGPanel.IsDetailButton = true;


            m_UnitBGPanel.SaleCountMax = MAX_SALE_UNIT_COUNT;

            m_UnitBGPanel.DidReset            = SelectReset;
            m_UnitBGPanel.DidSelect           = OpenSaleDialog;
            m_UnitBGPanel.DidReturn           = SelectReturn;
            m_UnitBGPanel.OnClickDetailAction = OnDetailWindow;
        }
        if (m_ExpandWindow == null)
        {
            m_ExpandWindow = m_CanvasObj.GetComponentInChildren <ExpandWindow>();
            m_ExpandWindow.SetPositionAjustStatusBar(new Vector2(0, -232));
            m_ExpandWindow.ViewHeightSize  = 182.0f;
            m_ExpandWindow.DidSelectButton = SelectWindowButton;
        }

        if (m_UnitSale == null)
        {
            m_UnitSale = m_CanvasObj.GetComponentInChildren <UnitSaleList>();
            for (int i = 0; i < MAX_SALE_UNIT_COUNT; i++)
            {
                m_UnitSale.addItem(i, 0);
            }

            if (m_ExpandWindow != null)
            {
                m_UnitSale.SetParent(m_ExpandWindow.Content);
            }
        }

        if (m_UnitGrid == null)
        {
            //ユニットグリッド取得
            m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>();
            //サイズ設定
            m_UnitGrid.SetPositionAjustStatusBar(new Vector2(0, -35), new Vector2(-48, -315));

            m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());
        }

        m_Validate = false;
        m_ExpandWindow.Close(true);
        m_UnitBGPanel.IsViewReturnButton = false;
        m_UnitBGPanel.IsViewPanel        = false;
        m_UnitBGPanel.ExecButtonImage    = ResourceManager.Instance.Load("confirm_button");
        m_UnitBGPanel.IsActiveExecButton = false;
        m_UnitGrid.IsActiveSortButton    = true;

        //
        resetSaleUnit();

        //ユニット情報構築
        updateUnitList();

        //
        SetupSaleStatusValue();

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.UNIT;
    }