Exemplo n.º 1
0
        /// <summary>
        /// Nons the used gameobject resetter.
        /// </summary>
        private void NonUsedGameobjectResetter(StatePanel statePanel)
        {
            switch (statePanel)
            {
            case StatePanel.Image:
                if (PanelSeachSmallImageList.Instance != null)
                {
                    PanelSeachSmallImageList.Instance.GameobjectReset();
                }

                if (PanelSeachLargeImageList.Instance != null)
                {
                    PanelSeachLargeImageList.Instance.GameobjectReset();
                }
                break;

            case StatePanel.Notify:
                PanelSeachList.Instance.SearchListGameObjectReset();
                break;

            case StatePanel.Gps:
            case StatePanel.Condition:

                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Locates the permission allow.
        ///イベント用
        /// </summary>
        /// <returns>The permission allow.</returns>
        void LocatePermissionAllow()
        {
            PopupPanel.Instance.PopClean();
            GameObject obj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_SECOND_SELECT_TAG);

            PanelPopupCloseAnimate(obj);

            if (_panelGpsSearch != null)
            {
                _panelGpsSearch.transform.GetChild(0).GetChild(0).GetComponent <MapWebView> ().Init();
            }

            switch (_statePanel)
            {
            case StatePanel.Image:
                BackButton(_panelImageList);
                break;

            case StatePanel.Condition:
                BackButton(_panelSearchCondition);
                break;

            case StatePanel.Notify:
                BackButton(_panelEazyNotify);
                break;
            }
            _statePanel = StatePanel.Gps;
            HeaderPanel.Instance.UiButtonSwitch(false, PictLayoutChangeEvent);
        }
Exemplo n.º 3
0
    private void create()
    {
        Instantiate(PrefEventSystem);

        GameObject o = null;

        o       = Instantiate(PrefCanvas);
        _canvas = o.GetComponent <Canvas>();

        o          = Instantiate(PrefMainPanel);
        _mainPanel = o.GetComponent <MainPanel>();
        _mainPanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefSchedulePanel);
        _schedulePanel = o.GetComponent <SchedulePanel>();
        _schedulePanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefRunSchedulePanel);
        _runSchedulePanel = o.GetComponent <RunSchedulePanel>();
        _runSchedulePanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefWardrobePanel);
        _wardrobePanel = o.GetComponent <WardrobePanel>();
        _wardrobePanel.transform.SetParent(_canvas.transform, false);

        o           = Instantiate(PrefStatePanel);
        _statePanel = o.GetComponent <StatePanel>();
        _statePanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefCurrencyPanel);
        _currencyPanel = o.GetComponent <CurrencyPanel>();
        _currencyPanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefFeelingCheckPanel);
        _feelingCheckPanel = o.GetComponent <FeelingCheckPanel>();
        _feelingCheckPanel.transform.SetParent(_canvas.transform, false);

        o           = Instantiate(PrefPopupPanel);
        _popupPanel = o.GetComponent <PopupPanel>();
        _popupPanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefSelectTargetPanel);
        _selectTargetPanel = o.GetComponent <SelectTargetPanel>();
        _selectTargetPanel.transform.SetParent(_canvas.transform, false);

        o           = Instantiate(PrefStoryPanel);
        _storyPanel = o.GetComponent <StoryPanel>();
        _storyPanel.transform.SetParent(_canvas.transform, false);

        o = Instantiate(PrefBoardGamePanel);
        _boardGamePanel = o.GetComponent <BoardGamePanel>();
        _boardGamePanel.transform.SetParent(_canvas.transform, false);

        o            = Instantiate(PrefCombatPanel);
        _combatPanel = o.GetComponent <CombatPanel>();
        _combatPanel.transform.SetParent(_canvas.transform, false);
    }
