public static ScaleSingle Create(Property p, float o, Axis3 a, FloatCallback c) { GameObject g = null; switch (a) { case Axis3.X: g = GameObject.Instantiate(x.Object); break; case Axis3.Y: g = GameObject.Instantiate(y.Object); break; case Axis3.Z: g = GameObject.Instantiate(z.Object); break; default: return(null); } ScaleSingle m = g.AddComponent <ScaleSingle>(); m.property = p; m.origin = o; m.DragEvent = c; return(m); }
public FloatAnswerListenerBridge(AnswerListener <float> _listener) { listener = _listener; callback = (float answer) => { _listener.OnAnswerUpdate(answer); }; }
public static ScaleAll Create(Property p, float o, FloatCallback c) { ScaleAll m = GameObject.Instantiate(a.Object).AddComponent <ScaleAll>(); m.property = p; m.temp = m.origin = o; m.DragEvent = c; return(m); }
public static IEnumerator AnimationCoroutine(AnimationCurve curve, float time, FloatCallback callback, Callback onFinish = null) { float t = time; while (t > 0) { t = Mathf.Max(t - Time.deltaTime, 0); callback(curve.Evaluate(1 - t / time)); yield return(null); } if (onFinish != null) { onFinish(); } }
private static extern bool getChuckFloat(System.UInt32 chuckID, System.String name, FloatCallback callback);
private static extern bool getGlobalAssociativeFloatArrayValue(System.UInt32 chuckID, System.String name, System.String key, FloatCallback callback);
private static extern bool getGlobalFloatArrayValue(System.UInt32 chuckID, System.String name, System.UInt32 index, FloatCallback callback);
private static extern void GetFloatValues(FloatCallback cb);
/// <summary> /// This function will only update the local player, not all players. Sets the float callback function for this object. /// </summary> /// <param name="_yourFloatFunction">The function that will be used to perform an action whenever a user sends a float</param> /// <example><code> /// void Start() /// { /// gameobject.GetComponent<ASL.ASLObject>()._LocallySetFloatCallback(UserDefinedFunction) /// } /// public void UserDefinedFunction(string _id, float[] f) /// { /// //Update some value for all users based on f. /// //Example: /// playerHealth = f[0]; //Where playerHealth is shown to kept track/shown to all users /// } ///</code></example> public void _LocallySetFloatCallback(FloatCallback _yourFloatFunction) { m_FloatCallback = _yourFloatFunction; }
public static extern float ExecuteFloatCallback(FloatCallback callback, float param);
private extern static bool AskForNumericAnswer(System.IntPtr helperFactory, System.IntPtr bAnlys, System.IntPtr grammarBlock, FloatCallback floatCallback);