DataCharacter.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using KairoEngine.Inventory;
  5. namespace KairoEngine.CharacterSystem
  6. {
  7. [System.Serializable]
  8. public class DataCharacter
  9. {
  10. public string uniqueName;
  11. public string prefabName;
  12. public Vector3 position;
  13. public Quaternion rotation;
  14. public int hitpoints;
  15. public int maxHitpoints;
  16. public bool isDead = false;
  17. public ItemFirearmRef equipedItemRef;
  18. public List<ItemRef> itemList = new List<ItemRef>();
  19. public string objBodyName;
  20. public string objHairName;
  21. public string objBeardName;
  22. public int bodyMaterial;
  23. public List<DataBone> bones = new List<DataBone>();
  24. public DataCharacter(string uniqueName, string prefabName, Vector3 position, Quaternion rotation, int hitpoints, int maxHitpoints, bool isDead, ItemFirearmRef equipedItemRef, List<ItemRef> itemList)
  25. {
  26. this.uniqueName = uniqueName;
  27. this.prefabName = prefabName;
  28. this.position = position;
  29. this.rotation = rotation;
  30. this.hitpoints = hitpoints;
  31. this.maxHitpoints = maxHitpoints;
  32. this.isDead = isDead;
  33. this.equipedItemRef = equipedItemRef;
  34. this.itemList = itemList;
  35. }
  36. public void SetCharacterVisuals(string objBodyName, string objHairName, string objBeardName, int bodyMaterial)
  37. {
  38. this.objBodyName = objBodyName;
  39. this.objHairName = objHairName;
  40. this.objBeardName = objBeardName;
  41. this.bodyMaterial = bodyMaterial;
  42. }
  43. }
  44. }