private void OnTriggerExit(Collider other) { if (this._isInteractable == false && this._alwaysShow == false) { BubbleRenderer.SetVisibility(false); return; } // Disable bubble BubbleRenderer.SetVisibility(false); }
private void OnTriggerStay(Collider other) { if (this._isInteractable == false && this._alwaysShow == false) { BubbleRenderer.SetVisibility(false); return; } if (this.BubbleObject.IsThoughtBubble) { BubbleRenderer.SetPosition(other.transform.position + this.BubbleObject.Offset); } }
private void OnTriggerEnter(Collider other) { if (this._isInteractable == false && this._alwaysShow == false) { BubbleRenderer.SetVisibility(false); return; } // Move bubble if (this.BubbleObject.IsThoughtBubble) { BubbleRenderer.SetPosition(other.transform.position + this.BubbleObject.Offset); } else { BubbleRenderer.SetPosition(this.transform.position //+ new Vector3(0, this._collider.bounds.extents.y, 0) + this.BubbleObject.Offset); } BubbleRenderer.SetSprite(this.BubbleObject.BubbleSprite); // Enable bubble BubbleRenderer.SetVisibility(true); }