// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved. namespace HutongGames.PlayMaker.Actions { [ActionCategory(ActionCategory.Math)] [Tooltip("Sets the value of an float variable using a integer value.")] public class SetFloatFromInt : FsmStateAction { [RequiredField] [UIHint(UIHint.Variable)] public FsmFloat floatVariable; public FsmInt intValue; public override void Reset() { floatVariable = null; intValue = null; } public override void OnEnter() { floatVariable.Value = (int)intValue.Value; Finish(); } public override void OnUpdate() { floatVariable.Value = intValue.Value; } } }