mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-18 17:34:45 +01:00
19 lines
718 B
C#
19 lines
718 B
C#
using UnityEngine;
|
|
using System.Collections;
|
|
|
|
namespace BehaviorDesigner.Runtime
|
|
{
|
|
[System.Serializable]
|
|
public class SharedTransform : SharedVariable
|
|
{
|
|
public Transform Value { get { return mValue; } set { if (mValue != value) { ValueChanged(); } mValue = value; } }
|
|
[SerializeField]
|
|
private Transform mValue;
|
|
|
|
public override object GetValue() { return mValue; }
|
|
public override void SetValue(object value) { mValue = (Transform)value; }
|
|
|
|
public override string ToString() { return (mValue == null ? "null" : mValue.name); }
|
|
public static implicit operator SharedTransform(Transform value) { return new SharedTransform { mValue = value }; }
|
|
}
|
|
} |