public void ResetWSProperty(WorldStatePropKey key) { //Debug.Log("Reset WS property " + key.ToString()); int i = (int)key; if (_propState[i] != null) { WorldStatePropFactory.Collect(_propState[i]); _propState[i] = null; _propBitSet.Set(i, false); } }
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); }
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); }