Пример #1
0
    // Moving Phase
    private void Move(Vector2 mousePosition)
    {
        if (GetNbPieceOnBoardCurrentPlayer() == 3)
        {
            phase = EPhase.FLYING;
            return;
        }
        textPhase.text   = "Moving piece";
        textInfoFly.text = "";

        if (pieceSelected == Vector2.zero)
        {
            pieceSelected = SelectPiece(mousePosition, GetPlayer());
        }
        if (pieceSelected != Vector2.zero)
        {
            if (MovePiece(mousePosition, GetPlayer()))
            {
                if (MillCreated())
                {
                    phase = EPhase.REMOVING;
                }
                else
                {
                    isPLayerWhite = !isPLayerWhite;
                    pieceSelected = Vector2.zero;
                    Selector.SetActive(false);
                }
            }
        }
    }
Пример #2
0
 public CTouch(EPhase Phase_, int TouchID_, float x_, float y_)
 {
     Phase   = Phase_;
     TouchID = TouchID_;
     x       = x_;
     y       = y_;
 }
Пример #3
0
    public IEnumerator EnemyDecision()
    {
        yield return(new WaitForSeconds(0.7f));

        bool stop = false;

        while (!stop)
        {
            if (enemyValue < 13)
            {
                DrawCardEnemy();
            }
            else
            {
                int prob = UnityEngine.Random.Range(13, 19);
                if (prob < enemyValue)
                {
                    stop = true;
                }
                else
                {
                    DrawCardEnemy();
                }
            }
            yield return(new WaitForSeconds(0.05f * enemyValue));
        }
        // Start judge
        phase = EPhase.END;
    }
Пример #4
0
 // Flying phase
 private void Fly(Vector2 mousePosition)
 {
     if (GetNbPieceOnBoardCurrentPlayer() > 3)
     {
         phase = EPhase.MOVING;
         return;
     }
     textPhase.text   = "Flying piece";
     textInfoFly.text = "Player " + GetPlayerToString() + " can move in any empty square";
     if (pieceSelected == Vector2.zero)
     {
         pieceSelected = SelectPiece(mousePosition, GetPlayer());
     }
     if (pieceSelected != Vector2.zero)
     {
         if (FlyingPiece(mousePosition, GetPlayer()))
         {
             if (MillCreated())
             {
                 phase = EPhase.REMOVING;
             }
             else
             {
                 isPLayerWhite = !isPLayerWhite;
                 pieceSelected = Vector2.zero;
                 Selector.SetActive(false);
             }
         }
     }
 }
Пример #5
0
    public IEnumerator OnStart()
    {
        yield return(new WaitForSeconds(1));

        phase = EPhase.PLAYERTURN;
        playerOptions.SetActive(true);
    }
Пример #6
0
        public override void OnReset()
        {
            base.OnReset();

            m_PreviousPhase    = EPhase.NotInit;
            CurrentPoolingTime = -1;
        }
Пример #7
0
        public void SetPhase(EPhase phase)
        {
            if (phase != m_PreviousPhase)
            {
                m_PreviousPhase = phase;
                switch (phase)
                {
                case EPhase.NotInit:
                    break;

                case EPhase.Idle:
                    onIdle.Set();
                    foreach (var animator in onIdle.animators)
                    {
                        animator.Update(0.001f);
                    }

                    break;

                case EPhase.Explosion:
                    onExplosion.Set();
                    foreach (var animator in onExplosion.animators)
                    {
                        animator.Update(0.001f);
                    }

                    break;

                default:
                    throw new ArgumentOutOfRangeException(nameof(phase), phase, null);
                }
            }
        }
Пример #8
0
 protected void ResetDrawing()
 {
     m_Phase       = EPhase.Free;
     gizmoBox.size = Vector3.one * dataSource.Scale;
     gizmoBox.gameObject.SetActive(false);
     //m_EndOffset = Vector3.zero;
     //_drawGL = false;
 }
Пример #9
0
 protected void ResetDrawing()
 {
     m_Phase            = EPhase.Free;
     gizmoCube.CubeSize = new IntVector3(pattern.size, pattern.size, pattern.size);
     gizmoCube.gameObject.SetActive(false);
     m_EndOffset = Vector3.zero;
     _drawGL     = false;
 }
