示例#1
0
    public void OnBomBomHided()
    {
        var newPowerUps   = new List <Chuzzle>();
        var usualChuzzles = Gamefield.Level.Chuzzles.Where(ch => !GamefieldUtility.IsPowerUp(ch)).ToList();

        for (var i = 0; i < Gamefield.GameMode.Turns; i++)
        {
            var newPowerUp = usualChuzzles[UnityEngine.Random.Range(0, usualChuzzles.Count())];
            newPowerUps.Add(newPowerUp);
            usualChuzzles.Remove(newPowerUp);
            if (!usualChuzzles.Any())
            {
                break;
            }
        }
        Gamefield.GameMode.Turns = 0;
        StartCoroutine(CreateNewPowerUps(newPowerUps.ToList()));
    }
示例#2
0
 public static bool IsPowerUp(this Chuzzle chuzzle)
 {
     return(GamefieldUtility.IsPowerUp(chuzzle));
 }