public DKTrophyCollectedState(DKTrophy item) { this.item = item; if (counter++ == 1) { SoundPool.PlaySound(Sound.CollectibleTrophy1); } else if (counter++ == 2) { SoundPool.PlaySound(Sound.CollectibleTrophy2); } else if (counter++ == 3) { SoundPool.PlaySound(Sound.CollectibleTrophy3); } else if (counter++ > 3) { SoundPool.PlaySound(Sound.CollectibleTrophyAll); } PhysicsWorld.Instance.DestroyBody(this.item.Body); WorldManager.Instance.RemoveObject(this.item); }
public DKTrophyIdleState(DKTrophy item) { this.item = item; this.item.Sprite = ItemSpriteFactory.Instance.CreateDKTrophySprite(); }