public void HandleGotBanana(BBanana banana) { CreateBananaExplodeEffect(banana); _bananaContainer.RemoveChild (banana); _bananas.Remove(banana); BMain.instance.score++; if(BMain.instance.score == 1) { _scoreLabel.text = "1 Banana"; } else { _scoreLabel.text = BMain.instance.score+" Bananas"; } FUnityParticleSystemNode particleNode = new FUnityParticleSystemNode(_particlePrefab, true); AddChild (particleNode); particleNode.x = banana.x; particleNode.y = banana.y; FSoundManager.PlaySound("BananaSound", 1.0f); }
public void HandleGotBanana(BBanana banana) { CreateBananaExplodeEffect(banana); _bananaContainer.RemoveChild(banana); _bananas.Remove(banana); BMain.instance.score++; if (BMain.instance.score == 1) { _scoreLabel.text = "1 Banana"; } else { _scoreLabel.text = BMain.instance.score + " Bananas"; } FUnityParticleSystemNode particleNode = new FUnityParticleSystemNode(_particlePrefab, true); AddChild(particleNode); particleNode.x = banana.x; particleNode.y = banana.y; FSoundManager.PlaySound("BananaSound", 1.0f); }