Exemplo n.º 4
0
    void InitUI()
    {
        geoUI = new GeoUI();

        Transform canvasBack  = GameObject.Find("/UI/CanvasBack").transform;
        Transform canvasFront = GameObject.Find("/UI/CanvasFront").transform;

        NavPanel navPanel = canvasBack.Find("NavPanel").GetComponent <NavPanel>();

        navPanel.OnShadeButtonClick              = HandleClickShadeButton;
        navPanel.OnLockButtonClick               = HandleClickLockButton;
        navPanel.OnDisplayButtonClick            = HandleClickDisplayButton;
        navPanel.OnCoordinateButtonClick         = HandleClickCoordinateButton;
        navPanel.OnGridButtonClick               = HandleClickGridButton;
        navPanel.OnSnapButtonClick               = HandleClickSnapButton;
        geometryBehaviour.OnElementDisplayChange = HandleElementDisplayChange;
        navPanel.Init();

        ToolPanel toolPanel = canvasBack.Find("ToolPanel").GetComponent <ToolPanel>();

        toolPanel.Init();
        toolPanel.OnClickTool = HandleClickTool;

        StatePanel statePanel = canvasBack.Find("StatePanel").GetComponent <StatePanel>();

        statePanel.Init();

        InputPanel inputPanel = canvasBack.Find("InputPanel").GetComponent <InputPanel>();

        inputPanel.Init();

        ElementPanel elementPanel = canvasFront.Find("ElementPanel").GetComponent <ElementPanel>();

        elementPanel.Init();

        ActivePanel activePanel = canvasFront.Find("ActivePanel").GetComponent <ActivePanel>();

        activePanel.Init();

        CameraPanel cameraPanel = canvasFront.Find("CameraPanel").GetComponent <CameraPanel>();

        cameraPanel.OnCenterButtonClick  = HandleClickCenterButton;
        cameraPanel.OnZoomInButtonClick  = HandleClickZoomInButton;
        cameraPanel.OnZoomOutButtonClick = HandleClickZoomOutButton;
        cameraPanel.OnUpButtonClick      = HandleClickUpButton;
        cameraPanel.OnDownButtonClick    = HandleClickDownButton;
        cameraPanel.Init();
        cameraPanel.SetCenterButtonActive(false);

        geoUI.navPanel     = navPanel;
        geoUI.toolPanel    = toolPanel;
        geoUI.statePanel   = statePanel;
        geoUI.inputPanel   = inputPanel;
        geoUI.elementPanel = elementPanel;
        geoUI.activePanel  = activePanel;
        geoUI.cameraPanel  = cameraPanel;
    }
        private void CreateNewStatePanel(KeyValuePair <string, State> k)
        {
            GameObject statepanel = LoadPrefabs.GetInstance().GetLoadPrefab("StatePanel");
            StatePanel panel      = statepanel.GetComponent <StatePanel>();

            panel.SetState(k.Value, Translate(k.Value));
            statepanel.transform.parent = _stateGrid.transform;
            statepanel.GetComponent <RectTransform>().localScale = Vector3.one;
            stateGams.Add(statepanel);
        }
Exemplo n.º 6
0
    private void onPanelState(StatePanel _state)
    {
        for (int i = 0; i < _panels.Count; i++)
        {
            _panels[i].gameObject.SetActive(false);

            if (_panels[i]._isState == _state)
            {
                _panels[i].gameObject.SetActive(true);
            }
        }
    }
Exemplo n.º 7
0
        /// <summary>
        /// Tab4 this instance.
        /// (Temporary Method Name)
        /// </summary>
        public void ConditionButton()
        {
            if (AppStartLoadBalanceManager._isBaseProfile == false)
            {
                PanelFooterButtonManager.Instance.NoRegistBaseProfile();
                return;
            }

            _backSwipe.EventMessageTarget = _panelSearchCondition;

            switch (_statePanel)
            {
            case StatePanel.Image:
                TabOnOffSwitcher(2);
                _statePanel = StatePanel.Image;
                BackButton(_panelImageList);
                break;

            case StatePanel.Notify:
                TabOnOffSwitcher(3);
                _statePanel = StatePanel.Notify;
                BackButton(_panelEazyNotify);
                break;

            case StatePanel.Gps:
                TabOnOffSwitcher(1);
                _statePanel = StatePanel.Gps;
                BackButton(_panelGpsSearch);
                break;
            }

            if (_listConnectUpdateDisable == true)
            {
                return;
            }

            if (_panelGpsSearch != null)
            {
                _panelGpsSearch.transform.GetChild(0).GetChild(0).GetComponent <MapWebView> ().ViewHide();
            }

#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
            PanelSearchListChange.Instance.NativePickerInit();
#else
            PanelSearchListChange.Instance.Init();
#endif

            PanelAnimate(_panelSearchCondition);

            HeaderPanel.Instance.UiButtonSwitch(false);
            HeaderPanel.Instance.BackButtonSwitch(true, ConditionCloseEvent);
        }