Пример #10
0
 protected void ResetDrawing()
 {
     m_Phase = EPhase.Free;
     m_GizmoCube.gameObject.SetActive(false);
     m_GizmoCube.CubeSize = IntVector3.One;
     VCEditor.Instance.m_UI.EnableFunctions();
     VCEditor.s_ProtectLock0 = false;
 }
Пример #11
0
		internal static void OnAction(EPhase phase) {
			if (!Enabled || (phase != NextPhase)) {
				return;
			}

			switch (phase) {
				case EPhase.Unknown:
					break;
				case EPhase.Start:
					Logging.LogGenericInfoWithoutStacktrace("Hello there! I noticed that you're using ASF Config Generator for the first time, so let me help you a bit.");
					break;
				case EPhase.Shown:
					Logging.LogGenericInfoWithoutStacktrace("You can now notice the main ASF Config Generator screen, it's really easy to use!");
					Logging.LogGenericInfoWithoutStacktrace("At the top of the window you can notice currently loaded configs, and 3 extra buttons for removing, renaming and adding new ones.");
					Logging.LogGenericInfoWithoutStacktrace("In the middle of the window you will be able to configure all config properties that are available for you.");
					if (!Runtime.IsRunningOnMono) {
						Logging.LogGenericInfoWithoutStacktrace("In the top right corner you can find help button [?] which will redirect you to ASF wiki where you can find more information.");
						Logging.LogGenericInfoWithoutStacktrace("Please click the help button to continue.");
					} else {
						Logging.LogGenericInfoWithoutStacktrace("Please visit ASF wiki if you're in doubt - you can find more information there.");
						Logging.LogGenericInfoWithoutStacktrace("Alright, let's start configuring our ASF. Click on the plus [+] button to add your first steam account to ASF!");
						NextPhase = EPhase.HelpFinished;
					}
					break;
				case EPhase.Help:
					Logging.LogGenericInfoWithoutStacktrace("Well done! On ASF wiki you can find detailed help about every config property you're going to configure in a moment.");
					break;
				case EPhase.HelpFinished:
					Logging.LogGenericInfoWithoutStacktrace("Alright, let's start configuring our ASF. Click on the plus [+] button to add your first steam account to ASF!");
					break;
				case EPhase.BotNickname:
					Logging.LogGenericInfoWithoutStacktrace("Good job! You'll be asked for your bot name now. A good example would be a nickname that you're using for the steam account you're configuring right now, or any other name of your choice which will be easy for you to connect with bot instance that is being configured. Please don't use spaces in the name.");
					break;
				case EPhase.BotNicknameFinished:
					Logging.LogGenericInfoWithoutStacktrace("As you can see your bot config is now ready to configure!");
					Logging.LogGenericInfoWithoutStacktrace("First thing that you want to do is switching \"Enabled\" property from False to True, try it!");
					break;
				case EPhase.BotEnabled:
					Logging.LogGenericInfoWithoutStacktrace("Excellent! Now your bot instance is enabled. You need to configure at least 2 more config properties - \"SteamLogin\" and \"SteamPassword\". The tutorial will continue after you're done with it. Remember to visit ASF wiki by clicking the help icon if you're unsure how given property should be configured!");
					break;
				case EPhase.BotReady:
					Logging.LogGenericInfoWithoutStacktrace("If the data you put is proper, then your bot is ready to run! We need to do only one more thing now. Visit global ASF config, which is labelled as \"ASF\" on your config tab.");
					break;
				case EPhase.GlobalConfigOpened:
					Logging.LogGenericInfoWithoutStacktrace("While bot config affects only given bot instance you're configuring, global config affects whole ASF process, including all configured bots.");
					Logging.LogGenericInfoWithoutStacktrace("In order to fully configure your ASF, I suggest to fill \"SteamOwnerID\" property. Remember, if you don't know what to put, help button is always there for you!");
					break;
				case EPhase.GlobalConfigReady:
					Logging.LogGenericInfoWithoutStacktrace("Your ASF is now ready! Simply launch ASF process by double-clicking ASF.exe binary and if you did everything properly, you should now notice that ASF logs in on your account and starts farming. If you have SteamGuard or 2FA authorization enabled, ASF will ask you for that once");
					Logging.LogGenericInfoWithoutStacktrace("Congratulations! You've done everything that is needed in order to make ASF \"work\". I highly recommend reading the wiki now, as ASF offers some really neat features for you to configure, such as offline farming or deciding upon most efficient cards farming algorithm.");
					Logging.LogGenericInfoWithoutStacktrace("If you'd like to add another steam account for farming, simply click the plus [+] button and add another instance. You can also rename bots [~] and remove them [-]. Good luck!");
					Enabled = false;
					break;
			}

			NextPhase++;
		}
