Просмотр исходного кода

Merge branch 'master' into next

Conflicts:
	samples/browser/src/SpriteSample.cpp
seanpaultaylor 10 лет назад
Родитель
Сommit
ed490e586d
3 измененных файлов с 12 добавлено и 5 удалено
  1. 1 1
      README.md
  2. 3 3
      gameplay/src/gameplay.dox
  3. 8 1
      samples/browser/src/SpriteSample.cpp

+ 1 - 1
README.md

@@ -6,7 +6,7 @@ GamePlay is an open-source, cross-platform, C++ game framework/engine for creati
 
 - [Website](http://www.gameplay3d.io/)
 - [Wiki](https://github.com/gameplay3d/GamePlay/wiki)
-- [API Reference](http://gameplay3d.github.io/GamePlay/api/index.html)
+- [API](http://gameplay3d.github.io/GamePlay/api/index.html)
 - [Development Guide](https://github.com/gameplay3d/GamePlay/wiki#wiki-Development_Guide)
 - [Community Group](https://groups.google.com/d/forum/gameplay3d-developers)
 

+ 3 - 3
gameplay/src/gameplay.dox

@@ -2,17 +2,17 @@
  *
  * \section intro Introduction
  *
- * The gameplay framework is a cross-platform, C++, 3D game framework that includes a runtime library, tools,
+ * The gameplay framework is a cross-platform, C++, 2D/3D game framework that includes a runtime library, tools,
  * and learning content that allows indie developers to write games for mobile and desktop platforms
  * without worrying about platform details.
  *
  * \section License
  *
- * The project is open sourced under the Apache 2.0 license.
+ * The project is open-source under the Apache 2.0 license.
  *
  * \section Project Features
  *
- * The framework offers a well-defined, 3D game framework that's designed to get the most out of today's mobile and desktop platforms. 
+ * The framework offers a well-defined, 2D/3D game framework that's designed to get the most out of today's mobile and desktop platforms. 
  * Its purpose is to help you create stunning, world-class, games that harness the power and performance of the platform without
  * being concerned about the platform details. This is accomplished through a set of C++ classes that
  * are built on top of the OS, providing access to the hardware, graphics, and audio libraries

+ 8 - 1
samples/browser/src/SpriteSample.cpp

@@ -51,11 +51,18 @@ void SpriteSample::initialize()
     _playerAnimation->play("idle");
 
     // Setup player text
-    Node* playerTextNode = _playerNode->findNode("text");
+    Node* playerTextNode = _scene->findNode("text");
+    playerTextNode->addRef();
+    _scene->removeNode(playerTextNode);
+    //XXX This is because SceneLoader doesn't support loading child nodes for other nodes
+    _playerNode->addChild(playerTextNode);
+
     playerTextNode->translateY(_playerSprite->getHeight());
     Text* playerText = dynamic_cast<Text*>(playerTextNode->getDrawable());
     playerText->setJustify(Font::ALIGN_TOP_HCENTER);
     playerText->setWidth(_playerSprite->getWidth());
+    SAFE_RELEASE(playerTextNode);
+
 
     // Custom Effect in sprite
     Effect* waterEffect = Effect::createFromFile("res/shaders/sprite.vert", "res/common/sprites/water2d.frag");