public DKBananaCollectedState(DKBanana item) { this.item = item; ScoreSystem.addBananas(1); SoundPool.PlaySound(Sound.CollectibleBanana); item.Body.Velocity = new Vector2(X_COLLECTED_SPEED, Y_COLLECTED_SPEED); }
public DKBananaGroupCollectedState(DKBananaGroup item) { this.item = item; item.Body.Velocity = new Vector2(X_COLLECTED_SPEED, Y_COLLECTED_SPEED); ScoreSystem.addBananas(10); SoundPool.PlaySound(Sound.CollectibleBananaGroup); //Should probably have some form of garbage collection for collectibles off the screen to pull them from WM & PW //PhysicsWorld.Instance.DestroyBody(this.item.Body); //WorldManager.RemoveObject(this.item); }