예제 #1
0
 private void OnDestroy()
 {
     mCommonShipBanner      = null;
     mCommonShipSupplyState = null;
     UserInterfacePortManager.ReleaseUtils.Release(ref mLabel_ShipPosition);
     UserInterfacePortManager.ReleaseUtils.Release(ref mPanelThis);
 }
예제 #2
0
        private int CountBannersInTexture(CommonShipBanner[] banners, Texture countTargetTexture)
        {
            int num = 0;

            if (countTargetTexture == null)
            {
                return(num);
            }
            for (int i = 0; i < banners.Length; i++)
            {
                CommonShipBanner commonShipBanner = banners[i];
                if (!(commonShipBanner == null))
                {
                    Texture mainTexture = commonShipBanner.GetUITexture().mainTexture;
                    if (!(mainTexture == null))
                    {
                        bool flag = countTargetTexture.GetNativeTexturePtr() == mainTexture.GetNativeTexturePtr();
                        if (flag)
                        {
                            num++;
                        }
                    }
                }
            }
            return(num);
        }
예제 #3
0
        public void _init_repair()
        {
            rep              = GameObject.Find("Repair Root").GetComponent <repair>();
            csb              = GameObject.Find("dialog_top/dialog/Banner/CommonShipBanner2").GetComponent <CommonShipBanner>();
            bd3              = GameObject.Find("board3_top/board3").GetComponent <board3>();
            _Button_Yes      = GameObject.Find("dialog_top/dialog/btn_yes").GetComponent <UIButton>();
            _Button_No       = GameObject.Find("dialog_top/dialog/btn_no").GetComponent <UIButton>();
            btn_obj[0]       = _Button_No.gameObject;
            btn_obj[1]       = _Button_Yes.gameObject;
            _uiOverlayButton = GameObject.Find("dialog_top/dialog/OverlayBtn").GetComponent <UIButton>();
            EventDelegate.Add(_uiOverlayButton.onClick, _onClickOverlayButton);
            UIButtonMessage component = _Button_Yes.GetComponent <UIButtonMessage>();

            component.target       = base.gameObject;
            component.functionName = "Pressed_Button_Yes";
            component.trigger      = UIButtonMessage.Trigger.OnClick;
            UIButtonMessage component2 = _Button_No.GetComponent <UIButtonMessage>();

            component2.target       = base.gameObject;
            component2.functionName = "Pressed_Button_No";
            component2.trigger      = UIButtonMessage.Trigger.OnClick;
            _clsRepair                       = rep.now_clsRepair();
            dockSelectController             = new KeyControl(0, 1);
            dockSelectController.isLoopIndex = false;
            dockSelectController.setChangeValue(0f, 1f, 0f, -1f);
            sw = GameObject.Find("sw01").GetComponent <sw>();
            sw.setSW(stat: false);
            _bVector = Vector3.one;
        }
        public void _init_repair()
        {
            this.rep              = GameObject.Find("Repair Root").GetComponent <repair>();
            this.csb              = GameObject.Find("dialog_top/dialog/Banner/CommonShipBanner2").GetComponent <CommonShipBanner>();
            this.bd3              = GameObject.Find("board3_top/board3").GetComponent <board3>();
            this._Button_Yes      = GameObject.Find("dialog_top/dialog/btn_yes").GetComponent <UIButton>();
            this._Button_No       = GameObject.Find("dialog_top/dialog/btn_no").GetComponent <UIButton>();
            this.btn_obj[0]       = this._Button_No.get_gameObject();
            this.btn_obj[1]       = this._Button_Yes.get_gameObject();
            this._uiOverlayButton = GameObject.Find("dialog_top/dialog/OverlayBtn").GetComponent <UIButton>();
            EventDelegate.Add(this._uiOverlayButton.onClick, new EventDelegate.Callback(this._onClickOverlayButton));
            UIButtonMessage component = this._Button_Yes.GetComponent <UIButtonMessage>();

            component.target       = base.get_gameObject();
            component.functionName = "Pressed_Button_Yes";
            component.trigger      = UIButtonMessage.Trigger.OnClick;
            UIButtonMessage component2 = this._Button_No.GetComponent <UIButtonMessage>();

            component2.target                     = base.get_gameObject();
            component2.functionName               = "Pressed_Button_No";
            component2.trigger                    = UIButtonMessage.Trigger.OnClick;
            this._clsRepair                       = this.rep.now_clsRepair();
            this.dockSelectController             = new KeyControl(0, 1, 0.4f, 0.1f);
            this.dockSelectController.isLoopIndex = false;
            this.dockSelectController.setChangeValue(0f, 1f, 0f, -1f);
            this.sw = GameObject.Find("sw01").GetComponent <sw>();
            this.sw.setSW(false);
            this._bVector = Vector3.get_one();
        }