Пример #12
0
            public override bool load(List <property_t> properties)
            {
                bool loaded = base.load(properties);

                try
                {
                    for (int i = 0; i < properties.Count; ++i)
                    {
                        property_t p = properties[i];

                        if (p.name == "BinaryOperator")
                        {
                            if (p.value == "Or")
                            {
                                this.m_bAnd = false;
                            }
                            else if (p.value == "And")
                            {
                                this.m_bAnd = true;
                            }
                            else
                            {
                                Debug.Check(false);
                            }
                        }
                        else if (p.name == "Phase")
                        {
                            if (p.value == "Enter")
                            {
                                this.m_phase = EPhase.E_ENTER;
                            }
                            else if (p.value == "Update")
                            {
                                this.m_phase = EPhase.E_UPDATE;
                            }
                            else if (p.value == "Both")
                            {
                                this.m_phase = EPhase.E_BOTH;
                            }
                            else
                            {
                                Debug.Check(false);
                            }

                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.Check(false, ex.Message);
                    loaded = false;
                }

                return(loaded);
            }
Пример #13
0
 public void AddGameInfo(EPhase phase, int troopsToDeploy = 0)
 {
     gameManager.Actions.Add(new GameAction
         {
             Player = gameManager.CurrentPlayer,
             Phase = phase,
             TroopsToDeploy = troopsToDeploy,
             Turn = gameManager.Turn
         });
 }
 private void NextPhase()
 {
     ephase += 1;
     for (int index = 0; index < this.ToNextPhase.Length; index++)
     {
         this.ct文字アニメ用[index].n現在の値 = 0;
         this.ct文字アニメ用[index].t時間Reset();
         this.ToNextPhase[index] = false;
     }
 }
Пример #15
0
 public void AddGameInfo(EPhase phase, int troopsToDeploy = 0)
 {
     gameManager.Actions.Add(new GameAction
     {
         Player         = gameManager.CurrentPlayer,
         Phase          = phase,
         TroopsToDeploy = troopsToDeploy,
         Turn           = gameManager.Turn
     });
 }
Пример #16
0
        private void MoveState(EPhase phase)
        {
            if (phase != Phase)
            {
                Debug.Info("Phase: " + phase.ToString());
            }

            Phase = phase;
            ProcessPhase();
        }
Пример #17
0
            public override bool load(List<property_t> properties)
            {
                bool loaded = base.load(properties);

                try
                {
                    for (int i = 0; i < properties.Count; ++i)
                    {
                        property_t p = properties[i];
                        if (p.name == "BinaryOperator")
                        {
                            if (p.value == "Or")
                            {
                                this.m_bAnd = false;
                            }
                            else if (p.value == "And")
                            {
                                this.m_bAnd = true;
                            }
                            else
                            {
                                Debug.Check(false);
                            }
                        }
                        else if (p.name == "Phase")
                        {
                            if (p.value == "Enter")
                            {
                                this.m_phase = EPhase.E_ENTER;
                            }
                            else if (p.value == "Update")
                            {
                                this.m_phase = EPhase.E_UPDATE;
                            }
                            else if (p.value == "Both")
                            {
                                this.m_phase = EPhase.E_BOTH;
                            }
                            else
                            {
                                Debug.Check(false);
                            }

                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.Check(false, ex.Message);
                    loaded = false;
                }

                return loaded;
            }
Пример #18
0
    public void EndAssaultPhase()
    {
        if (CurrentPhase == EPhase.assault)
        {
            CurrentPhase = EPhase.endAssault;

            onEndAssaultPhase?.Invoke();

            Invoke("StartStrategicPhase", 1);
        }
    }
Пример #19
0
    public void EndStrategicPhase()
    {
        if (CurrentPhase == EPhase.strategic)
        {
            CurrentPhase = EPhase.endStrategic;

            onEndStrategicPhase?.Invoke();

            Invoke("StartAssaultPhase", 1);
        }
    }
Пример #20
0
    void Awake()
    {
        mInstance = this;

        if (!m_AwalysOn)
        {
            m_Phase = EPhase.fadeOut;
        }

        SetAlpha(bgDefaultAlpha);
        mHintCtrl.onAddShowingMsg += OnTipListAddMsg;
    }
Пример #21
0
        internal static void OnAction(EPhase phase)
        {
            if (!Enabled || (phase != NextPhase))
            {
                return;
            }

            switch (phase)
            {
            case EPhase.Unknown:
            case EPhase.Finished:
                break;

            case EPhase.Start:
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialStart);
                break;

            case EPhase.Shown:
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormShown);
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormBotsManagementButtons);
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormConfigurationWindow);

                if (!Runtime.IsRunningOnMono)
                {
                    Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormHelpButton);
                }

                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormConfigurationWiki);
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialMainFormFinished);

                break;

            case EPhase.BotNickname:
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialNewBotFormShown);
                break;

            case EPhase.BotNicknameFinished:
                Logging.LogGenericInfoWithoutStacktrace(string.Format(CGStrings.TutorialNewBotFormFinished, nameof(BotConfig.Enabled)));
                break;

            case EPhase.BotEnabled:
                Logging.LogGenericInfoWithoutStacktrace(string.Format(CGStrings.TutorialBotFormEnabled, nameof(BotConfig.SteamLogin), nameof(BotConfig.SteamPassword)));
                break;

            case EPhase.BotReady:
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialBotFormReady);
                Logging.LogGenericInfoWithoutStacktrace(CGStrings.TutorialFinished);
                Enabled = false;
                break;
            }

            NextPhase++;
        }
