From 800accbc1804d92adc330c3dbd37662e21c20912 Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Fri, 15 Jun 2012 21:52:04 -0700 Subject: [PATCH] Add a testing Text object to the existing level --- LevelFns.h | 7 ++++++- levelworld.yaml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 levelworld.yaml 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! -- 2.11.0