BlueGit

blue-star ggj-2020

Files

ggj-2020 / Assets / GAME / Scripts / Connector.cs

Connector.cs

Project Import
timfa Tim Falken · pushed by timfa · 6 years ago
b77834a1 History
Connector.cs 508 B Download Raw
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using UnityEngine;
5
6public class Connector : MonoBehaviour
7{
8 public Connectable Connected { get; private set; }
9 public Transform ConnectionPoint;
10
11 public void Connect(Connectable conn)
12 {
13 Connected = conn;
14 }
15
16 public void Disconnect(Connectable conn)
17 {
18 if (conn != Connected)
19 throw new InvalidOperationException("Wrong object disconnected");
20
21 Connected = null;
22 }
23}