Пример #1
0
    /// <summary>
    /// 确认地图
    /// </summary>
    public void OnSure()
    {
        if (_State == E_Select.End)
        {
            return;
        }

        ioo.audioManager.PlaySound2D("SFX_Sound_Sure");

        switch (_State)
        {
        case E_Select.Map:
            _TimeUp = 30;
            _State  = E_Select.Model;
            _View.MapRoot.SetActive(false);
            _View.ModelRoot.SetActive(true);
            _View.Effect_Please.SetActive(true);

            ioo.audioManager.StopPersonMusic("Person_Sound_Choose_Map");
            ioo.audioManager.StopBackMusic("Music_Panel_Select_Map");
            ioo.audioManager.PlayBackMusic("Music_Panel_Select_Plane");
            ioo.audioManager.PlayPersonMusic("Person_Sound_Choose_Plane");

            break;

        case E_Select.Model:
            _TimeUp = 30;
            _State  = E_Select.End;
            _View.Effect_Please.SetActive(false);
            _View.Effect_Please.SetActive(true);

            ioo.audioManager.StopBackMusic("Music_Panel_Select_Plane");
            ioo.audioManager.StopPersonMusic("Person_Sound_Choose_Plane");
            ioo.audioManager.PlayPersonSound("Person_Sound_Plane_Is_Good_Condition");

            CurIndex = (CurIndex % 3 + 3) % 3;
            switch (CurIndex)
            {
            case 0:
                _SelectedName = ModelName.Player0;
                break;

            case 1:
                _SelectedName = ModelName.Player1;
                break;

            case 2:
                _SelectedName = ModelName.Player2;
                break;
            }

            StartCoroutine(ToLoading());
            break;
        }
    }
Пример #2
0
    protected override void OnStart()
    {
        _View = new PanelSelectView();

        _View.Init(transform);

        _count        = 0;
        _cool         = true;
        _TotalTime    = 20;
        _State        = E_Select.Map;
        _SelectedName = ModelName.Player0;

        PlaneList = new List <int>();
        for (int i = 0; i < _View.PlaneList.Count; ++i)
        {
            PlaneList.Add(_View.PlaneList.Count - 1 - i);
        }

        ioo.gameMode.MapSelect(E_Map.City);
    }