예제 #1
0
    /// <summary>
    /// Called when the player stops holding the ACW item
    /// </summary>
    /// <param name="_data">A reference to the items inventory data.</param>
    /// <param name="_modelTransform">A reference to the models transform.</param>
    public override void StopHolding(ItemInventoryData _data, Transform _modelTransform)
    {
        // Call base code
        base.StopHolding(_data, _modelTransform);

        OnActivateItemGameObjectReference component = _modelTransform.GetComponent <OnActivateItemGameObjectReference>();

        if (component != null && component.IsActivated())
        {
            component.ActivateItem(false);
        }
    }
예제 #2
0
    /// <summary>
    /// Called when the player stops holding the ACW item
    /// </summary>
    /// <param name="_data">A reference to the items inventory data.</param>
    /// <param name="_modelTransform">A reference to the models transform.</param>
    public override void StopHolding(ItemInventoryData _data, Transform _modelTransform)
    {
        // Debug
        //DisplayChatAreaText("StopHolding");
        // Reset flags
        ResetFishing();

        // Call base code
        base.StopHolding(_data, _modelTransform);

        // Check if the model transform is null
        if (_modelTransform == null)
        {
            return;
        }
        OnActivateItemGameObjectReference component = _modelTransform.GetComponent <OnActivateItemGameObjectReference>();

        if (component != null && component.IsActivated())
        {
            component.ActivateItem(false);
        }
    }