Exemplo n.º 8
0
        private void AddComboBoxIfStatesExist(string name, List <StateSave> states)
        {
            if (states.Count != 0)
            {
                StatePanel.SuspendLayout();

                StateCategoryControl scc = new StateCategoryControl();
                this.StatePanel.Controls.Add(scc);
                scc.Initialize(name, states);
                StatePanel.ResumeLayout();
                StatePanel.PerformLayout();

                scc.ItemSelect += new EventHandler(RefreshStates);
            }
        }
Exemplo n.º 9
0
 private void Start()
 {
     gameObject.GetComponentInChildren <Text>().text = "" + _hitPoints;
     _enemyRectTransform = GetComponent <RectTransform>();
     _roadCells          = GameObject.Find("BattleField").GetComponent <BattleField>().GetCurrentLevel().RoadCells;
     _keys    = _roadCells.Keys.ToList();
     _enemies = GameObject.Find("BattleField").GetComponent <BattleField>().GetEnemies();
     _state   = GameObject.Find("StatePanel").GetComponent <StatePanel>();
     foreach (var componentsInChild in _enemyRectTransform.GetComponentsInChildren <RectTransform>())
     {
         if (componentsInChild.name == "Object")
         {
             _enemyObjectRectTransform = componentsInChild;
         }
     }
 }
Exemplo n.º 10
0
    public void Init(StatePanel statePanel)
    {
        this.statePanel = statePanel;
        // statePanel.OnDeleteState = HandleDeleteState;

        geometryStates  = new List <State>();
        conditionStates = new List <State>();
        auxiliaryStates = new List <State>();
        measureStates   = new List <State>();

        geometryMap  = new Dictionary <Geometry, GeometryState>();
        conditionMap = new Dictionary <Condition, ConditionState>();
        auxiliaryMap = new Dictionary <Auxiliary, AuxiliaryState>();
        measureMap   = new Dictionary <Measure, MeasureState>();

        vertexStatesMap = new Dictionary <int, HashSet <State> >();
    }
Exemplo n.º 11
0
    // Use this for initialization
    void Awake()
    {
        create();

        MainPanel.Hide();
        SchedulePanel.Hide();
        RunSchedulePanel.Hide();
        WardrobePanel.Hide();
        StatePanel.Hide();
        CurrencyPanel.Hide();
        FeelingCheckPanel.Hide();
        Popup.Hide();
        SelectTargetPanel.Hide();
        StoryPanel.Hide();
        BoardGamePanel.Hide();
        CombatPanel.Hide();
    }
Exemplo n.º 12
0
    public AddConditionOperation(GeoController geoController, StateController stateController, Geometry geometry, GeometryBehaviour geometryBehaviour, GeoUI geoUI, Tool tool)
    {
        CanRotateCamera  = true;
        CanActiveElement = true;

        this.geoController     = geoController;
        this.stateController   = stateController;
        this.geometry          = geometry;
        this.geometryBehaviour = geometryBehaviour;
        this.inputPanel        = geoUI.inputPanel;
        this.statePanel        = geoUI.statePanel;
        this.tool = tool;

        Type type = Type.GetType(tool.Name + "ConditionTool");

        if (type != null)
        {
            conditionTool = (ConditionTool)Activator.CreateInstance(type);
        }
    }
Exemplo n.º 13
0
        /// <summary>
        /// Tab2 this instance.
        /// (Temporary Method Name)
        /// </summary>
        public void ImageButton()
        {
            if (_panelGpsSearch != null)
            {
                _panelGpsSearch.transform.GetChild(0).GetChild(0).GetComponent <MapWebView> ().ViewHide();
            }

            TabOnOffSwitcher(2);

            switch (_statePanel)
            {
            case StatePanel.Condition:
                BackButton(_panelSearchCondition);
                break;

            case StatePanel.Notify:
                BackButton(_panelEazyNotify);
                break;

            case StatePanel.Gps:
                BackButton(_panelGpsSearch);
                break;
            }

            PanelAnimate(_panelImageList);

            _statePanel = StatePanel.Image;
            HeaderPanel.Instance.UiButtonSwitch(false);
            HeaderPanel.Instance.UiButtonSwitch(true, PictLayoutChangeEvent);

            // リストの初期化
            if (_isTwoColumn)
            {
                _panelVer2.GetComponent <PanelSeachLargeImageList> ().InitializeFromCondiiton();
            }
            else
            {
                _panelVer1.GetComponent <PanelSeachSmallImageList> ().InitializeFromCondition();
            }
        }