예제 #5
0
        public void _init_repair()
        {
            _isBtnMaruUp                     = false;
            rep                              = GameObject.Find("Repair Root").GetComponent <repair>();
            bd1                              = GameObject.Find("board1_top/board").GetComponent <board>();
            bd2                              = GameObject.Find("board2").GetComponent <board2>();
            csb                              = GameObject.Find("dialog2_top/dialog2/Banner/CommonShipBanner2").GetComponent <CommonShipBanner>();
            dockSelectController             = new KeyControl(0, 1);
            dockSelectController.isLoopIndex = false;
            dockSelectController.setChangeValue(0f, 1f, 0f, -1f);
            iTween.ScaleTo(base.gameObject, new Vector3(0.6f, 0.6f, 0.6f), 0f);
            _Button_Yes2      = GameObject.Find("dialog2_top/dialog2/btn_yes").GetComponent <UIButton>();
            _Button_No2       = GameObject.Find("dialog2_top/dialog2/btn_no").GetComponent <UIButton>();
            btn_obj[0]        = _Button_No2.gameObject;
            btn_obj[1]        = _Button_Yes2.gameObject;
            _uiOverlayButton2 = GameObject.Find("dialog2_top/dialog2/OverlayBtn2").GetComponent <UIButton>();
            EventDelegate.Add(_uiOverlayButton2.onClick, _onClickOverlayButton2);
            UIButtonMessage component = _Button_Yes2.GetComponent <UIButtonMessage>();

            component.target       = base.gameObject;
            component.functionName = "Pressed_Button_Yes2";
            component.trigger      = UIButtonMessage.Trigger.OnClick;
            UIButtonMessage component2 = _Button_No2.GetComponent <UIButtonMessage>();

            component2.target       = base.gameObject;
            component2.functionName = "Pressed_Button_No2";
            component2.trigger      = UIButtonMessage.Trigger.OnClick;
            Set_Button_Sprite(value: true);
            _clickmask = GameObject.Find("click_mask").GetComponent <repair_clickmask>();
            _bVector   = Vector3.one;
        }
 private void OnDestroy()
 {
     this.mLabel_DeckInNumber    = null;
     this.mLabel_ShipName        = null;
     this.mSprites_RemodelLevel  = null;
     this.mLabel_ShipLevel       = null;
     this.mCommonShipBanner_Ship = null;
     this.mShipModel             = null;
     this.mWidgetThis            = null;
 }
예제 #7
0
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodeModernizationShipTargetListChildNew[] mViews = base.mViews;
            foreach (UIRemodeModernizationShipTargetListChildNew uIRemodeModernizationShipTargetListChildNew in mViews)
            {
                CommonShipBanner shipBanner = uIRemodeModernizationShipTargetListChildNew.GetShipBanner();
                list.Add(shipBanner);
            }
            return(list.ToArray());
        }
