InformationSaveAndAudioCore_Over
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user