Пример #22
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 internal PointerEvent(int id, int x, int y, EPhase phase, EType type, float tiltX = 0f, float tiltY = 0f, float pressure = 0f)
 {
     Id       = id;
     ScreenX  = x;
     ScreenY  = y;
     Phase    = phase;
     Type     = type;
     TiltX    = tiltX;
     TiltY    = tiltY;
     Pressure = pressure;
     Frame    = UnityEngine.Time.frameCount;
     Time     = UnityEngine.Time.realtimeSinceStartup;
 }
Пример #23
0
        public void SetPhase(EPhase value, bool forced = false)
        {
            if (m_Phase == value && !forced)
            {
                return;
            }

            SetEnabled(onNoneGameObject, value == EPhase.None);
            SetEnabled(onSelectedGameObject, value == EPhase.Selected);
            SetEnabled(onActiveGameObject, value == EPhase.Active);

            m_Phase = value;
        }
Пример #24
0
    void OnTipListAddMsg()
    {
        if (!m_AwalysOn)
        {
            if (m_Phase == EPhase.fadeOut)
            {
                m_CurTime = Mathf.Max(0, fadeTime - m_CurTime);
            }

            m_Phase           = EPhase.fadeIn;
            m_FadeInNextPhase = EPhase.keep;
            m_CurKeepOutTime  = 0;
        }
    }
Пример #25
0
    void Update()
    {
        //if (Input.GetKeyDown(KeyCode.K))
        //{
        //    AddOneHint("This Is Test Message");
        //}

        if (m_Phase == EPhase.fadeIn)
        {
            m_CurTime += Time.deltaTime;

            SetAlpha(Mathf.Clamp01(m_CurTime / fadeTime));

            if (m_CurTime > fadeTime)
            {
                m_Phase   = m_FadeInNextPhase;
                m_CurTime = 0;
            }
        }
        else if (m_Phase == EPhase.fadeOut)
        {
            m_CurTime += Time.deltaTime;

            SetAlpha(Mathf.Clamp01(1 - m_CurTime / fadeTime));

            if (m_CurTime > fadeTime)
            {
                m_Phase   = EPhase.none;
                m_CurTime = 0;

                mHintCtrl.ClearMsg();
            }
        }
        else if (m_Phase == EPhase.keep)
        {
            m_CurKeepOutTime += Time.deltaTime;
            m_CurTime         = fadeTime;

            if (m_CurKeepOutTime > keepOutTime)
            {
                m_CurKeepOutTime = 0;
                m_CurTime        = 0;
                m_Phase          = EPhase.fadeOut;
            }
        }
        else if (m_Phase == EPhase.Clear)
        {
            m_Phase = EPhase.none;
        }
    }
