Пример #1
0
        public void high_repair_anime(int dockno, bool _low_anime)
        {
            int      num       = dockno;
            UIButton component = GameObject.Find("board/Grid/0" + num.ToString() + "/repair_now/btn_high_repair").GetComponent <UIButton>();

            component.isEnabled = false;
            if (_low_anime)
            {
                Debug.Log("Crane:" + dockno + "を退場させます。");
                _AM.Stop();
                iTween.MoveTo(CraneNormal[dockno].gameObject, iTween.Hash("islocal", true, "x", 520f, "time", 5f));
            }
            bd1.set_anime(dockno, stat: true);
            bd1.set_HS_anime(dockno, stat: true);
            int    num2 = dockno;
            string text = "board/Grid/0" + num2.ToString() + "/Anime_H";

            _AMH = GameObject.Find(text).GetComponent <Animation>();
            _AMH.Play();
            int num3 = dockno;

            GameObject.Find("board/Grid/0" + num3.ToString() + "/Anime_H/crane1").GetComponent <UIPanel>().enabled = true;
            int num4 = dockno;

            text      = "board/Grid/0" + num4.ToString() + "/repair_now/HP_Gauge";
            _AMG      = GameObject.Find(text).GetComponent <Animation>();
            gdock     = dockno;
            _isHPgrow = true;
            _HPG      = GameObject.Find(text + "/panel/HP_bar_meter2").GetComponent <UISprite>();
            iTween.ValueTo(base.gameObject, iTween.Hash("from", _HPG.width, "to", 210, "time", 0.75f, "delay", 2.8f, "onupdate", "UpdateHandler"));
        }
Пример #2
0
 public void _init_repair()
 {
     bd1 = GameObject.Find("board1_top/board").GetComponent <board>();
     bd2 = GameObject.Find("board2_top/board2").GetComponent <board2>();
     rep = GameObject.Find("Repair Root").GetComponent <repair>();
     for (int i = 0; i < 4; i++)
     {
         bd1.set_anime(i, stat: false);
         bd1.set_HS_anime(i, stat: false);
     }
     now_repairs = 0;
     _isHPgrow   = false;
 }
Пример #3
0
 public void Pressed_Button_Yes2(GameObject obj)
 {
     rep.set_mode(-1);
     SoundUtils.PlaySE(SEFIleInfos.CommonEnter2);
     _clickmask.unclickable_onesec();
     _isBtnMaruUp = false;
     Set_Button_Sprite(value: false);
     dockSelectController.Index = 0;
     shipid = GetShipID();
     dialog2_appear(bstat: false);
     b3 = GameObject.Find("board3").GetComponent <board3>();
     b3.board3_appear(bstat: false, isSirent: true);
     b2 = GameObject.Find("board2").GetComponent <board2>();
     b2.board2_appear(boardStart: false, isSirent: true);
     rep.all_rid_mask();
     bd1.set_HS_anime(selected_dock, stat: true);
     rep.now_clsRepair().ChangeRepairSpeed(selected_dock);
     rep.tochu_go(selected_dock, sm);
     rep.set_mode(1);
 }
Пример #4
0
 public void board2_appear(bool boardStart, bool isSirent)
 {
     if (boardStart)
     {
         base.gameObject.isStatic = false;
         base.gameObject.GetComponent <UIPanel>().enabled = true;
         SortButton.SetActive(isActive: true);
         rep_p.Initialize(ships);
         for (int i = 0; i < 4; i++)
         {
             if (bd.get_HS_anime(i))
             {
                 rep.now_clsRepair().ChangeRepairSpeed(i);
                 bd.set_anime(i, stat: false);
                 bd.set_HS_anime(i, stat: false);
             }
         }
         set_board2_anime(value: true);
         TweenPosition tweenPosition = TweenPosition.Begin(base.gameObject, 0.35f, new Vector3(162f, 123f, -1f));
         tweenPosition.animationCurve = UtilCurves.TweenEaseOutExpo;
         tweenPosition.SetOnFinished(CompleteHandler);
         rep.set_mode(-2);
         rep.setmask(1, value: true);
         rep.set_mode(2);
     }
     else
     {
         set_board2_anime(value: true);
         TweenPosition tweenPosition2 = TweenPosition.Begin(base.gameObject, 0.3f, new Vector3(840f, 123f, -1f));
         tweenPosition2.animationCurve = UtilCurves.TweenEaseOutExpo;
         tweenPosition2.SetOnFinished(CompleteHandlerStaticOn);
         rep.setmask(1, value: false);
         rep.set_mode(1);
     }
     if (!isSirent)
     {
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter1);
     }
 }
