private void StartNewLevel() { if (!playing) { return; } BallManager.ExplodeBalls(); BallManager.ExplodeBalls(); BallManager.ExplodeBalls(); Level += 1; GameModeText.SetText("Classical : Level " + Level); CancelAllInvokes(); StartRecursiveRandomBallGenerator(GenerateTimingFromLevel()); if (Level != 1) { SpawnRandomSpecialItem(); } if (playing) { Invoke("StartNewLevel", 60); } }
private void use() { Destroy(gameObject, 2); BallManager.ExplodeBalls(); Invoke("CallExplode", 0.5f); Invoke("CallExplode", 1f); //cannot destroy object otherwise invokes wont work sound.Play(); }
private void CallExplode() { Debug.Log("callexplode in usebomb"); BallManager.ExplodeBalls(); }