Esempio n. 1
0
                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);
                }
Esempio n. 2
0
 public FloatAnswerListenerBridge(AnswerListener <float> _listener)
 {
     listener = _listener;
     callback = (float answer) => {
         _listener.OnAnswerUpdate(answer);
     };
 }
Esempio n. 3
0
                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);
                }
Esempio n. 4
0
    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();
        }
    }
Esempio n. 5
0
 private static extern bool getChuckFloat(System.UInt32 chuckID, System.String name, FloatCallback callback);
Esempio n. 6
0
 private static extern bool getGlobalAssociativeFloatArrayValue(System.UInt32 chuckID, System.String name, System.String key, FloatCallback callback);
Esempio n. 7
0
 private static extern bool getGlobalFloatArrayValue(System.UInt32 chuckID, System.String name, System.UInt32 index, FloatCallback callback);
Esempio n. 8
0
 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&lt;ASL.ASLObject&gt;()._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;
 }
Esempio n. 10
0
 public static extern float ExecuteFloatCallback(FloatCallback callback, float param);
Esempio n. 11
0
 private extern static bool AskForNumericAnswer(System.IntPtr helperFactory, System.IntPtr bAnlys, System.IntPtr grammarBlock, FloatCallback floatCallback);