Пример #5
0
        public void nyukyogo(int dock, ShipModel ship, bool _isRepairKit)
        {
            Debug.Log("入渠します Dock:" + dock + " MemId:" + ship.MemId + " 高速:" + _isRepairKit + " 耐久度率:" + ship.TaikyuRate);
            if (_isRepairKit)
            {
                StartCoroutine(WaitAndSpeak(ship, 26, 1.5f));
            }
            else if (ship.TaikyuRate >= 50.0)
            {
                StartCoroutine(WaitAndSpeak(ship, 11, 1.5f));
            }
            else
            {
                StartCoroutine(WaitAndSpeak(ship, 12, 1.5f));
            }
            _clsRepair.StartRepair(dock, ship.MemId, _isRepairKit);
            GameObject gameObject = GameObject.Find("board1_top/board/Grid/0" + dock.ToString());

            if (_isRepairKit)
            {
                bd1.set_HS_anime(dock, stat: true);
                GameObject.Find("board1_top/board").GetComponent <board>().set_rnow_enable(dock, a: true);
                GameObject.Find("board1_top/board").GetComponent <board>().set_stk_enable(dock, a: false);
                dg = GameObject.Find("dialog").GetComponent <dialog>();
                int num = dock;
                tex = GameObject.Find("board/Grid/0" + num.ToString() + "/repair_now/ship_banner").GetComponent <UITexture>();
                if (ship.DamageStatus == DamageState.Taiha)
                {
                    tex.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(ship.MstId, 2);
                }
                else if (ship.DamageStatus == DamageState.Tyuuha)
                {
                    tex.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(ship.MstId, 2);
                }
                else
                {
                    tex.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(ship.MstId, 1);
                }
                int num2 = dock;
                lab      = GameObject.Find("board/Grid/0" + num2.ToString() + "/repair_now/text_ship_name").GetComponent <UILabel>();
                lab.text = ship.Name;
                int num3 = dock;
                lab      = GameObject.Find("board/Grid/0" + num3.ToString() + "/repair_now/text_level").GetComponent <UILabel>();
                lab.text = string.Empty + ship.Level;
                int num4 = dock;
                lab      = GameObject.Find("board/Grid/0" + num4.ToString() + "/repair_now/text_hp").GetComponent <UILabel>();
                lab.text = dg.GetBeforeHp() + "/" + ship.MaxHp;
                bd1.set_dock_MaxHP(dock, ship.MaxHp);
                int num5 = dock;
                sprite       = GameObject.Find("board/Grid/0" + num5.ToString() + "/repair_now/HP_Gauge/panel/HP_bar_meter").GetComponent <UISprite>();
                sprite.width = (int)((float)dg.GetBeforeHp() * 210f / (float)ship.MaxHp);
                sprite.color = Util.HpGaugeColor2(ship.MaxHp, dg.GetBeforeHp());
                int num6 = dock;
                sprite       = GameObject.Find("board/Grid/0" + num6.ToString() + "/repair_now/HP_Gauge/panel/HP_bar_meter2").GetComponent <UISprite>();
                sprite.width = (int)((float)dg.GetBeforeHp() * 210f / (float)ship.MaxHp);
                sprite.color = Util.HpGaugeColor2(ship.MaxHp, dg.GetBeforeHp());
                int num7 = dock;
                lab      = GameObject.Find("board/Grid/0" + num7.ToString() + "/repair_now/text_least_time").GetComponent <UILabel>();
                lab.text = string.Empty + ship.RepairTime;
                int num8 = dock;
                GameObject.Find("board/Grid/0" + num8.ToString() + "/repair_now/btn_high_repair").GetComponent <UIButton>().isEnabled = false;
                crane_anime component = GameObject.Find("board/Grid/0" + dock.ToString() + "/Anime").GetComponent <crane_anime>();
                component.high_repair_anime(dock, _low_anime: false);
            }
            else
            {
                iTween.MoveTo(gameObject.gameObject, iTween.Hash("islocal", true, "x", 1000f, "time", 0.1f));
            }
            bd2.UpdateList();
            update_portframe();
            SingletonMonoBehaviour <UIPortFrame> .Instance.UpdateHeaderInfo(_clsRepair);
        }