Exemple #1
0
    public void SeeBoardBtn()
    {
        // TileSelector.Instance.DeactiveAnyHighlight();
        gameOverFreezeMenu.SetupKeyCode(KeyCode.Escape);

        foreach (var item in gameOverFreezeMenu.BlockOtherFreezes)
        {
            item.gameObject.SetActive(false);
        }
        gameOverFreezeMenu.EnableMenuWithPause(false);
    }
Exemple #2
0
    public void LaunchGameOver()
    {
        if (end)
        {
            return;
        }
        end = true;
        OnCorrectEnds(this, EventArgs.Empty);
        Invoke((_) => gameOver?.EnableMenuWithPause(true), 0.2f);

        LockMovement = true;
    }
Exemple #3
0
    public void SetGameOver(Player[] loser)
    {
        GameObject   instanted = gameOverFreezeMenu.EnableMenuWithPause(true);
        GameOverMenu menu      = instanted.GetComponent <GameOverMenu>();

        TimerController.Instance.StopAllCoroutines();

        if (loser.Length > 1)
        {
            Player morePointsPlayer = loser.Aggregate((x, y) => x.Points > y.Points ? x : y);
            if (morePointsPlayer == GetOtherPlayer(morePointsPlayer))
            {
                menu.WinInformation.text = "Draw! Both players had the same number of points.";
                return;
            }
            menu.WinInformation.text = $"Draw! The more points had <b>{morePointsPlayer.Nickname}</b> player.";
            return;
        }
        // Team team = GetOtherPlayer(loser[0]).CurrentTeam;
        // string k = team == Team.Black ? "#1F1F1F" : "#C2C2C2";
        menu.WinInformation.text = $"<b>{GetOtherPlayer(loser[0]).Nickname}</b> as {GetOtherPlayer(loser[0]).CurrentTeam} team wins!";
    }
Exemple #4
0
    private void Start()
    {
        Cursor.visible = false;

        volume.m_Profile.TryGetSettings(out vignetteEffect);
        volume.m_Profile.TryGetSettings(out lensDistortion);
        volume.m_Profile.TryGetSettings(out depthOfField);

        LensDistortion.scale.value = 0.56f;
        VignetteBug.ResetValues();
        FishyEyeBug.ResetValues();
        BlindnessBug.ResetValues();


        PrefferedCameraZoom = virtualCam.m_Lens.FieldOfView;
        timeOnStart         = Time.time;
        if (gameOverManager != null)
        {
            gameOverManager.EnableMenuWithPause(false);
        }
        transform.position = StartRespPoint.position;
        StartingSnapshot.TransitionTo(.01f);
    }
Exemple #5
0
 private void OnPause()
 {
     pauseMenu?.EnableMenuWithPause(!pauseMenu.IsPaused);
 }
Exemple #6
0
 public void ResumeBtn()
 {
     pauseManager.EnableMenuWithPause(false);
 }
Exemple #7
0
 public void OnRetry()
 {
     gameOverManager.EnableMenuWithPause(false);
     SceneManager.LoadScene(SceneManager.GetActiveScene().name);
 }
Exemple #8
0
 public void ClickResumeBtn()
 {
     freezeMenu.EnableMenuWithPause(false);
 }
 protected new void OnEnable()
 {
     base.OnEnable();
     ownFreezeMenu?.EnableMenuWithPause(true);
 }