/// <summary> /// Snaps us to another transform immediately. /// </summary> /// <param name="newTarget">Transform to chase.</param> public void SnapTarget(Transform newTarget) { OnSnapTarget(); lastTarget = target; target = newTarget; tween.Stop(); }
/// <summary> /// Snap to another CamState delegate immediately. /// </summary> /// <param name="inStateFunc">CamState delegate to switch to.</param> protected void SnapFunc(System.Func <CamState, CamState> inStateFunc) { tween.Stop(); lastStateFunc = stateFunc; stateFunc = inStateFunc; }