Example #1
0
 public void setSW(bool stat, bool isSlow)
 {
     if (!sw_enable || stat == sw_stat)
     {
         return;
     }
     if (stat)
     {
         _Ani.Play("mini_up");
         GameObject.Find("sw_mini/switch_ball").GetComponent <UISprite>().spriteName = "switch_on_pin";
         GameObject.Find("sw_mini/switch_use").GetComponent <UISprite>().spriteName  = "switch_m_on";
         _zzz.GetComponent <ParticleSystem>().Stop();
         _zzz.SetActive(false);
         sw_stat = true;
     }
     else
     {
         if (isSlow)
         {
             _Ani.Play("mini_down");
         }
         else
         {
             _Ani.Play("mini_down");
         }
         GameObject.Find("sw_mini/switch_ball").GetComponent <UISprite>().spriteName = "switch_off_pin";
         GameObject.Find("sw_mini/switch_use").GetComponent <UISprite>().spriteName  = "switch_m_off";
         _zzz.GetComponent <ParticleSystem>().Play();
         _zzz.SetActive(true);
         sw_stat = false;
     }
     dia = GameObject.Find("dialog").GetComponent <dialog>();
     dia.UpdateSW(sw_stat);
     dia.SetSpeed(sw_stat);
 }
Example #2
0
 public void togggleSW(bool value)
 {
     if (_zzz == null)
     {
         _zzz = GameObject.Find("SleepPar");
     }
     if (!sw_enable)
     {
         SoundUtils.PlaySE(SEFIleInfos.CommonWrong);
         return;
     }
     if (!sw_stat)
     {
         _Ani.Play("mini_up");
         GameObject.Find("sw_mini/switch_ball").GetComponent <UISprite>().spriteName = "switch_on_pin";
         GameObject.Find("sw_mini/switch_use").GetComponent <UISprite>().spriteName  = "switch_m_on";
         _zzz.GetComponent <ParticleSystem>().Stop();
         _zzz.transform.localScale = Vector3.zero;
         sw_stat = true;
     }
     else
     {
         _Ani.Play("mini_down");
         GameObject.Find("sw_mini/switch_ball").GetComponent <UISprite>().spriteName = "switch_off_pin";
         GameObject.Find("sw_mini/switch_use").GetComponent <UISprite>().spriteName  = "switch_m_off";
         _zzz.GetComponent <ParticleSystem>().Play();
         _zzz.transform.localScale = Vector3.one;
         sw_stat = false;
     }
     dia = GameObject.Find("dialog").GetComponent <dialog>();
     dia.UpdateSW(sw_stat);
     dia.SetSpeed(sw_stat);
     SoundUtils.PlaySE(SEFIleInfos.MainMenuOnClick);
 }
Example #3
0
        private void _all_init()
        {
            board           component   = base.get_transform().FindChild("board1_top/board").GetComponent <board>();
            board2          component2  = base.get_transform().FindChild("board2_top/board2").GetComponent <board2>();
            board3          component3  = base.get_transform().FindChild("board3_top/board3").GetComponent <board3>();
            board3_btn      component4  = base.get_transform().FindChild("board3_top/board3/Button").GetComponent <board3_btn>();
            board1_top_mask component5  = base.get_transform().FindChild("board1_top_mask").GetComponent <board1_top_mask>();
            board2_top_mask component6  = base.get_transform().FindChild("board2_top_mask").GetComponent <board2_top_mask>();
            board3_top_mask component7  = base.get_transform().FindChild("board3_top_mask").GetComponent <board3_top_mask>();
            crane_anime     component8  = base.get_transform().FindChild("board1_top/board/Grid/01/Anime").GetComponent <crane_anime>();
            dialog          component9  = base.get_transform().FindChild("dialog_top/dialog").GetComponent <dialog>();
            dialog2         component10 = base.get_transform().FindChild("dialog2_top/dialog2").GetComponent <dialog2>();
            high_repair     component11 = base.get_transform().FindChild("board1_top/board/Grid/00/repair_now/btn_high_repair").GetComponent <high_repair>();
            sentaku         component12 = base.get_transform().FindChild("board1_top/board/Grid/00/btn_Sentaku").GetComponent <sentaku>();
            sw component13 = base.get_transform().FindChild("board3_top/board3/sw01").GetComponent <sw>();

            component._init_repair();
            component2._init_repair();
            component3._init_repair();
            component5._init_repair();
            component6._init_repair();
            component7._init_repair();
            component4._init_repair();
            component8._init_repair();
            component9._init_repair();
            component10._init_repair();
            component11._init_repair();
            component12._init_repair();
            component.ResetMaruKey();
            GameObject.Find("Repair Root/debug").get_transform().localPositionY(-120f);
        }
Example #4
0
 public void _init_repair()
 {
     rep  = GameObject.Find("Repair Root").GetComponent <repair>();
     bd1  = GameObject.Find("board").GetComponent <board>();
     bd2  = GameObject.Find("board2").GetComponent <board2>();
     dia  = GameObject.Find("dialog_top/dialog").GetComponent <dialog>();
     dia2 = GameObject.Find("dialog2_top/dialog2").GetComponent <dialog2>();
 }
