22 lines
655 B
C#
22 lines
655 B
C#
|
|
using UnityEngine;
|
||
|
|
|
||
|
|
namespace Stary.Evo.InformationSave
|
||
|
|
{
|
||
|
|
public static class EulerAnglesExtension
|
||
|
|
{
|
||
|
|
public static EulerAngles.Information GetEulerAnglesInformation(this Transform tf, string desc)
|
||
|
|
{
|
||
|
|
return tf.GetComponent<EulerAngles>()._list.Find(n => n.desc == desc);
|
||
|
|
}
|
||
|
|
|
||
|
|
public static Vector3 GetEulerAngles(this Transform tf, string desc)
|
||
|
|
{
|
||
|
|
return GetEulerAnglesInformation(tf, desc).eulerAngles.SetVector3Data();
|
||
|
|
}
|
||
|
|
|
||
|
|
public static void SetEulerAngles(this Transform tf, string desc)
|
||
|
|
{
|
||
|
|
tf.GetComponent<EulerAngles>().Set(desc);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|