22 lines
628 B
C#
22 lines
628 B
C#
using UnityEngine;
|
|
|
|
namespace Stary.Evo.InformationSave
|
|
{
|
|
public static class PositionExtension
|
|
{
|
|
public static Position.Information GetPositionInformation(this Transform tf, string desc)
|
|
{
|
|
return tf.GetComponent<Position>()._list.Find(n => n.desc == desc);
|
|
}
|
|
|
|
public static Vector3 GetPosition(this Transform tf, string desc)
|
|
{
|
|
return GetPositionInformation(tf, desc).position.SetVector3Data();
|
|
}
|
|
|
|
public static void SetPosition(this Transform tf, string desc)
|
|
{
|
|
tf.GetComponent<Position>().Set(desc);
|
|
}
|
|
}
|
|
} |