soundvision/UnityProject/Assets/Scenes/Examples/PdBackend/script/MoveBall.cs

27 lines
398 B
C#

using UnityEngine;
namespace cylvester
{
interface IMoveBall
{
float Offset { set; }
}
public class MoveBall : MonoBehaviour, IMoveBall
{
float x = 1.0f;
public float Offset
{
set
{
x = value * 0.1f;
transform.localPosition = new Vector3(x, 4f, 3f);
}
}
}
}