Преглед на файлове

Add contributor credits. Re-add old behavior of also acquiring properties directly from tileElem in TmxFile2D, if defined.

Lasse Öörni преди 8 години
родител
ревизия
ce98afc76e
променени са 3 файла, в които са добавени 11 реда и са изтрити 1 реда
  1. 2 0
      Docs/Urho3D.dox
  2. 2 0
      README.md
  3. 7 1
      Source/Urho3D/Urho2D/TmxFile2D.cpp

+ 2 - 0
Docs/Urho3D.dox

@@ -74,6 +74,7 @@ Urho3D development, contributions and bugfixes by:
 - Danny Boisvert
 - Sergey Bosko
 - Lisandro Bruzzo
+- Thomas Böhm
 - Carlo Carollo
 - Pete Chown
 - Christian Clavet
@@ -114,6 +115,7 @@ Urho3D development, contributions and bugfixes by:
 - David Palacios
 - Alex Parlett
 - Jordan Patterson
+- Georgii Pelageikin
 - Anton Petrov
 - Vladimir Pobedinsky
 - Franck Poulain

+ 2 - 0
README.md

@@ -29,6 +29,7 @@ Urho3D development, contributions and bugfixes by:
 - Danny Boisvert
 - Sergey Bosko
 - Lisandro Bruzzo
+- Thomas Böhm
 - Carlo Carollo
 - Pete Chown
 - Christian Clavet
@@ -69,6 +70,7 @@ Urho3D development, contributions and bugfixes by:
 - David Palacios
 - Alex Parlett
 - Jordan Patterson
+- Georgii Pelageikin
 - Anton Petrov
 - Vladimir Pobedinsky
 - Franck Poulain

+ 7 - 1
Source/Urho3D/Urho2D/TmxFile2D.cpp

@@ -578,7 +578,13 @@ bool TmxFile2D::LoadTileSet(const XMLElement& element)
 
     for (XMLElement tileElem = tileSetElem.GetChild("tile"); tileElem; tileElem = tileElem.GetNext("tile"))
     {
-        if(tileElem.HasChild("objectgroup"))
+        if (tileElem.HasChild("properties"))
+        {
+            SharedPtr<PropertySet2D> propertySet(new PropertySet2D());
+            propertySet->Load(tileElem.GetChild("properties"));
+            gidToPropertySetMapping_[firstgid + tileElem.GetInt("id")] = propertySet;
+        }
+        else if (tileElem.HasChild("objectgroup"))
         {
             XMLElement objectGroup = tileElem.GetChild("objectgroup");