Пример #1
0
    void ChangeForce()
    {
        Vector3 vec = transform.position - target.position;

        magnitude          = (vec.magnitude) / 1000;
        directionEffect[0] = vec[0];
        directionEffect[1] = vec[1];
        directionEffect[2] = vec[2];
        setIntPtr();
        PluginImport.StopEffect(effect_index);
        //Set the effect
        PluginImport.SetEffect(_type, effect_index, gain, magnitude, duration, frequency, _position, _direction);
        PluginImport.StartEffect(effect_index);
    }
Пример #2
0
 public void stopEnvironmentFriction()
 {
     myFrictionScript = transform.GetComponent <FrictionEffect> ();
     PluginImport.StopEffect(myFrictionScript.effect_index);
 }
Пример #3
0
 public void stopEnvironmentSpringForce()
 {
     mySpringScript = transform.GetComponent <SpringEffect> ();
     PluginImport.StopEffect(mySpringScript.effect_index);
 }
Пример #4
0
 public void StopEnvironmentConstantForce()
 {
     myContantForceScript = transform.GetComponent <ConstantForceEffect>();
     PluginImport.StopEffect(myContantForceScript.effect_index);
 }
Пример #5
0
 public static void StopEnvironmentForce(int index)
 {
     PluginImport.StopEffect(index);
 }