Exemplo n.º 1
0
    public void DisplayGameOverMenu()
    {
        _isTransitionningGameOver = true;

        _gameOverMenu.SetActive(true);
        _fade_background.gameObject.SetActive(true);
        _gameOverMenu.Open();

        _pauseButton.FindSelectableOnDown().Select();
        _gameOverButton.Select();
        GameManager.inst.State = GameManager.GameState.GameOver;

        TimeManager.timeScale = 0.0f;
        SoundManager.Instance.PauseSound();

        //_compatibility.gameObject.SetActive(true);
        //_compatibility.Open();

        Sequence sequence = DOTween.Sequence();

        sequence.AppendInterval(.5f);
        sequence.AppendCallback(() => {
            _isTransitionningGameOver = false;
        });
        sequence.Play();
    }
Exemplo n.º 2
0
 public void OnTriggerEnter2D(Collider2D o)
 {
     if (o.gameObject.CompareTag("Player"))
     {
         inside = true;
         anim.Open(animation, 0);
     }
 }
Exemplo n.º 3
0
    public void ShowGameover()
    {
        ButtonScreenFill f = FindFiller("gameover");

        f.icon.SetActive(true);

        ButtonInteractive("gameover", true);
        _active("gameover", true);
        FindFiller("gameover_shop").Reset();
        FindFiller("gameover_claw").Reset();
        gameoverScoreText.text = "Score\n<size=60%>0";
        anim.Close("game", 0);
        anim.Open("gameover", 3);

        //Move the walls
        StartCoroutine(MoveWalls(false));
    }
Exemplo n.º 4
0
    public void DisplayPauseMenu()
    {
        _pauseMenu.SetActive(true);
        _fade_background.gameObject.SetActive(true);
        _pauseMenu.Open();
        _pauseButton.FindSelectableOnDown().Select();
        _pauseButton.Select();
        GameManager.inst.State = GameManager.GameState.Paused;

        TimeManager.timeScale = 0.0f;
        SoundManager.Instance.PauseSound();

        _compatibility.gameObject.SetActive(true);
        _compatibility.Open();
    }
Exemplo n.º 5
0
    public void Start()
    {
        anim          = GetComponent <UIAnimation>();
        animFramework = GetComponent <UIAnimationFramework>();
        anim.Open("menu", 0);
        offers = GetComponent <OfferManager>();

        offers.Init();


        List <SpriteRenderer> walls_renders = new List <SpriteRenderer>();

        walls_renders.Add(wallLeft1.GetComponent <SpriteRenderer>());
        walls_renders.Add(wallLeft2.GetComponent <SpriteRenderer>());
        walls_renders.Add(wallRight1.GetComponent <SpriteRenderer>());
        walls_renders.Add(wallRight2.GetComponent <SpriteRenderer>());
        walls = walls_renders.ToArray();
    }
Exemplo n.º 6
0
 void Start()
 {
     manager = FindObjectOfType <SpawnManager>();
     anim.Open("lobby", 1);
 }