Пример #26
0
    private void Restart()
    {
        InitPiecesPosition();
        InitDicoOfPlayersPosition();
        Selector.SetActive(false);
        MovingSelector.SetActive(false);
        Ending.SetActive(false);

        pieceSelected      = Vector2.zero;
        textPlayer.text    = "White Player";
        isPLayerWhite      = true;
        nbBlackPiecePlaced = 0;
        nbWhitePiecePlaced = 0;
        phase = EPhase.PLACING;
        timeT = 0;
    }
Пример #27
0
    void Update()
    {
        if (m_Phase == EPhase.fadeIn)
        {
            m_CurTime += Time.deltaTime;

            SetAlpha(Mathf.Clamp01(m_CurTime / fadeTime));

            if (m_CurTime > fadeTime)
            {
                m_Phase   = m_FadeInNextPhase;
                m_CurTime = 0;
            }
        }
        else if (m_Phase == EPhase.fadeOut)
        {
            m_CurTime += Time.deltaTime;

            SetAlpha(Mathf.Clamp01(1 - m_CurTime / fadeTime));

            if (m_CurTime > fadeTime)
            {
                m_Phase   = EPhase.none;
                m_CurTime = 0;

                tipList.ClearMsg();
            }
        }
        else if (m_Phase == EPhase.keep)
        {
            m_CurKeepOutTime += Time.deltaTime;
            m_CurTime         = fadeTime;

            if (m_CurKeepOutTime > keepOutTime)
            {
                m_CurKeepOutTime = 0;
                m_CurTime        = 0;
                m_Phase          = EPhase.fadeOut;
            }
        }
        else if (m_Phase == EPhase.Clear)
        {
            m_Phase = EPhase.none;
        }
    }
Пример #28
0
    void Awake()
    {
        if (m_AwalysOn)
        {
            trumptNormSprite.gameObject.SetActive(false);
            trumptSelectSprite.gameObject.SetActive(true);
        }
        else
        {
            trumptNormSprite.gameObject.SetActive(true);
            trumptSelectSprite.gameObject.SetActive(false);
            m_Phase = EPhase.fadeOut;
        }

        SetAlpha(bgDefaultAlpha);

        tipList.onAddShowingMsg += OnTipListAddMsg;
    }
Пример #29
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 internal PointerEvent(ref Touch touch)
 {
     Id      = touch.fingerId;
     ScreenX = (int)touch.position.x;
     ScreenY = (int)touch.position.y;
     Phase   = touch.phase == TouchPhase.Began ? EPhase.Began
         : touch.phase == TouchPhase.Moved ? EPhase.Moved
         : touch.phase == TouchPhase.Stationary ? EPhase.Stationary
         : EPhase.Ended;
     Type = touch.type == TouchType.Direct ? EType.Touch
         : touch.type == TouchType.Stylus ? EType.Stylus
         : EType.Others;
     TiltX    = touch.azimuthAngle * Mathf.Deg2Rad;
     TiltY    = touch.altitudeAngle * Mathf.Deg2Rad;
     Pressure = touch.pressure;
     Frame    = UnityEngine.Time.frameCount;
     Time     = UnityEngine.Time.unscaledTime;
 }
Пример #30
0
    // Select and remove Opponent piece
    private void RemoveOpponentPiece()
    {
        GameObject pieceToRemove = null;

        info.text = "Remove Opponent's piece";
        Vector2 mousePosition = MouseSelector();

        if (mousePosition != Vector2.zero && dicoOfPlayerPosition[mousePosition] == GetOpponent())
        {
            Selector.transform.position = mousePosition;
            Selector.SetActive(true);
            if (Input.GetMouseButtonDown(0))
            {
                pieceToRemove = FindPieceWithPosition(mousePosition, GetOpponent());
                if (pieceToRemove != null)
                {
                    dicoOfPlayerPosition[mousePosition] = EPlayer.EMPTY;
                    if (GetPlayer() == EPlayer.WHITE)
                    {
                        pieceToRemove.transform.position = listWhiteStartPiecesPosition[nbBlackPiecePlaced - 1];
                        nbBlackPiecePlaced--;
                    }
                    else
                    {
                        pieceToRemove.transform.position = listBlackStartPiecesPosition[nbWhitePiecePlaced - 1];
                        nbWhitePiecePlaced--;
                    }
                    if (nbWhitePiecePlaced == 2 || nbBlackPiecePlaced == 2)
                    {
                        phase = EPhase.ENDING;
                    }
                    else
                    {
                        phase         = EPhase.MOVING;
                        isPLayerWhite = !isPLayerWhite;
                        pieceSelected = Vector2.zero;
                    }
                    info.text = "";
                    MovingSelector.SetActive(false);
                    Selector.SetActive(false);
                }
            }
        }
    }
