public override void OnEnter()
 {
     AnimatedChuzzles.Clear();
     Chuzzle.DropEventHandlers();
     Chuzzle.AnimationStarted += OnAnimationStarted;
     CreateNew();
 }
Esempio n. 2
0
 public override void OnEnter()
 {
     isAlreadyChangedState = false;
     AnimatedChuzzles.Clear();
     Chuzzle.DropEventHandlers();
     Chuzzle.AnimationStarted += OnAnimationStarted;
     CreateNew();
 }
Esempio n. 3
0
    public override void OnEnter()
    {
        AnimatedChuzzles.Clear();
        Chuzzle.DropEventHandlers();
        Chuzzle.AnimationStarted += OnAnimationStarted;

        var combinations = GamefieldUtility.FindCombinations(Gamefield.Level.ActiveChuzzles);

        if (!CheckForSpecial(combinations))
        {
            Gamefield.SwitchStateTo(Gamefield.WinRemoveCombinationState);
        }
    }
Esempio n. 4
0
    public override void OnEnter()
    {
        AnimatedChuzzles.Clear();
        Chuzzle.DropEventHandlers();
        Chuzzle.AnimationStarted += OnAnimationStarted;
        if (!Tutorial.isActive)
        {
            CheckPossibleCombinations();
        }


        if (!Gamefield.InvaderWasDestroyed)
        {
            InvaderChuzzle.Populate(Gamefield);
        }
        Gamefield.InvaderWasDestroyed = false;
    }
Esempio n. 5
0
    public override void OnEnter()
    {
        AnimatedChuzzles.Clear();
        Chuzzle.DropEventHandlers();
        Chuzzle.AnimationStarted += OnAnimationStarted;

        var anyCombination = GamefieldUtility.FindOnlyOneCombination(Gamefield.Level.ActiveChuzzles);

        if (anyCombination.Any())
        {
            StartCoroutine(RemoveCombinations());
        }
        else
        {
            Gamefield.SwitchStateTo(Gamefield.FieldState);
        }
    }
Esempio n. 6
0
    public override void OnEnter()
    {
        AnimatedChuzzles.Clear();
        Chuzzle.DropEventHandlers();
        Chuzzle.AnimationStarted += OnAnimationStarted;

        var powerUpChuzzles = Gamefield.Level.Chuzzles.Where(GamefieldUtility.IsPowerUp).ToArray();

        foreach (var ch in powerUpChuzzles)
        {
            ch.Destroy(true);
        }

        var combinations = GamefieldUtility.FindCombinations(Gamefield.Level.ActiveChuzzles);

        if (combinations.Any())
        {
            RemoveCombinations(combinations);
        }
        else if (!powerUpChuzzles.Any())
        {
            StartCoroutine(GameModeCheck());
        }
    }