Пример #1
0
    public void SetValue <T>(BlackboardKey key, T value)
    {
        BlackboardItem item;

        if (!items.TryGetValue(key, out item))
        {
            item = new BlackboardItem <T>();
            items.Add(key, item);
        }

        var ritem = item as BlackboardItem <T>;

        ritem.SetValue(value);
    }
Пример #2
0
    public void SetValue(string key, object v)
    {
        BlackboardItem item;

        if (_items.ContainsKey(key) == false)
        {
            item = new BlackboardItem();
            _items.Add(key, item);
        }
        else
        {
            item = _items[key];
        }
        item.SetValue(v);
    }
Пример #3
0
        public void SetValue(int key, object v, float expirdTime = -1f)
        {
            BlackboardItem item;

            if (m_Items.ContainsKey(key) == false)
            {
                item = new BlackboardItem();
                m_Items.Add(key, item);
            }
            else
            {
                item = m_Items[key];
            }
            item.SetValue(v, expirdTime);
        }
 public BlackBoardDataComponent()
 {
     DamageReceiver = new BlackboardItem <IDamageReceiver>();
     MovementTarget = new BlackboardItem <Vector3>();
 }