using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MetaClient
{
    public class RoleCustomData
    {
        public Dictionary<int, PartData> bodyList;
        public Dictionary<int, PartData> faceList;
        public Dictionary<string, Vector3> orginLocalScaleList;
        public Dictionary<string, Vector3> orginLocalPositionList;
        public Dictionary<string, Quaternion> orginLocalRotationList;

        public Dictionary<int, float> changedValueList;
        public Dictionary<string, Vector3> changedScaleList;
        public Dictionary<string, Vector3> changedPositionList;
        public Dictionary<string, Vector3> changedRotationList;

        public RoleCustomData ()
        {
            bodyList = new Dictionary<int, PartData>();
            faceList = new Dictionary<int, PartData>();
            orginLocalScaleList = new Dictionary<string, Vector3>();
            orginLocalPositionList = new Dictionary<string, Vector3>();
            orginLocalRotationList = new Dictionary<string, Quaternion>();

            changedValueList = new Dictionary<int, float>();
            changedScaleList = new Dictionary<string, Vector3>();
            changedPositionList = new Dictionary<string, Vector3>();
            changedRotationList = new Dictionary<string, Vector3>();
        }
    }

    public class PartData
    {
        public int id;

        public EditableBodyPart part;

        public ModifyType modifyType;

        public float floatValue;

        public Vector3 vecValue;

        public string pathValue;

        public string[] bones;

        public float minChangeValue;
        public float maxChangeValue;
        public Vector3 scaleChange;
        public Vector3 positionChange;
        public Vector3 rotationChange;

        public PartData(int _id,EditableBodyPart _part, ModifyType _modifyType)
        {
            id = _id;
            part = _part;
            modifyType = _modifyType;
            floatValue = 1;
            vecValue = Vector3.zero;
            pathValue = "";
        }

        public PartData(int _id,string[] _bones,float _min,float _max,Vector3 _scaleChange,Vector3 _posChange,Vector3 _rotChange)
        {
            id = _id;
            floatValue = 1;
            vecValue = Vector3.zero;
            pathValue = "";

            bones = _bones;
            minChangeValue = _min;
            maxChangeValue = _max;
            scaleChange = _scaleChange;
            positionChange = _posChange;
            rotationChange = _rotChange;
        }
    }
}