GameData.cs 773 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. [System.Serializable]
  4. public class SaveVector3
  5. {
  6. public float x, y, z;
  7. public SaveVector3(Vector3 position)
  8. {
  9. x = position.x;
  10. y = position.y;
  11. z = position.z;
  12. }
  13. public Vector3 ToVector3() => new Vector3(x, y, z);
  14. }
  15. [System.Serializable]
  16. public class GameData
  17. {
  18. public int mapSeed;
  19. public float remainingTimer;
  20. public int orbsCollected;
  21. public float[] playerPos;
  22. public float[] playerRot;
  23. // Use the wrapper instead of float[]
  24. public List<SaveVector3> orbPositions = new List<SaveVector3>();
  25. public List<SaveVector3> enemyPositions = new List<SaveVector3>();
  26. public List<int> enemyStates = new List<int>();
  27. public float masterVolume;
  28. }