public override void OnInspectorGUI() { GUILayout.Space(6f); NGUIEditorTools.SetLabelWidth(120f); TweenFOV tw = target as TweenFOV; GUI.changed = false; float from = EditorGUILayout.Slider("From", tw.from, 1f, 180f); float to = EditorGUILayout.Slider("To", tw.to, 1f, 180f); if (GUI.changed) { NGUIEditorTools.RegisterUndo("Tween Change", tw); tw.from = from; tw.to = to; if (preview) { tw.Sample(tw.tweenFactor, false); } NGUITools.SetDirty(tw); } DrawCommonProperties(); }
public static TweenFOV Begin(GameObject go, float duration, float to) { TweenFOV nfov = UITweener.Begin <TweenFOV>(go, duration); nfov.from = nfov.fov; nfov.to = to; if (duration <= 0f) { nfov.Sample(1f, true); nfov.enabled = false; } return(nfov); }
// Token: 0x0600345E RID: 13406 RVA: 0x00109668 File Offset: 0x00107A68 public static TweenFOV Begin(GameObject go, float duration, float to) { TweenFOV tweenFOV = UITweener.Begin <TweenFOV>(go, duration); tweenFOV.from = tweenFOV.value; tweenFOV.to = to; if (duration <= 0f) { tweenFOV.Sample(1f, true); tweenFOV.enabled = false; } return(tweenFOV); }
/// <summary> /// Start the tweening operation. /// </summary> static public TweenFOV Begin (GameObject go, float duration, float to) { TweenFOV comp = UITweener.Begin<TweenFOV>(go, duration); comp.from = comp.fov; comp.to = to; if (duration <= 0f) { comp.Sample(1f, true); comp.enabled = false; } return comp; }