28 lines
896 B
C#
28 lines
896 B
C#
using UnityEngine;
|
|
|
|
namespace Stary.Evo.InformationSave
|
|
{
|
|
public sealed class LocalPositionEulerAngles : AbstractInformation<LocalPositionEulerAngles.Information>
|
|
{
|
|
public override void Save(int index)
|
|
{
|
|
var tf = transform;
|
|
_list[index].localPosition =tf.localPosition.GetVector3Data();
|
|
_list[index].localEulerAngles = tf.localEulerAngles.GetVector3Data();
|
|
}
|
|
|
|
public override void Switch(int index)
|
|
{
|
|
var tf = transform;
|
|
tf.localPosition = _list[index].localPosition.SetVector3Data();
|
|
tf.localEulerAngles = _list[index].localEulerAngles.SetVector3Data();
|
|
}
|
|
|
|
[System.Serializable]
|
|
public sealed class Information : InformationBase
|
|
{
|
|
public Vector3Data localPosition;
|
|
public Vector3Data localEulerAngles;
|
|
}
|
|
}
|
|
} |