Esempio n. 1
0
    private void PrepareGame()
    {
        ActivatedBoost      = null;
        Score               = 0;
        stars               = 0;
        moveID              = 0;
        fieldBoards         = new List <FieldBoard>();
        transform.position += Vector3.down * 1000;
        // targetUIObject.SetActive(false);

        EnableMap(false);

        LoadLevel();

        CurrentSubLevel = 1;
        if (ProgressBarScript.Instance != null)
        {
            ProgressBarScript.Instance.InitBar();
        }

        if (levelData.limitType == LIMIT.MOVES)
        {
            InGameBoosts.Where(i => i.type == BoostType.ExtraMoves).ToList().ForEach(i => i.gameObject.SetActive(true));
            InGameBoosts.Where(i => i.type == BoostType.ExtraTime).ToList().ForEach(i => i.gameObject.SetActive(false));
        }
        else
        {
            InGameBoosts.Where(i => i.type == BoostType.ExtraMoves).ToList().ForEach(i => i.gameObject.SetActive(false));
            InGameBoosts.Where(i => i.type == BoostType.ExtraTime).ToList().ForEach(i => i.gameObject.SetActive(true));
        }

        OnEnterGame?.Invoke();
    }
Esempio n. 2
0
    /// <summary>
    /// Do not call this....
    /// </summary>
    public static void EnterGame()
    {
        onEnterGame.Invoke();

        Logger.LogDetail("Game::EnterGame: Enter game.");
    }