1 |
25010c40
|
kovi
|
using System.Collections;
|
2 |
|
|
using System.Collections.Generic;
|
3 |
|
|
using UnityEngine;
|
4 |
|
|
using DeltaRobotVr;
|
5 |
|
|
|
6 |
|
|
public abstract class ArrowScript : MonoBehaviour
|
7 |
|
|
{
|
8 |
|
|
protected LineRenderer lr;
|
9 |
|
|
void Start()
|
10 |
|
|
{
|
11 |
|
|
lr = GetComponent<LineRenderer>();
|
12 |
|
|
}
|
13 |
|
|
|
14 |
|
|
void Update()
|
15 |
|
|
{
|
16 |
|
|
if (Client.Instance.IsConnected)
|
17 |
|
|
{
|
18 |
|
|
var vector = getVector();
|
19 |
|
|
lr.SetPositions(new Vector3[] { Vector3.zero, MyTools.Single3Transform(vector.X, vector.Y, vector.Z) });
|
20 |
|
|
}
|
21 |
|
|
}
|
22 |
|
|
|
23 |
|
|
protected abstract Single3 getVector();
|
24 |
|
|
}
|