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

28 lines
398 B
C#
Raw Normal View History

2019-10-29 20:47:06 +00:00
using UnityEngine;
namespace cylvester
{
interface IMoveBall
{
float Offset { set; }
2019-10-29 20:47:06 +00:00
}
public class MoveBall : MonoBehaviour, IMoveBall
{
float x = 1.0f;
public float Offset
2019-10-29 20:47:06 +00:00
{
set
{
x = value * 0.1f;
transform.localPosition = new Vector3(x, 4f, 3f);
2019-10-29 20:47:06 +00:00
}
}
}
2019-10-29 20:47:06 +00:00
}