Exemplo n.º 14
0
        /// <summary>
        /// Tab3 this instance.
        /// (Temporary Method Name)
        /// </summary>
        public void SearchListButton()
        {
            if (AppStartLoadBalanceManager._isBaseProfile == false)
            {
                PanelFooterButtonManager.Instance.NoRegistBaseProfile();
                return;
            }

            if (_panelGpsSearch != null)
            {
                _panelGpsSearch.transform.GetChild(0).GetChild(0).GetComponent <MapWebView> ().ViewHide();
            }

            TabOnOffSwitcher(3);

            switch (_statePanel)
            {
            case StatePanel.Condition:
                BackButton(_panelSearchCondition);
                break;

            case StatePanel.Image:
                BackButton(_panelImageList);
                break;

            case StatePanel.Gps:
                BackButton(_panelGpsSearch);
                break;
            }

            PanelAnimate(_panelEazyNotify);

            _statePanel = StatePanel.Notify;
            HeaderPanel.Instance.UiButtonSwitch(false);

            _panelEazyNotify.GetComponent <PanelSeachList> ().InitializeFromCondition();
        }
Exemplo n.º 15
0
        /// <summary>
        /// Despliega la información del reporte basado en el id entregado,
        /// Este es llamado por la pala al ser seleccionada
        /// </summary>
        /// <param name="id">ID de la pala a mostrar reporte</param>
        public void DeployInfo(int id)
        {
            // Consigue el reporte de la pala basado en el ID y setea el texto del ID
            ShovelReportData report = ObjectInstantiator.shovelReports.Reports.Where(report => id == report.ShovelID).FirstOrDefault();

            IDText.text = "ID: " + id;

            /* Setea el porcentaje de rendimiento basado en el rendimiento y rendimiento esperado
             * para luego asignarselos al texto del porcentaje y al radial.*/
            float performance = Mathf.Round(report.Performance * 100 / report.PlannedPerformance);

            performanceRadialText.text = performance + "%";
            percentFillAnimCR          = StartCoroutine(PercentFillAnim(performance / 100));
            // Limpiar el panel del historial
            foreach (var item in statePanelContainer.GetComponentsInChildren <StatePanel>())
            {
                Destroy(item.gameObject);
            }

            /*Instanciar paneles de estados y seteando su información.
             * se hace referencia a la clase de statepanel de cada uno de los prefabs para acceder a sus componentes.
             */
            foreach (var state in report.LastStates)
            {
                var   panel = Instantiate(statePanelPrefab, statePanelContainer);
                Color circleColor;
                ColorUtility.TryParseHtmlString(state.Color, out circleColor);
                StatePanel panelManager = panel.GetComponent <StatePanel>();
                panelManager.colorCircle.color = circleColor;
                panelManager.stateText.text    = state.Name;
                DateTime startTime = Convert.ToDateTime(state.Start);
                DateTime endTime   = Convert.ToDateTime(state.End);
                panelManager.ScheduleText.text = "Inicio: " + String.Format("{0:g}", startTime) + "\n"
                                                 + "Final: " + String.Format("{0:g}", startTime);
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// Tab1 this instance.
        /// (Temporary Method Name)
        /// </summary>
        public void GpsButton()
        {
            if (_statePanel == StatePanel.Gps)
            {
                return;
            }


            if (AppStartLoadBalanceManager._isBaseProfile == false)
            {
                PanelFooterButtonManager.Instance.NoRegistBaseProfile();
                return;
            }
            if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lat) == true ||
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.lng) == true
                )
            {
                //緯度、経度どちらかのデータがない場合、表示させないように制御。
                PopupPanel.Instance.PopMessageInsert(
                    LocalMsgConst.ERROR_NOT_MAP_SHOW,
                    LocalMsgConst.OK,
                    ErrorNotGpsShow
                    );
                GameObject notShowPopObj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_BASIC_TAG);
                PanelPopupAnimate(notShowPopObj);
                return;
            }

            TabOnOffSwitcher(1);

