public ShakeTrigger(GameObject gameObject) { NodDetect shakeDetect = gameObject.GetComponent <NodDetect> (); if (shakeDetect == null) { Debug.LogError(gameObject.name + " must have NodDetect"); } shakeDetect.Shake += OnNod; }
public NodTrigger(GameObject gameObject) { NodDetect nodDetect = gameObject.GetComponent <NodDetect> (); if (nodDetect == null) { Debug.LogError(gameObject.name + " must have NodDetect"); } nodDetect.Nod += OnNod; }
void Awake() { Instance = this; }