| | 1 | | using System.Collections.Generic; |
| | 2 | | using System.Linq; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class AvatarEditorHUDModel |
| | 6 | | { |
| | 7 | | public WearableItem bodyShape; |
| 46 | 8 | | public List<WearableItem> wearables = new List<WearableItem>(); |
| | 9 | | public Color hairColor; |
| | 10 | | public Color skinColor; |
| | 11 | | public Color eyesColor; |
| | 12 | |
|
| | 13 | | public AvatarModel ToAvatarModel() |
| | 14 | | { |
| 122 | 15 | | return new AvatarModel() |
| | 16 | | { |
| | 17 | | bodyShape = bodyShape.id, |
| 768 | 18 | | wearables = wearables.Select(x => x.id).ToList(), |
| | 19 | | hairColor = hairColor, |
| | 20 | | skinColor = skinColor, |
| | 21 | | eyeColor = eyesColor |
| | 22 | | }; |
| | 23 | | } |
| | 24 | |
|
| | 25 | | public WearableItem GetWearable(string category) |
| | 26 | | { |
| 91 | 27 | | return wearables.FirstOrDefault(x => x.data.category == category); |
| | 28 | | } |
| | 29 | | } |