Пример #31
0
            public override bool load(List<property_t> properties)
        {
            bool loaded = base.load(properties);

            try
            {
                foreach(property_t p in properties)
                {
                    if (p.name == "Phase")
                    {
                        if (p.value == "Success")
                        {
                            this.m_phase = EPhase.E_SUCCESS;

                        }
                        else if (p.value == "Failure")
                        {
                            this.m_phase = EPhase.E_FAILURE;

                        }
                        else if (p.value == "Both")
                        {
                            this.m_phase = EPhase.E_BOTH;

                        }
                        else
                        {
                            Debug.Check(false);
                        }

                        break;
                    }
                }

            }
            catch (Exception ex)
            {
                Debug.Check(false, ex.Message);
                loaded = false;
            }

            return loaded;
        }
Пример #32
0
    // Update is called once per frame
    void Update()
    {
        timeT += Time.deltaTime;
        if (isPLayerWhite)
        {
            textPlayer.text  = "White Player";
            textPlayer.color = Color.white;
        }
        else
        {
            textPlayer.text  = "Black Player";
            textPlayer.color = Color.black;
        }
        Selector.SetActive(false);
        MovingSelector.SetActive(false);

        Vector2 mousePosition = MouseSelector();

        if (phase != EPhase.PLACING && ImpossibleToMove(GetPlayer()))
        {
            phase         = EPhase.ENDING;
            isPLayerWhite = !isPLayerWhite;
        }

        switch (phase)
        {
        case EPhase.PLACING: Place(mousePosition);
            break;

        case EPhase.MOVING: Move(mousePosition);
            break;

        case EPhase.REMOVING: RemoveOpponentPiece();
            break;

        case EPhase.FLYING: Fly(mousePosition);
            break;

        case EPhase.ENDING: End();
            break;
        }
    }
Пример #33
0
            public override bool load(List <property_t> properties)
            {
                bool loaded = base.load(properties);

                try
                {
                    for (int i = 0; i < properties.Count; ++i)
                    {
                        property_t p = properties[i];

                        if (p.name == "Phase")
                        {
                            if (p.value == "Success")
                            {
                                this.m_phase = EPhase.E_SUCCESS;
                            }
                            else if (p.value == "Failure")
                            {
                                this.m_phase = EPhase.E_FAILURE;
                            }
                            else if (p.value == "Both")
                            {
                                this.m_phase = EPhase.E_BOTH;
                            }
                            else
                            {
                                Debug.Check(false);
                            }

                            break;
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.Check(false, ex.Message);
                    loaded = false;
                }

                return(loaded);
            }
Пример #34
0
    private IEnumerator ShowResult()
    {
        ShowEnemyCards();
        resultText.text = result.ToString();
        resultText.gameObject.SetActive(true);
        resultText.color = Color.clear;
        float perc = 0;

        while (perc < 1)
        {
            resultText.color = Color.Lerp(Color.clear, Color.white, perc);
            perc            += Time.deltaTime;
            yield return(null);
        }
        yield return(new WaitForSeconds(1.5f));

        perc = 0;
        while (perc < 1)
        {
            resultText.color = Color.Lerp(Color.clear, Color.white, 1 - perc);
            perc            += Time.deltaTime;
            yield return(null);
        }
        resultText.gameObject.SetActive(false);
        if (result == EResult.DRAW)
        {
            Restart();
        }
        else
        {
            if (result == EResult.WIN)
            {
                GameState.CallResult = true;
            }
            yield return(new WaitForSeconds(1.2f));

            phase = EPhase.CLOSE;
            gameObject.SetActive(false);
        }
    }