Exemplo n.º 1
0
    /// <summary>
    /// ToucherのInteract対象を削除する。
    /// </summary>
    /// <param name="toucher"></param>
    public void RemoveFromInteractor(Toucher toucher)
    {
        Interactor interactor = toucher.GetComponent <Interactor>();

        if (interactor == null)
        {
            return;
        }

        interactor.RemoveTarget();
    }
Exemplo n.º 2
0
    /// <summary>
    /// 対象がInteractorなら、対象に自身を登録する。
    /// </summary>
    /// <param name="interactor"></param>
    public void RegisterToInteractor(Toucher toucher)
    {
        Interactor interactor = toucher.GetComponent <Interactor>();

        if (interactor == null)
        {
            return;
        }

        interactor.SetTarget(this);
    }