//------------------------------------------------------------ // Game Framework // Copyright © 2013-2021 loyalsoft. All rights reserved. // Homepage: http://www.game7000.com/ // Feedback: http://www.game7000.com/ //------------------------------------------------------------ using GameFramework; namespace UnityGameFramework.Runtime { /// /// System.Single 变量类。 /// public sealed class VarSingle : Variable { /// /// 初始化 System.Single 变量类的新实例。 /// public VarSingle() { } /// /// 从 System.Single 到 System.Single 变量类的隐式转换。 /// /// 值。 public static implicit operator VarSingle(float value) { VarSingle varValue = ReferencePool.Acquire(); varValue.Value = value; return varValue; } /// /// 从 System.Single 变量类到 System.Single 的隐式转换。 /// /// 值。 public static implicit operator float(VarSingle value) { return value.Value; } } }