Exemplo n.º 1
0
 public void ResetWSProperty(E_PropKey key)
 {
     //Debug.Log("Reset WS property " + key.ToString());
     if (IsWSPropertySet(key))
     {
         WorldStatePropFactory.Return(WorldStateProperties[(int)key]);
         WorldStateProperties[(int)key] = null;
     }
 }
Exemplo n.º 2
0
    public void ResetWSProperty(E_PropKey key)
    {
        //Debug.Log("Reset WS property " + key.ToString());
        int i = (int)key;

        if (m_PropState[i] != null)
        {
            WorldStatePropFactory.Return(m_PropState[i]);
            m_PropState[i] = null;
            m_PropBitSet.Set(i, false);
        }
    }
Exemplo n.º 3
0
    public void SetWSProperty(E_PropKey key, AgentOrder.E_OrderType value)
    {
        int index = (int)key;

        if (m_PropState[index] != null)
        {
            WorldStatePropFactory.Return(m_PropState[index]);
        }

        m_PropState[index] = WorldStatePropFactory.Create(key, value);
        m_PropBitSet.Set(index, true);         // set info that key is set
    }
Exemplo n.º 4
0
    public void SetWSProperty(E_PropKey key, UnityEngine.Vector3 value)
    {
        int index = (int)key;

        if (m_PropState[index] != null)
        {
            WorldStatePropFactory.Return(m_PropState[index]);
        }

        m_PropState[index] = WorldStatePropFactory.Create(key, value);
        m_PropBitSet.Set(index, true);         // set info that key is set
    }
Exemplo n.º 5
0
 public void SetWSProperty(E_PropKey key, E_CoverState value)
 {
     if (IsWSPropertySet(key))
     {
         WorldStatePropFactory.Return(WorldStateProperties[(int)key]);
         WorldStateProperties[(int)key] = WorldStatePropFactory.Create(key, value);
     }
     else
     {
         WorldStateProperties[(int)key] = WorldStatePropFactory.Create(key, value);
     }
 }
Exemplo n.º 6
0
 public void SetWSProperty(E_PropKey key, UnityEngine.Vector3 value)
 {
     if (IsWSPropertySet(key))
     {
         WorldStatePropFactory.Return(WorldStateProperties[(int)key]);
         WorldStateProperties[(int)key] = WorldStatePropFactory.Create(key, value);
     }
     else
     {
         WorldStateProperties[(int)key] = WorldStatePropFactory.Create(key, value);
     }
 }
Exemplo n.º 7
0
    public void SetWSProperty(WorldStatePropKey key, OrderType value)
    {
        int index = (int)key;

        if (_propState[index] != null)
        {
            WorldStatePropFactory.Collect(_propState[index]);
        }

        _propState[index] = WorldStatePropFactory.Get(key, value);
        _propBitSet.Set(index, true);
    }
Exemplo n.º 8
0
    public void Reset()
    {
        //Debug.Log("Worldstate reset");

        for (int i = 0; i < WorldStateProperties.Length; i++)
        {
            if (WorldStateProperties[i] != null)
            {
                WorldStatePropFactory.Return(WorldStateProperties[i]);
                WorldStateProperties[i] = null;
            }
        }
    }
Exemplo n.º 9
0
    public void Reset()
    {
        //Debug.Log("Worldstate reset");

        for (int i = 0; i < (int)E_PropKey.E_COUNT; i++)
        {
            if (m_PropState[i] != null)
            {
                WorldStatePropFactory.Return(m_PropState[i]);
                m_PropState[i] = null;
            }
        }

        m_PropBitSet.SetAll(false);
    }
Exemplo n.º 10
0
    public void Reset()
    {
        //Debug.Log("Worldstate reset");

        for (int i = 0; i < (int)WorldStatePropKey.MAX; i++)
        {
            if (_propState[i] != null)
            {
                WorldStatePropFactory.Collect(_propState[i]);
                _propState[i] = null;
            }
        }

        _propBitSet.SetAll(false);
    }
Exemplo n.º 11
0
    }                                                                                     // only bool now

    public void SetWSProperty(E_PropKey key, bool value)
    {
        int index = (int)key;

        if (m_PropState[index] != null)
        {
            WorldStatePropFactory.Return(m_PropState[index]);
        }

        m_PropState[index] = WorldStatePropFactory.Create(key, value);
        m_PropBitSet.Set(index, true);         // set info that key is set


        //for (int i = 0; i < m_PropBitSet.Count; i++)
        //{
        //    Debug.Log("m_PropBitSet[" + i + "].GetHashCode()=" + m_PropBitSet[i].GetHashCode());
        //}
    }