mirror of
https://github.com/Steffo99/bleach-beach.git
synced 2024-12-04 19:04:19 +00:00
23 lines
568 B
C#
23 lines
568 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Linker : MonoBehaviour
|
|
{
|
|
public GameObject firstObject;
|
|
public GameObject secondObject;
|
|
private LineRenderer lineRenderer;
|
|
|
|
void Start()
|
|
{
|
|
lineRenderer = GetComponent<LineRenderer>();
|
|
}
|
|
|
|
void Update () {
|
|
if (firstObject != null && secondObject != null)
|
|
{
|
|
lineRenderer.SetPosition(0, firstObject.transform.position);
|
|
lineRenderer.SetPosition(1, secondObject.transform.position);
|
|
}
|
|
}
|
|
}
|