Global Game Jam 2021
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
704 B

3 years ago
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.InputSystem;
  5. [System.Serializable]
  6. public class PlayerData : ScriptableObject
  7. {
  8. public static uint PlayerCount;
  9. public uint ID { get; private set; }
  10. public Color Color { get; private set; }
  11. public int Score;
  12. public UnityEngine.InputSystem.PlayerInput Input { get; private set; }
  13. public static PlayerData Initialise(uint ID, Color color, UnityEngine.InputSystem.PlayerInput input)
  14. {
  15. PlayerData data = ScriptableObject.CreateInstance<PlayerData>();
  16. data.Color = color;
  17. data.ID = ID;
  18. data.Input = input;
  19. return data;
  20. }
  21. }