Projekt

Obecné

Profil

Stáhnout (560 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1
using UnityEngine;
2

    
3
namespace DeltaRobotVr
4
{
5
    public abstract class ArrowScript : MonoBehaviour
6
    {
7
        protected LineRenderer lr;
8
        void Start()
9
        {
10
            lr = GetComponent<LineRenderer>();
11
        }
12

    
13
        void Update()
14
        {
15
            if (Client.Instance.IsConnected)
16
            {
17
                var vector = GetVector();
18
                lr.SetPositions(new[] { Vector3.zero, Single3Utils.ToVector3(vector) * 2 });
19
            }
20
        }
21

    
22
        protected abstract Single3 GetVector();
23
    }
24
}
(3-3/16)