예제 #8
0
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodelModernizationStartConfirmSlot[] array = mUIRemodelModernizationStartConfirmSlots;
            foreach (UIRemodelModernizationStartConfirmSlot uIRemodelModernizationStartConfirmSlot in array)
            {
                CommonShipBanner shipBanner = uIRemodelModernizationStartConfirmSlot.GetShipBanner();
                list.Add(shipBanner);
            }
            return(list.ToArray());
        }
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodelOtherShipPickerChildNew[] mViews = base.mViews;
            foreach (UIRemodelOtherShipPickerChildNew uIRemodelOtherShipPickerChildNew in mViews)
            {
                CommonShipBanner banner = uIRemodelOtherShipPickerChildNew.GetBanner();
                list.Add(banner);
            }
            return(list.ToArray());
        }
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodeModernzationTargetShip[] array = mUIRemodeModernzationTargetShip_TargetShips;
            foreach (UIRemodeModernzationTargetShip uIRemodeModernzationTargetShip in array)
            {
                CommonShipBanner banner = uIRemodeModernzationTargetShip.GetBanner();
                list.Add(banner);
            }
            return(list.ToArray());
        }
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodeModernizationShipTargetListChildNew[] mViews = this.mViews;
            for (int i = 0; i < mViews.Length; i++)
            {
                UIRemodeModernizationShipTargetListChildNew uIRemodeModernizationShipTargetListChildNew = mViews[i];
                CommonShipBanner shipBanner = uIRemodeModernizationShipTargetListChildNew.GetShipBanner();
                list.Add(shipBanner);
            }
            return(list.ToArray());
        }
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodelOtherShipPickerChildNew[] mViews = this.mViews;
            for (int i = 0; i < mViews.Length; i++)
            {
                UIRemodelOtherShipPickerChildNew uIRemodelOtherShipPickerChildNew = mViews[i];
                CommonShipBanner banner = uIRemodelOtherShipPickerChildNew.GetBanner();
                list.Add(banner);
            }
            return(list.ToArray());
        }
 public void OnFinishParticle()
 {
     CommonShipBanner[] array = this.mShipBannerSlots;
     for (int i = 0; i < array.Length; i++)
     {
         CommonShipBanner commonShipBanner = array[i];
         if (commonShipBanner.get_gameObject().get_activeSelf())
         {
             Debug.Log("KiraParLoop::False");
             commonShipBanner.StopParticle();
         }
     }
 }
        public CommonShipBanner[] GetBanner()
        {
            List <CommonShipBanner> list = new List <CommonShipBanner>();

            UIRemodeModernzationTargetShip[] array = this.mUIRemodeModernzationTargetShip_TargetShips;
            for (int i = 0; i < array.Length; i++)
            {
                UIRemodeModernzationTargetShip uIRemodeModernzationTargetShip = array[i];
                CommonShipBanner banner = uIRemodeModernzationTargetShip.GetBanner();
                list.Add(banner);
            }
            return(list.ToArray());
        }
 internal void Release()
 {
     mCommonShipBanner = null;
     if (mLabel_Level != null)
     {
         mLabel_Level.RemoveFromPanel();
     }
     mLabel_Level = null;
     if (mWidgetThis != null)
     {
         mWidgetThis.RemoveFromPanel();
     }
     mWidgetThis    = null;
     mBaitShipModel = null;
 }
 private void OnDestroy()
 {
     if (DOTween.IsTweening(this))
     {
         DOTween.Kill(this);
     }
     mWidget_Banner    = null;
     mWidget_Status    = null;
     mCommonShipBanner = null;
     mLabel_Level      = null;
     mTexture_GaugeExp = null;
     mTexture_LevelUp  = null;
     mShipModel        = null;
     mShipExpModel     = null;
 }
