From: Matt Mullins Date: Sat, 16 Jun 2012 04:52:04 +0000 (-0700) Subject: Add a testing Text object to the existing level X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=800accbc1804d92adc330c3dbd37662e21c20912;p=IvanGame.git Add a testing Text object to the existing level --- diff --git a/LevelFns.h b/LevelFns.h index d4d7db6..f6d4d87 100644 --- a/LevelFns.h +++ b/LevelFns.h @@ -2,6 +2,7 @@ #define __LEVELFNS_H__ #include "Game.h" #include "Level.h" +#include "Text.h" #include "SDL_ttf.h" ///\file LevelFns.h this file should contain all Behaviors for Levels @@ -29,6 +30,10 @@ void LevelWorldLoad() { Sprite* sun = new Sprite("sun", l->getAnimation("sun.anim")); sun->setPosition(480,50); sun->setSpeed(1); + + Text* helloworld = new Text("levelworld.yaml", "hello", English, 20, WHITE, 300, 20); + helloworld->setPosition(120, 150); + l->addText(helloworld); } void LevelWorldUpdate() { @@ -53,4 +58,4 @@ void LevelWorldUpdate() { } } -#endif \ No newline at end of file +#endif diff --git a/levelworld.yaml b/levelworld.yaml new file mode 100644 index 0000000..52d3fc6 --- /dev/null +++ b/levelworld.yaml @@ -0,0 +1,2 @@ +en: + hello: Hello, World!