コード例 #1
0
    /// <summary>
    /// Get the value of the item inside this slot
    /// </summary>
    /// <returns></returns>
    public float GetCost()
    {
        float cost = 0;

        //avoid null exception
        if (current != null)
        {
            if (current.GetData() != null)
            {
                cost = current.GetData().cost;
            }
        }

        return(cost);
    }