Example #5
0
 public void _init_repair()
 {
     rep         = GameObject.Find("Repair Root").GetComponent <repair>();
     board_mask2 = GameObject.Find("Repair Root/board2_top_mask");
     bd3         = GameObject.Find("board3").GetComponent <board3>();
     board_mask2.GetComponent <UIPanel>().depth = 132;
     dia = GameObject.Find("dialog_top/dialog").GetComponent <dialog>();
 }
 public void StartUp()
 {
     this.rep                  = base.get_gameObject().get_transform().get_parent().get_parent().GetComponent <repair>();
     this.bd3b                 = this.rep.get_gameObject().get_transform().FindChild("board3_top/board3/Button").GetComponent <board3_btn>();
     this.bd3                  = this.rep.get_gameObject().get_transform().FindChild("board3_top/board3").GetComponent <board3>();
     this.dia                  = GameObject.Find("dialog_top/dialog").GetComponent <dialog>();
     this.btn_obj[0]           = GameObject.Find("switch_ball");
     this.btn_obj[1]           = this.bd3b.get_gameObject();
     this.dockSelectController = new KeyControl(0, 1, 0.4f, 0.1f);
     this.dockSelectController.setChangeValue(-1f, 0f, 1f, 0f);
     this.nyukyo     = false;
     this._clsRepair = this.rep.now_clsRepair();
 }
Example #7
0
        public void StartUP()
        {
            this.rep = GameObject.Find("Repair Root").GetComponent <repair>();
            this.rep.set_mode(-1);
            if (this._isStartUpDone)
            {
                return;
            }
            this._isStartUpDone = true;
            this.bd2            = this.rep.get_transform().FindChild("board2_top/board2").GetComponent <board2>();
            this.bd3            = this.rep.get_transform().FindChild("board3_top/board3").GetComponent <board3>();
            this.dia            = GameObject.Find("dialog").GetComponent <dialog>();
            this.dia2           = GameObject.Find("dialog2").GetComponent <dialog2>();
            this.dia3           = GameObject.Find("dialog3").GetComponent <dialog3>();
            for (int i = 0; i < 4; i++)
            {
                GameObject[] arg_DE_0 = this.shutter;
                int          arg_DE_1 = i;
                string       arg_D4_0 = "board1_top/board/Grid/0";
                int          num      = i;
                arg_DE_0[arg_DE_1] = GameObject.Find(arg_D4_0 + num.ToString() + "/Shutter");
            }
            this._clsRepair = this.rep.now_clsRepair();
            this.now_kit    = this._clsRepair.Material.RepairKit;
            this._ANI       = this.rep.get_transform().FindChild("info").GetComponent <Animation>();
            int num2 = this._clsRepair.MapArea.NDockCount;

            if (num2 == this._clsRepair.MapArea.NDockMax)
            {
                num2--;
            }
            this.dockSelectController = new KeyControl(0, num2, 0.4f, 0.1f);
            this.dock_flag_init();
            this.dockSelectController.setChangeValue(-1f, 0f, 1f, 0f);
            this.dockSelectController.isLoopIndex = false;
            this._first_key     = false;
            this._go_kosoku     = 0;
            this._go_kosoku_m   = -1;
            this._select_dock   = 0;
            this._select_dock_m = -1;
            this._dock_exist    = false;
            this.redraw();
            this.bd2.StartUp();
            this.bd3.StartUp();
        }
Example #8
0
 public void StartUP()
 {
     rep = GameObject.Find("Repair Root").GetComponent <repair>();
     rep.set_mode(-1);
     if (!_isStartUpDone)
     {
         _isStartUpDone = true;
         bd2            = ((Component)rep.transform.FindChild("board2_top/board2")).GetComponent <board2>();
         bd3            = ((Component)rep.transform.FindChild("board3_top/board3")).GetComponent <board3>();
         dia            = GameObject.Find("dialog").GetComponent <dialog>();
         dia2           = GameObject.Find("dialog2").GetComponent <dialog2>();
         dia3           = GameObject.Find("dialog3").GetComponent <dialog3>();
         for (int i = 0; i < 4; i++)
         {
             GameObject[] array = shutter;
             int          num   = i;
             int          num2  = i;
             array[num] = GameObject.Find("board1_top/board/Grid/0" + num2.ToString() + "/Shutter");
         }
         _clsRepair = rep.now_clsRepair();
         now_kit    = _clsRepair.Material.RepairKit;
         _ANI       = ((Component)rep.transform.FindChild("info")).GetComponent <Animation>();
         int num3 = _clsRepair.MapArea.NDockCount;
         if (num3 == _clsRepair.MapArea.NDockMax)
         {
             num3--;
         }
         dockSelectController = new KeyControl(0, num3);
         dock_flag_init();
         dockSelectController.setChangeValue(-1f, 0f, 1f, 0f);
         dockSelectController.isLoopIndex = false;
         _first_key     = false;
         _go_kosoku     = 0;
         _go_kosoku_m   = -1;
         _select_dock   = 0;
         _select_dock_m = -1;
         _dock_exist    = false;
         redraw();
         bd2.StartUp();
         bd3.StartUp();
     }
 }
Example #9
0
 public void _init_repair()
 {
     rep = GameObject.Find("Repair Root").GetComponent <repair>();
     dia = GameObject.Find("dialog").GetComponent <dialog>();
     bd3 = GameObject.Find("board3_top/board3").GetComponent <board3>();
 }
        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;
        }
Example #11
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);
        }