DemoInventory.cs 413 B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. namespace UnityEngine.Purchasing
  3. {
  4. [AddComponentMenu("")]
  5. public class DemoInventory : MonoBehaviour
  6. {
  7. public void Fulfill (string productId)
  8. {
  9. switch (productId) {
  10. case "100.gold.coins":
  11. Debug.Log ("You Got Money!");
  12. break;
  13. default:
  14. Debug.Log (
  15. string.Format (
  16. "Unrecognized productId \"{0}\"",
  17. productId
  18. )
  19. );
  20. break;
  21. }
  22. }
  23. }
  24. }