public void MakeTarget(GameObject target, LookAtMe lookAtMe) { if (m_currentLookAtMe) { m_currentLookAtMe.ReleaseMe(); } m_currentLookObject = target; m_newDistanceGoal = m_zoomInDistance; m_newTargetPosition = target.transform.position; m_currentLookAtMe = lookAtMe; }
public void RemoveTarget() { if (m_currentLookAtMe) { m_currentLookAtMe.ReleaseMe(); } m_currentLookAtMe = null; m_currentLookObject = null; if (m_useResetTargetToZero) { m_newTargetPosition = Vector3.zero; } else { StartCoroutine(FindAndAverageTargets()); } m_newDistanceGoal = m_startDistance; }