InformationSaveAndAudioCore_Over
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//=======================================================
|
||||
// 作者:王则昆
|
||||
// 描述:
|
||||
//=======================================================
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.InformationSave
|
||||
{
|
||||
public static class AnchoredPositionExtension
|
||||
{
|
||||
public static AnchoredPosition.Information GetAnchoredPositionInformation(this RectTransform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<AnchoredPosition>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetAnchoredPosition(this RectTransform tf, string desc)
|
||||
{
|
||||
return GetAnchoredPositionInformation(tf, desc).anchoredPosition.SetVector2Data();
|
||||
}
|
||||
|
||||
public static void SetAnchoredPosition(this RectTransform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<AnchoredPosition>().Set(desc);
|
||||
}
|
||||
|
||||
public static AnchoredPosition.Information GetAnchoredPositionInformation(this Transform tf, string desc)
|
||||
{
|
||||
return tf.GetComponent<AnchoredPosition>()._list.Find(n => n.desc == desc);
|
||||
}
|
||||
|
||||
public static Vector3 GetAnchoredPosition(this Transform tf, string desc)
|
||||
{
|
||||
return GetAnchoredPositionInformation(tf, desc).anchoredPosition.SetVector2Data();
|
||||
}
|
||||
|
||||
public static void SetAnchoredPosition(this Transform tf, string desc)
|
||||
{
|
||||
tf.GetComponent<AnchoredPosition>().Set(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user