コード例 #1
0
    /// <summary>
    /// Unbinds all source component events
    /// </summary>
    public void Unbind()
    {
        if (!isBound)
        {
            return;
        }

        isBound = false;

        if (startEventBinding != null)
        {
            startEventBinding.Unbind();
            startEventBinding = null;
        }

        if (stopEventBinding != null)
        {
            stopEventBinding.Unbind();
            stopEventBinding = null;
        }

        if (resetEventBinding != null)
        {
            resetEventBinding.Unbind();
            resetEventBinding = null;
        }
    }
コード例 #2
0
    /// <summary>
    /// Unbind the source and target properties
    /// </summary>
    public override void Unbind()
    {
        if (!isBound)
        {
            return;
        }

        isBound = false;

        if (sourceEventBinding != null)
        {
            sourceEventBinding.Unbind();
            Destroy(sourceEventBinding);
            sourceEventBinding = null;
        }

        if (targetEventBinding != null)
        {
            targetEventBinding.Unbind();
            Destroy(targetEventBinding);
            targetEventBinding = null;
        }
    }