#if UNITY_IOS && !UNITY_EDITOR
            Debug.Log(" Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test ");
//    _locationStatus = NativeRecieveManager.GetLocationStatus ();
            Debug.Log(" Test Test Test Test Test Test Test Test Test Test Test Test Test Test Test ");

            //GPSマップ表示の可否
            //説明用ポップアップ。
            PopupSecondSelectPanel.Instance.PopMessageInsert(
                LocalMsgConst.CHECKIN_CONFIRM,
                LocalMsgConst.APPROVAL,
                LocalMsgConst.DENIAL,
                LocatePermissionAllow,
                LocatePermissionDeny
                );
            GameObject obj = GameObject.FindGameObjectWithTag(CommonConstants.POPUP_SECOND_SELECT_TAG);
            PanelPopupAnimate(obj);
#else
            if (_panelGpsSearch != null)
            {
                PanelAnimate(_panelGpsSearch);
                _panelGpsSearch.transform.GetChild(0).GetChild(0).GetComponent <MapWebView>().Init();
            }

            switch (_statePanel)
            {
            case StatePanel.Image:
                BackButton(_panelImageList);
                break;

            case StatePanel.Condition:
                BackButton(_panelSearchCondition);
                break;

            case StatePanel.Notify:
                BackButton(_panelEazyNotify);
                break;
            }
            _statePanel = StatePanel.Gps;
            HeaderPanel.Instance.UiButtonSwitch(false, PictLayoutChangeEvent);
#endif
        }
