Exemple #1
0
void EmberEntity::onAttrChanged(const std::string& str, const Atlas::Message::Element& v)
{
	if (str == "mode") {
		parsePositioningModeChange(v);
	} else if (str == "bbox") {
		Entity::onAttrChanged(str, v);
		onBboxChanged();
		return;
	}

	Entity::onAttrChanged(str, v);

}
Exemple #2
0
void EmberEntity::onAttrChanged(const std::string& str, const Atlas::Message::Element& v)
{
  if (str == "mode") {
    parsePositioningModeChange(v);
  } else if (str == "bbox") {
    Entity::onAttrChanged(str, v);
    onBboxChanged();
    return;
  }

  //call this before checking for areas and terrainmods, since those instances created to handle that (TerrainMod and TerrainArea) will listen to the AttrChanged event, which would then be emitted after those have been created, causing duplicate regeneration from the same data
  Entity::onAttrChanged(str, v);

}
Exemple #3
0
void EmberEntity::onAttrChanged(const std::string& str, const Atlas::Message::Element& v)
{
	if (str == "mode") {
		parsePositioningModeChange(v);
	} else if (str == "bbox") {
		Entity::onAttrChanged(str, v);
		onBboxChanged();
		return;
	}

	//Dispatch attribute changes to any global listeners.
	sGlobalDispatcher.dispatchAttributeChange(*this, str, v);

	Entity::onAttrChanged(str, v);

}