public override void Interacte() { if (!lastNPS) { blockPanel.Texting(text); } else { blockPanel.Texting(text, true); } }
IEnumerator SmoothMoving(Transform target, float smoothSpeed, string text) { Vector3 targWithOffset = target.position + offset; float dis = (transform.position - targWithOffset).sqrMagnitude; while (dis >= 0.01f) { transform.position = Vector3.MoveTowards(transform.position, targWithOffset, smoothSpeed); dis = (transform.position - targWithOffset).sqrMagnitude; yield return(new WaitForSeconds(0.01f)); } panel.Texting(text); }