/// <summary> /// ToucherのInteract対象を削除する。 /// </summary> /// <param name="toucher"></param> public void RemoveFromInteractor(Toucher toucher) { Interactor interactor = toucher.GetComponent <Interactor>(); if (interactor == null) { return; } interactor.RemoveTarget(); }
/// <summary> /// 対象がInteractorなら、対象に自身を登録する。 /// </summary> /// <param name="interactor"></param> public void RegisterToInteractor(Toucher toucher) { Interactor interactor = toucher.GetComponent <Interactor>(); if (interactor == null) { return; } interactor.SetTarget(this); }