AsteroidsGame.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using UnityEngine;
  2. namespace Photon.Pun.Demo.Asteroids
  3. {
  4. public class AsteroidsGame
  5. {
  6. public const float ASTEROIDS_MIN_SPAWN_TIME = 5.0f;
  7. public const float ASTEROIDS_MAX_SPAWN_TIME = 10.0f;
  8. public const float PLAYER_RESPAWN_TIME = 4.0f;
  9. public const int PLAYER_MAX_LIVES = 3;
  10. public const string PLAYER_LIVES = "PlayerLives";
  11. public const string PLAYER_READY = "IsPlayerReady";
  12. public const string PLAYER_LOADED_LEVEL = "PlayerLoadedLevel";
  13. public static Color GetColor(int colorChoice)
  14. {
  15. switch (colorChoice)
  16. {
  17. case 0: return Color.red;
  18. case 1: return Color.green;
  19. case 2: return Color.blue;
  20. case 3: return Color.yellow;
  21. case 4: return Color.cyan;
  22. case 5: return Color.grey;
  23. case 6: return Color.magenta;
  24. case 7: return Color.white;
  25. }
  26. return Color.black;
  27. }
  28. }
  29. }