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