Exemplo n.º 1
0
    /// <summary>
    /// Remove single <see cref="InformationP"/> from memory
    /// </summary>
    /// <param name="info"></param>
    public virtual void Remove(InformationP info)
    {
        if (Items.Contains(info))
        {
            items.Remove(info);

            _curItemCount--;
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// Add an <see cref="InformationP"/> to memory
    /// </summary>
    /// <param name="info"></param>
    public virtual void Add(InformationP info)
    {
        _curItemCount++;
        if (_curItemCount > MaxItemCount)
        {
#if UNITY_EDITOR
            //Debug.Log("Reached Max Information Count in Memory, new Informations will be added after releasing old items, you can increase max item count from AIMemory script");
#endif
            return;
        }
        items.Add(info);
    }