Exemple #1
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
    }
Exemple #2
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
    }
Exemple #3
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);
     }
 }
Exemple #4
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);
     }
 }
Exemple #5
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());
        //}
    }