Exemplo n.º 17
0
        /// <summary>
        /// Start this instance.
        /// </summary>
        IEnumerator Start()
        {
            _tmpText.text = LocalMsgConst.TITLE_SEARCH;
            _loadingOverLay.SetActive(true);
            // アンドロイドでバックグラウンドプッシュ?スプラッシュから?何かのタイミングで
            //static変数のデータが消え去ってしまうみたいなのでリカバー
            if (string.IsNullOrEmpty(AppStartLoadBalanceManager._userKey) == true)
            {
                //サーバーにイベント通知用Api(インストール時に一回のみ) ----------------------
                string _commonFileName = LocalFileConstants.GetLocalFileDir() + LocalFileConstants.COMMON_LOCAL_FILE_NAME;

                LocalFileHandler.Init(_commonFileName);

                //ファイルが作成されるまでポーリングして処理待ち
                while (System.IO.File.Exists(_commonFileName) == false)
                {
                    yield return(System.IO.File.Exists(_commonFileName) == true);
                }


                //ここでユーザーキーを取得
                AppStartLoadBalanceManager._userKey = LocalFileHandler.GetString(LocalFileConstants.USER_KEY);

#if UNITY_ANDROID
                //ステータスバーを表示 //Android用
                ApplicationChrome.statusBarState = ApplicationChrome.States.VisibleOverContent;
#endif
            }

            //ユーザーデータ取得。
            new GetUserApi();
            while (GetUserApi._success == false)
            {
                yield return(GetUserApi._success == true);
            }

            if (GetUserApi._httpCatchData.result.review == "false")
            {
#if UNITY_IPHONE || UNITY_ANDROID && !UNITY_EDITOR
//有料会員か?
                if (CommonConstants.IS_PREMIUM == false)
                {
                    //_nendAdBanner.Show ();
                }
                else
                {
                    _nendAdBanner.Pause();
                    _nendAdBanner.Hide();
                    Destroy(_nendAdBanner.gameObject);
                }
#endif
            }
            //性別が取得出来ていない場合の処理。
            if (GetUserApi._httpCatchData.result.user.sex_cd == "0")
            {
                PanelGenderSelectCommon.Instance.Init();  //性別選択のUIを表示。
                _loadingOverLay.SetActive(false);
                yield break;
            }

            AppStartLoadBalanceManager._gender = GetUserApi._httpCatchData.result.user.sex_cd;

            ///メンテナンスの場合、処理を止める。
            if (AppliEventController.Instance.MaintenanceCheck() == true)
            {
                _loadingOverLay.SetActive(false);
                yield break;
            }

            ///強制アップデートの場合、処理を止める。
            if (AppliEventController.Instance.ForceUpdateCheck() == true)
            {
                _loadingOverLay.SetActive(false);
                yield break;
            }

            ///アプリポップアップレビューの立ち上げ処理。
            AppliEventController.Instance.AppliReview();

            //マスターデータ取得。
            if (InitDataApi._httpCatchData == null)
            {
                new InitDataApi();
                while (InitDataApi._success == false)
                {
                    yield return(InitDataApi._success == true);
                }
            }



            //基本プロフィールを作成しているかどうかの判定。念の為、もう一回判定。
            if (string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.name) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.pref) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.city_id) == false &&
                string.IsNullOrEmpty(GetUserApi._httpCatchData.result.user.birth_date) == false)
            {
                //基本プロフィールを作成している。
                AppStartLoadBalanceManager._isBaseProfile = true;
            }
            else
            {
                //まだ、基本プロフィールを作成していない。
                AppStartLoadBalanceManager._isBaseProfile = false;
            }

            HeaderPanel.Instance.UiButtonSwitch(true, PictLayoutChangeEvent);

                        #if UNITY_EDITOR
            yield return(StartCoroutine(CallInitApi()));
                        #endif

            SearchListButton();
            _statePanel = StatePanel.Notify;


            _loadingOverLay.SetActive(false);
            yield break;
        }
    IEnumerator enemyAction(int rx = 0, int ry = 0)
    {
        //先让敌人ai 停下来
        GetComponent <Rigidbody2D>().velocity = Vector2.zero;


        switch (enemyState)
        {
        case EnemyState.idle:
        {
            if (rx == 0)
            {
                List <int> xlist = new List <int>();
                xlist.Add(Random.Range(-1 * max, -1 * min));
                xlist.Add(Random.Range(min, max));
                int randomIndex = Random.Range(0, 2);
                rx = xlist[randomIndex];
            }



            if (ry == 0)
            {
                List <int> ylist = new List <int>();
                ylist.Add(Random.Range(-1 * max, -1 * min));
                ylist.Add(Random.Range(min, max));
                ry = ylist[Random.Range(0, 2)];
            }

            Vector3 v3 = new Vector3(transform.position.x - rx, transform.position.y - ry, transform.position.z);
            GetComponent <Rigidbody2D>().AddForce((v3 - transform.position).normalized * forceEnergy);
            yield return(new WaitForSeconds(1f));

            coroutine = StartCoroutine(enemyAction());
        }
        break;

        case EnemyState.zhuiji:
        {
            GetComponent <Rigidbody2D>().AddForce((playertrans.position - transform.position).normalized * forceEnergy);

            distance = Mathf.Abs((playertrans.position - transform.position).magnitude);
            if (distance < 70)
            {
                //小于这个距离 开始攻击
                AttackHero();
            }

            yield return(new WaitForSeconds(1f));

            coroutine = StartCoroutine(enemyAction());
        }
        break;

        case EnemyState.attack:
        {
            //开始攻击
            //Debug.Log("开始攻击");


            distance = Mathf.Abs((playertrans.position - transform.position).magnitude);
            if (distance <= 70)
            {
                skill.gameObject.SetActive(true);
                playertrans.GetComponent <Image>().color = Color.red;
                yield return(new WaitForSeconds(0.2f));

                skill.gameObject.SetActive(false);
                playertrans.GetComponent <Image>().color = Color.white;

                if (PlayerActionManager.manager.hp >= enemyAttack)
                {
                    PlayerActionManager.manager.hp -= enemyAttack;
                }
                else
                {
                    PlayerActionManager.manager.hp = 0;
                    //玩家 翘辫子
                }
            }
            StatePanel.ChangeXuetiaoValue();
            //Debug.Log("玩家血量为"  + PlayerActionManager.manager.hp);

            yield return(new WaitForSeconds(1f));

            enemyState = EnemyState.zhuiji;
            coroutine  = StartCoroutine(enemyAction());
        }
        break;
        }
    }