예제 #17
0
        private void OnDestroy()
        {
            bool flag = DOTween.IsTweening(this);

            if (flag)
            {
                DOTween.Kill(this, false);
            }
            this.mWidget_Banner    = null;
            this.mWidget_Status    = null;
            this.mCommonShipBanner = null;
            this.mLabel_Level      = null;
            this.mTexture_GaugeExp = null;
            this.mTexture_LevelUp  = null;
            this.mShipModel        = null;
            this.mShipExpModel     = null;
        }
 private void OnDestroy()
 {
     if (DOTween.IsTweening(this))
     {
         DOTween.Kill(this, false);
     }
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.shipName);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.shipLevel);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref this.CommonShipBanner, true);
     this.stars                 = null;
     this.CommonShipBanner      = null;
     this.mTransform_Background = null;
     this.mShipModel            = null;
     this.mTransformCache       = null;
     this.mOnTouchListener      = null;
 }
 private void OnDestroy()
 {
     if (DOTween.IsTweening(this))
     {
         DOTween.Kill(this);
     }
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref shipName);
     UserInterfacePortManager.ReleaseUtils.Release(ref shipLevel);
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref mWidgetThis);
     UserInterfacePortManager.ReleaseUtils.Release(ref CommonShipBanner, unloadAsset: true);
     stars                 = null;
     CommonShipBanner      = null;
     mTransform_Background = null;
     mShipModel            = null;
     mTransformCache       = null;
     mOnTouchListener      = null;
 }
 internal void Release()
 {
     this.mUIRemodeModernzationTargetShipAction = null;
     this.mCommonShipBanner = null;
     this.mTransformLEVEL   = null;
     this.mLabel_Level      = null;
     this.mLabel_Name       = null;
     this.mSprite_Karyoku.RemoveFromPanel();
     this.mSprite_Karyoku = null;
     this.mSprite_Raisou.RemoveFromPanel();
     this.mSprite_Raisou = null;
     this.mSprite_Soukou.RemoveFromPanel();
     this.mSprite_Soukou = null;
     this.mSprite_Taikuu.RemoveFromPanel();
     this.mSprite_Taikuu = null;
     this.mSprite_Luck.RemoveFromPanel();
     this.mSprite_Luck = null;
     this.mSprite_Add.RemoveFromPanel();
     this.mSprite_Add = null;
     this.mButton_Action.Release();
     this.mButton_Action = null;
     this.mShipModel     = null;
 }
 internal static void Release(ref CommonShipBanner commonShipBanner, bool unloadAsset = false)
 {
     commonShipBanner.ReleaseShipBannerTexture(unloadAsset);
 }
    public void Initialize(DeckModel deck)
    {
        this.mDeckModel = deck;
        ShipModel[] ships = this.mDeckModel.GetShips();
        UITexture[] array = this.mTextures_Flag;
        for (int i = 0; i < array.Length; i++)
        {
            UITexture component = array[i];
            component.SetActive(false);
        }
        CommonShipBanner[] array2 = this.mShipBannerSlots;
        for (int j = 0; j < array2.Length; j++)
        {
            CommonShipBanner commonShipBanner = array2[j];
            commonShipBanner.StopParticle();
        }
        switch (ships.Length)
        {
        case 1:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[0]);
            this.mTextures_Flag[0].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[0].SetActive(true);
            break;

        case 2:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[5].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[0]);
            this.mShipBannerSlots[5].SetShipData(ships[1]);
            this.mTextures_Flag[0].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[0].SetActive(true);
            break;

        case 3:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[1].get_gameObject().SetActive(true);
            this.mShipBannerSlots[5].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[2]);
            this.mShipBannerSlots[1].SetShipData(ships[0]);
            this.mShipBannerSlots[5].SetShipData(ships[1]);
            this.mTextures_Flag[1].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[1].SetActive(true);
            break;

        case 4:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[1].get_gameObject().SetActive(true);
            this.mShipBannerSlots[4].get_gameObject().SetActive(true);
            this.mShipBannerSlots[5].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[2]);
            this.mShipBannerSlots[1].SetShipData(ships[0]);
            this.mShipBannerSlots[4].SetShipData(ships[1]);
            this.mShipBannerSlots[5].SetShipData(ships[3]);
            this.mTextures_Flag[1].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[1].SetActive(true);
            break;

        case 5:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[1].get_gameObject().SetActive(true);
            this.mShipBannerSlots[2].get_gameObject().SetActive(true);
            this.mShipBannerSlots[4].get_gameObject().SetActive(true);
            this.mShipBannerSlots[5].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[2]);
            this.mShipBannerSlots[1].SetShipData(ships[0]);
            this.mShipBannerSlots[2].SetShipData(ships[4]);
            this.mShipBannerSlots[4].SetShipData(ships[1]);
            this.mShipBannerSlots[5].SetShipData(ships[3]);
            this.mTextures_Flag[1].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[1].SetActive(true);
            break;

        case 6:
            this.mShipBannerSlots[0].get_gameObject().SetActive(true);
            this.mShipBannerSlots[1].get_gameObject().SetActive(true);
            this.mShipBannerSlots[2].get_gameObject().SetActive(true);
            this.mShipBannerSlots[3].get_gameObject().SetActive(true);
            this.mShipBannerSlots[4].get_gameObject().SetActive(true);
            this.mShipBannerSlots[5].get_gameObject().SetActive(true);
            this.mShipBannerSlots[0].SetShipData(ships[2]);
            this.mShipBannerSlots[1].SetShipData(ships[0]);
            this.mShipBannerSlots[2].SetShipData(ships[4]);
            this.mShipBannerSlots[3].SetShipData(ships[5]);
            this.mShipBannerSlots[4].SetShipData(ships[1]);
            this.mShipBannerSlots[5].SetShipData(ships[3]);
            this.mTextures_Flag[1].mainTexture = Resources.Load <Texture>("Textures/Common/DeckFlag/icon_deck" + deck.Id + "_fs");
            this.mTextures_Flag[1].SetActive(true);
            break;
        }
    }
        public void UpdateInfo(ShipModel shipz)
        {
            this._ShipModel = shipz;
            bool material = false;

            this.mcy      = 0;
            this.dig      = GameObject.Find("dialog_top/dialog/").GetComponent <dialog>();
            this.sw       = GameObject.Find("board3/sw01").GetComponent <sw>();
            this.uibutton = GameObject.Find("Repair Root/board3_top/board3/Button").GetComponent <UIButton>();
            bool flag;

            if (flag = this.rep.now_clsRepair().IsValidStartRepair(this._ShipModel.MemId))
            {
                this.uibutton.isEnabled = true;
                this.nyukyo             = true;
                this.sw.set_sw_stat(true);
            }
            else
            {
                this.uibutton.isEnabled = false;
                this.nyukyo             = false;
                this.sw.setSW(false);
                this.sw.set_sw_stat(false);
            }
            this.ele_l      = GameObject.Find("board3/param/shipname").GetComponent <UILabel>();
            this.ele_l.text = this._ShipModel.Name;
            this.csb        = GameObject.Find("board3/Banner/CommonShipBanner2").GetComponent <CommonShipBanner>();
            this.csb.SetShipData(this._ShipModel);
            this.ele_l       = GameObject.Find("board3/param/Label_hp").GetComponent <UILabel>();
            this.ele_l.text  = this._ShipModel.NowHp + "/" + this._ShipModel.MaxHp;
            this.ele_d       = GameObject.Find("board3/param/HP_bar_grn").GetComponent <UISprite>();
            this.ele_d.width = (int)((float)this._ShipModel.NowHp * 210f / (float)this._ShipModel.MaxHp);
            this.ele_d.color = Util.HpGaugeColor2(this._ShipModel.MaxHp, this._ShipModel.NowHp);
            GameObject.Find("board3/param/icon_stars").GetComponent <UISprite>().SetDimensions((this._ShipModel.Srate + 1) * 25 - 2, 20);
            this.ele_l      = GameObject.Find("board3/param/Label_lv").GetComponent <UILabel>();
            this.ele_l.text = string.Empty + this._ShipModel.Level;
            this.ele_l      = GameObject.Find("board3/param/Label_param").GetComponent <UILabel>();
            this.sw         = GameObject.Find("board3/sw01").GetComponent <sw>();
            string text = string.Empty;

            if (this._clsRepair.Material.Steel < this._ShipModel.GetResourcesForRepair().Steel)
            {
                text    += "[e32c2c]";
                material = true;
            }
            else
            {
                text += "[404040]";
            }
            text = text + this._ShipModel.GetResourcesForRepair().Steel + "[-]\n";
            if (this._clsRepair.Material.Fuel < this._ShipModel.GetResourcesForRepair().Fuel)
            {
                text    += "[e32c2c]";
                material = true;
            }
            else
            {
                text += "[404040]";
            }
            if (flag)
            {
                this.dia.UpdateInfo(this._ShipModel);
                this.dia.SetShip(this._ShipModel);
            }
            else
            {
                base.StartCoroutine(this.ReasonMessage(this._ShipModel, material));
            }
            this.dia = GameObject.Find("dialog_top/dialog").GetComponent <dialog>();
            text     = text + this._ShipModel.GetResourcesForRepair().Fuel + "[-]\n";
            string text2 = text;

            text = string.Concat(new object[]
            {
                text2,
                "[404040]",
                this._ShipModel.RepairTime,
                "[-]  "
            });
            this.ele_l.text = text;
        }