private void Awake() { if (controller == null) { controller = this; } }
public void RegisterGate(lockedGate gate) { GameObject key = gate.key; if (!KeyTable.ContainsKey(key)) { KeyTable.Add(key, new List <lockedGate>()); KeyTable[key].Add(gate); } print("registering " + gate.gameObject.name + " = " + key.name); }