public void OnClick()
 {
     if (rep.now_mode() == 3 && !dia.get_dialog_anime() && !bd3.get_board3_anime())
     {
         rep.set_mode(-1);
         dia.set_dialog_anime(value: true);
         bd3.Set_Button_Sprite(value: false);
         SoundUtils.PlaySE(SEFIleInfos.CommonEnter2);
         dia.dialog_appear(bstat: true);
         rep.setmask(3, value: true);
         rep.set_mode(4);
     }
 }
Exemple #2
0
 private void OnClick()
 {
     _init_repair();
     if (!dia.get_dialog_anime() && !bd2.get_board2_anime() && !dia2.get_dialog2_anime() && rep.now_mode() != -1)
     {
         int.TryParse(base.transform.parent.gameObject.name, out int result);
         Debug.Log("get_dock_touchable_count: " + bd1.get_dock_touchable_count() + " Touched:" + result);
         if (bd1.get_dock_touchable_count() > result)
         {
             bd1.dock_selected(result);
         }
     }
 }
Exemple #3
0
 private void OnClick()
 {
     Debug.Log("mask2に触られた。");
     if (!dia.get_dialog_anime() && !bd3.get_board3_anime())
     {
         rep.set_mode(-2);
         bd3.board3_appear(bstat: false, isSirent: true);
         sw = GameObject.Find("board3/sw01").GetComponent <sw>();
         sw.setSW(stat: false);
         bd3.Cancelled(NotChangeMode: false);
         rep = GameObject.Find("Repair Root").GetComponent <repair>();
         rep.setmask(2, value: false);
         rep.set_mode(2);
     }
 }
Exemple #4
0
        private void Update()
        {
            if (!_isStartUpDone || !rep.isFadeDone())
            {
                StartUP();
            }
            if (!_isStartUpDone || _HOLT)
            {
                return;
            }
            int index = dockSelectController.Index;

            dockSelectController.Update();
            if (dockSelectController.IsRDown())
            {
                SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
            }
            if (rep.now_mode() != 1)
            {
                dockSelectController.Index = index;
                return;
            }
            if (dockSelectController.keyState[8].down)
            {
            }
            if (dockSelectController.keyState[12].down)
            {
            }
            if (bd2.get_board2_anime() || dia2.get_dialog2_anime() || dia.get_dialog_anime())
            {
                return;
            }
            if (!_isBtnMaruUp && (dockSelectController.keyState[1].up || !dockSelectController.keyState[1].down))
            {
                _isBtnMaruUp = true;
                return;
            }
            if (rep.first_change())
            {
                UISelectedObject.SelectedObjectBlink(dock_cursor, dockSelectController.Index);
                btnLights(Play: false, force: true);
                return;
            }
            if (dockSelectController.IsChangeIndex)
            {
                UISelectedObject.SelectedObjectBlink(dock_cursor, dockSelectController.Index);
                SoundUtils.PlaySE(SEFIleInfos.CommonCursolMove);
            }
            for (int i = 0; i < dock_cursor.Length; i++)
            {
                if (_clsRepair.Material.RepairKit <= 0 || now_kit <= 0)
                {
                    repair_btn[i].GetComponent <UISprite>().spriteName = "btn_quick_off";
                    btnLights(Play: false);
                }
                else
                {
                    btnLights(Play: true);
                    if (dockSelectController.Index == i)
                    {
                        if (!get_HS_anime(i))
                        {
                            repair_btn[i].GetComponent <UISprite>().spriteName = "btn_quick_on";
                        }
                    }
                    else if (!get_HS_anime(i))
                    {
                        repair_btn[i].GetComponent <UISprite>().spriteName = "btn_quick";
                    }
                }
                if (dockSelectController.Index == i)
                {
                    label1_obj[i].GetComponent <UILabel>().effectColor = TextShadowLight;
                    label2_obj[i].GetComponent <UILabel>().effectColor = TextShadowLight;
                    label3_obj[i].GetComponent <UILabel>().effectColor = TextShadowLight;
                }
                else
                {
                    label1_obj[i].GetComponent <UILabel>().effectColor = Color.white;
                    label2_obj[i].GetComponent <UILabel>().effectColor = Color.white;
                    label3_obj[i].GetComponent <UILabel>().effectColor = Color.white;
                }
            }
            if (dockSelectController.IsChangeIndex)
            {
                UISelectedObject.SelectedObjectBlink(dock_cursor, dockSelectController.Index);
                for (int j = 0; j < dock_cursor.Length; j++)
                {
                    if (_clsRepair.Material.RepairKit <= 0 || now_kit <= 0)
                    {
                        repair_btn[j].GetComponent <UISprite>().spriteName = "btn_quick_off";
                        btnLights(Play: false);
                    }
                    else
                    {
                        btnLights(Play: true);
                        if (dockSelectController.Index == j)
                        {
                            if (!get_HS_anime(j))
                            {
                                repair_btn[j].GetComponent <UISprite>().spriteName = "btn_quick_on";
                            }
                        }
                        else if (!get_HS_anime(j))
                        {
                            repair_btn[j].GetComponent <UISprite>().spriteName = "btn_quick";
                        }
                    }
                    if (dockSelectController.Index == j)
                    {
                        label1_obj[j].GetComponent <UILabel>().effectColor = new Color(0.63f, 0.91f, 1f);
                        label2_obj[j].GetComponent <UILabel>().effectColor = new Color(0.63f, 0.91f, 1f);
                    }
                    else
                    {
                        label1_obj[j].GetComponent <UILabel>().effectColor = Color.white;
                        label2_obj[j].GetComponent <UILabel>().effectColor = Color.white;
                    }
                }
                for (int k = 0; k < _clsRepair.MapArea.NDockMax; k++)
                {
                    if (_clsRepair.MapArea.NDockCount == dockSelectController.Index)
                    {
                        int num = k;
                        GameObject.Find("board1_top/board/Grid/0" + num.ToString() + "/Shutter/BGKey").GetComponent <UISprite>().spriteName = "btn_addDock_on";
                    }
                    else
                    {
                        int num2 = k;
                        GameObject.Find("board1_top/board/Grid/0" + num2.ToString() + "/Shutter/BGKey").GetComponent <UISprite>().spriteName = "btn_addDock";
                    }
                }
            }
            if (dockSelectController.Index < _clsRepair.GetDocks().Length)
            {
                if (_clsRepair.GetDockData(dockSelectController.Index).ShipId != 0)
                {
                    _go_kosoku = 1;
                }
                else
                {
                    _go_kosoku = 0;
                }
            }
            if (dockSelectController.keyState[0].down)
            {
                back_to_port();
            }
            else if (dockSelectController.keyState[1].down && _isBtnMaruUp)
            {
                _isBtnMaruUp = false;
                now_dock     = dockSelectController.Index;
                if (_clsRepair.Material.RepairKit <= 0)
                {
                    now_kit = -1;
                }
                dock_selected(dockSelectController.Index);
            }
            else if (dockSelectController.keyState[5].down)
            {
                SingletonMonoBehaviour <PortObjectManager> .Instance.BackToStrategy();
            }
        }