protected void OnTriggerEnter(Collider other) { if (other.CompareTag("Knob")) { if (isTarget) { receiver.onPress("True"); } GetComponent <AudioSource>().Play(); Vector3 vector = transform.InverseTransformPoint(other.transform.position); Client.Instance.SendMessage(MessageType.EscapeDetent, new VectorPayload(vector, "Detent") ); } }
protected virtual void OnPressed() { GetComponent <AudioSource>().Play(); receiver.onPress(""); pressed = true; }