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

Rebased & Updated content and build files of the examples. Known Issues: *SkeletalAnimation won't be able to load ninja.mesh, *#427 for AdvancedLighting, *Particleemitter's scalecurve won't work/ the particleemitter won't even be seen, *Networking example won't connect.

Joachim Meyer 12 лет назад
Родитель
Сommit
ef1efb1d38

+ 7 - 7
Examples/C++/Build/Linux/Makefile

@@ -2,7 +2,7 @@ CC=g++
 CFLAGS=-I../../Core/Dependencies/include -I../../Core/Dependencies/include/AL -I../../Core/include -I../../Modules/include -I../../Modules/Dependencies/include -I../../Modules/Dependencies/include/bullet
 LDFLAGS=-lrt -ldl -lpthread ../../Core/lib/libPolycore.a ../../Core/Dependencies/lib/libfreetype.a ../../Core/Dependencies/lib/liblibvorbisfile.a ../../Core/Dependencies/lib/liblibvorbis.a ../../Core/Dependencies/lib/liblibogg.a ../../Core/Dependencies/lib/libopenal.so ../../Core/Dependencies/lib/libphysfs.a ../../Core/Dependencies/lib/libpng15.a ../../Core/Dependencies/lib/libz.a -lGL -lGLU -lSDL ../../Modules/lib/libPolycode2DPhysics.a ../../Modules/Dependencies/lib/libBox2D.a ../../Modules/lib/libPolycode3DPhysics.a ../../Modules/Dependencies/lib/libBulletDynamics.a ../../Modules/Dependencies/lib/libBulletCollision.a ../../Modules/Dependencies/lib/libLinearMath.a
 
-default: 2DAudio 2DParticles 2DPhysics_Basic 2DPhysics_CollisionOnly 2DPhysics_Contacts 2DPhysics_Joints 2DPhysics_PointCollision 2DShapes 2DTransforms 3DAudio 3DBasics 3DMeshParticles 3DParticles 3DPhysics_Basic 3DPhysics_Character 3DPhysics_CollisionOnly 3DPhysics_Contacts 3DPhysics_RayTest 3DPhysics_Vehicle AdvancedLighting BasicImage BasicLighting BasicText EventHandling KeyboardInput MouseInput Networking_Client Networking_Server PlayingSounds ScreenEntities ScreenSprites SkeletalAnimation UpdateLoop  
+default: 2DAudio 2DParticles 2DPhysics_Basic 2DPhysics_CollisionOnly 2DPhysics_Contacts 2DPhysics_Joints 2DPhysics_PointCollision 2DShapes 2DTransforms 3DAudio 3DBasics 3DMeshParticles 3DParticles 3DPhysics_Basic 3DPhysics_Character 3DPhysics_CollisionOnly 3DPhysics_Contacts 3DPhysics_RayTest 3DPhysics_Vehicle AdvancedLighting BasicImage BasicLighting BasicText EventHandling KeyboardInput MouseInput Networking_Client Networking_Server PlayingSounds SceneEntities SceneSprites SkeletalAnimation UpdateLoop  
 
 clean:
 	rm 2DAudio
@@ -34,8 +34,8 @@ clean:
 	rm Networking_Client
 	rm Networking_Server
 	rm PlayingSounds
-	rm ScreenEntities
-	rm ScreenSprites
+	rm SceneEntities
+	rm SceneSprites
 	rm SkeletalAnimation
 	rm UpdateLoop
 
@@ -97,10 +97,10 @@ Networking_Server:
 	$(CC) $(CFLAGS) -I./Contents/Networking_Server main.cpp Contents/Networking_Server/HelloPolycodeApp.cpp -o Networking_Server $(LDFLAGS)
 PlayingSounds:
 	$(CC) $(CFLAGS) -I./Contents/PlayingSounds main.cpp Contents/PlayingSounds/HelloPolycodeApp.cpp -o PlayingSounds $(LDFLAGS)
-ScreenEntities:
-	$(CC) $(CFLAGS) -I./Contents/ScreenEntities main.cpp Contents/ScreenEntities/HelloPolycodeApp.cpp -o ScreenEntities $(LDFLAGS)
-ScreenSprites:
-	$(CC) $(CFLAGS) -I./Contents/ScreenSprites main.cpp Contents/ScreenSprites/HelloPolycodeApp.cpp -o ScreenSprites $(LDFLAGS)
+SceneEntities:
+	$(CC) $(CFLAGS) -I./Contents/SceneEntities main.cpp Contents/SceneEntities/HelloPolycodeApp.cpp -o SceneEntities $(LDFLAGS)
+SceneSprites:
+	$(CC) $(CFLAGS) -I./Contents/SceneSprites main.cpp Contents/SceneSprites/HelloPolycodeApp.cpp -o SceneSprites $(LDFLAGS)
 SkeletalAnimation:
 	$(CC) $(CFLAGS) -I./Contents/SkeletalAnimation main.cpp Contents/SkeletalAnimation/HelloPolycodeApp.cpp -o SkeletalAnimation $(LDFLAGS)
 UpdateLoop:

+ 2 - 2
Examples/C++/Build/Windows/PolycodeExamples/PolycodeExamples.sln

@@ -49,9 +49,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MouseInput", "MouseInput\Mo
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PlayingSounds", "PlayingSounds\PlayingSounds.vcxproj", "{E15F77B2-9AEE-49E7-8B8C-D44FD4461FCC}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenEntities", "ScreenEntities\ScreenEntities.vcxproj", "{F2E3C438-3BCA-4E78-B3BC-2A7E930A6848}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SceneEntities", "SceneEntities\SceneEntities.vcxproj", "{F2E3C438-3BCA-4E78-B3BC-2A7E930A6848}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScreenSprites", "ScreenSprites\ScreenSprites.vcxproj", "{6822657B-F9F3-44C4-B2E6-C51A8F1815C7}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SceneSprites", "SceneSprites\SceneSprites.vcxproj", "{6822657B-F9F3-44C4-B2E6-C51A8F1815C7}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SkeletalAnimation", "SkeletalAnimation\SkeletalAnimation.vcxproj", "{BFA6C0C6-15A9-4A92-857E-01566CFB293E}"
 EndProject

+ 4 - 7
Examples/C++/Contents/2DParticles/HelloPolycodeApp.cpp

@@ -7,13 +7,10 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 	CoreServices::getInstance()->getResourceManager()->addArchive("Resources/default.pak");
 	CoreServices::getInstance()->getResourceManager()->addDirResource("default", false);
 	
-	Screen *screen = new Screen();	
-	ScreenParticleEmitter *emitter = new ScreenParticleEmitter("Resources/particle.png", 
-		Particle::BILLBOARD_PARTICLE, ParticleEmitter::CONTINUOUS_EMITTER, 4, 200, 
-		Vector3(0.0,-50.0,0.0), Vector3(0.0,0.0,0.0), Vector3(20.5, 40.0, 0.0), 
-		Vector3(1.5,1.5,1.5));
+	Scene *scene = new Scene();	
+	SceneParticleEmitter *emitter = new SceneParticleEmitter(100,50,3);
 	
-	emitter->useScaleCurves = true;
+	emitter->useScaleCurve = true;
 	emitter->scaleCurve.clearControlPoints();
 	emitter->scaleCurve.addControlPoint2d(0, 0.3);
 	emitter->scaleCurve.addControlPoint2d(0.5, 1);
@@ -47,7 +44,7 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 	emitter->colorCurveA.addControlPoint2d(1, 0);
 
 	emitter->setPosition(640/2, 400);
-	screen->addChild(emitter);
+	scene->addChild(emitter);
 }
 
 HelloPolycodeApp::~HelloPolycodeApp() {

+ 1 - 1
Examples/C++/Contents/2DPhysics_Basic/HelloPolycodeApp.cpp

@@ -12,7 +12,7 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 	scene->addPhysicsChild(shape, PhysicsScene2DEntity::ENTITY_RECT, true);	
 	
 	for(int i=0; i < 200; i++) {
-		shape = new ScenePrimitive(ScenePrimitive::TYPE_PLANE, 20,5);
+		shape = new ScenePrimitive(ScenePrimitive::TYPE_VPLANE, 20,5);
 		shape->setRoll(rand() % 360);
 		shape->setPosition(-640/2 + rand() % 640, 480/2 - rand() % 300);
 		scene->addPhysicsChild(shape, PhysicsScene2DEntity::ENTITY_RECT, false);		

+ 5 - 5
Examples/C++/Contents/2DPhysics_Contacts/HelloPolycodeApp.cpp

@@ -7,7 +7,7 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() {
 	CoreServices::getInstance()->getResourceManager()->addArchive("Resources/default.pak");
 	CoreServices::getInstance()->getResourceManager()->addDirResource("default", false);	
 
-	scene = new PhysicsScene(10, 60);		
+	scene = new PhysicsScene2D(10, 60);		
 	ScenePrimitive *shape = new ScenePrimitive(ScenePrimitive::TYPE_VPLANE, 600,30);
 	shape->setColor(0.0,0.0,0.0,1.0);
 	shape->setPosition(0, -480/2+40);
@@ -20,14 +20,14 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() {
 		scene->addPhysicsChild(shape, PhysicsScene2DEntity::ENTITY_RECT, false);		
 	}
 	collisionSound = new Sound("Resources/hit.wav");
-	scene->addEventListener(this, PhysicsSceneEvent::EVENT_SOLVE_SHAPE_COLLISION);
+	scene->addEventListener(this, PhysicsScene2DEvent::EVENT_SOLVE_SHAPE_COLLISION);
 }
 
 void HelloPolycodeApp::handleEvent(Event *e) {
 	if(e->getDispatcher() == scene) {
 		switch(e->getEventCode()) {
-			case PhysicsSceneEvent::EVENT_SOLVE_SHAPE_COLLISION:
-				PhysicsSceneEvent *pe = (PhysicsSceneEvent*)e;
+			case PhysicsScene2DEvent::EVENT_SOLVE_SHAPE_COLLISION:
+				PhysicsScene2DEvent *pe = (PhysicsScene2DEvent*)e;
 				if(pe->impactStrength > 5)
 					collisionSound->Play();
 			break;
@@ -41,4 +41,4 @@ HelloPolycodeApp::~HelloPolycodeApp() {
 
 bool HelloPolycodeApp::Update() {
     return core->updateAndRender();
-}
+}

+ 1 - 1
Examples/C++/Contents/2DPhysics_Joints/HelloPolycodeApp.cpp

@@ -4,7 +4,7 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 
 	core = new POLYCODE_CORE(view, 640,480,false,false,0,0,90);
 
-	PhysicsScene *scene = new PhysicsScene(10, 50);
+	PhysicsScene2D *scene = new PhysicsScene2D(10, 50);
 
 	ScenePrimitive *ceiling = new ScenePrimitive(ScenePrimitive::TYPE_VPLANE, 640, 20);
 	ceiling->setColor(0.0, 0.0, 0.0, 1.0);

+ 6 - 9
Examples/C++/Contents/3DMeshParticles/HelloPolycodeApp.cpp

@@ -21,34 +21,31 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 	mesh->createTorus(0.3,0.2,10,10);
 
 	
-	SceneParticleEmitter *emitter = new SceneParticleEmitter("Default", 
-		Particle::MESH_PARTICLE, ParticleEmitter::CONTINUOUS_EMITTER, 4, 100,
-		Vector3(0.0,1.0,0.0), Vector3(0.0,0.0,0.0), Vector3(0.3, 0.0, 0.3),
-		Vector3(1.5,1.5,1.5), mesh);
+	SceneParticleEmitter *emitter = new SceneParticleEmitter(100,50,2);
 			
-	emitter->useScaleCurves = true;
+	emitter->useScaleCurve = true;
 	emitter->scaleCurve.addControlPoint2d(0, 0.1);
 	emitter->scaleCurve.addControlPoint2d(0.5, 0.3);
 	emitter->scaleCurve.addControlPoint2d(1, 0);	
 	
 	scene->addEntity(emitter);	
 
-	SceneLight *light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	SceneLight *light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,3);
 	light->setLightColor(1,0,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,3);
 	light->setLightColor(0,1,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,-3);
 	light->setLightColor(0,0,1);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,-3);
 	light->setLightColor(1,0,1);
 	scene->addLight(light);

+ 6 - 9
Examples/C++/Contents/3DParticles/HelloPolycodeApp.cpp

@@ -16,35 +16,32 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) {
 	scene->getDefaultCamera()->setPosition(7,7,7);
 	scene->getDefaultCamera()->lookAt(Vector3(0,0,0));	
 	
-	SceneParticleEmitter *emitter = new SceneParticleEmitter("TestParticle", 
-		Particle::BILLBOARD_PARTICLE, ParticleEmitter::CONTINUOUS_EMITTER, 4, 200,
-		Vector3(0.0,1.0,0.0), Vector3(0.0,0.0,0.0), Vector3(0.3, 0.0, 0.3),
-		Vector3(1.5,1.5,1.5));		
+	SceneParticleEmitter *emitter = new SceneParticleEmitter(100,10,3);		
 
 	
-	emitter->useScaleCurves = true;
+	emitter->useScaleCurve = true;
 	emitter->scaleCurve.addControlPoint2d(0, 0.1);
 	emitter->scaleCurve.addControlPoint2d(0.5, 0.3);
 	emitter->scaleCurve.addControlPoint2d(1, 0);	
 	
 	scene->addEntity(emitter);	
 
-	SceneLight *light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	SceneLight *light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,3);
 	light->setLightColor(1,0,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,3);
 	light->setLightColor(0,1,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,-3);
 	light->setLightColor(0,0,1);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,-3);
 	light->setLightColor(1,0,1);
 	scene->addLight(light);

+ 4 - 4
Examples/C++/Contents/AdvancedLighting/HelloPolycodeApp.cpp

@@ -18,22 +18,22 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() {
 	box->setPosition(0.0, 0.5, 0.0);
 	scene->addEntity(box);
 	
-	SceneLight *light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	SceneLight *light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,3);
 	light->setLightColor(1,0,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,3);
 	light->setLightColor(0,1,0);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(-3,2,-3);
 	light->setLightColor(0,0,1);
 	scene->addLight(light);
 
-	light = new SceneLight(SceneLight::AREA_LIGHT, scene, 5);
+	light = new SceneLight(SceneLight::POINT_LIGHT, scene, 5);
 	light->setPosition(3,2,-3);
 	light->setLightColor(1,0,1);
 	scene->addLight(light);

+ 12 - 14
Examples/C++/Contents/Networking_Client/HelloPolycodeApp.cpp

@@ -7,15 +7,15 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() {
 	CoreServices::getInstance()->getResourceManager()->addArchive("Resources/default.pak");
 	CoreServices::getInstance()->getResourceManager()->addDirResource("default", false);
 
-	gameScreen = new Screen();	
+	gameScene = new Scene(Scene::SCENE_2D);	
 
-	Screen *hudScreen = new Screen();
-	ScreenLabel *label = new ScreenLabel("Example client.  Press escape to exit.", 16);
-	hudScreen->addChild(label);
+	Scene *hudScene = new Scene(Scene::SCENE_2D);
+	SceneLabel *label = new SceneLabel("Example client.  Press escape to exit.", 16);
+	hudScene->addChild(label);
 	
-	motdLabel =  new ScreenLabel("", 16);
-	motdLabel->setPosition(0, 20);
-	hudScreen->addChild(motdLabel);
+	motdLabel =  new SceneLabel("", 16);
+	motdLabel->setPosition(0, -480/2+20);
+	hudScene->addChild(motdLabel);
 		
 	client = new Client(6543, 50);
 	client->setPersistentData(&clientData, sizeof(ClientData));
@@ -38,13 +38,11 @@ void HelloPolycodeApp::createClientPlayer(int clientID) {
 	ClientPlayer *player = new ClientPlayer();
 	player->clientID = clientID;
 	
-	ScreenEntity *playerEntity = new ScreenEntity();				
-	playerEntity->setPositionMode(ScreenEntity::POSITION_CENTER);
-	ScreenShape *playerBody = new ScreenShape(ScreenShape::SHAPE_CIRCLE, 30,30,3);				
-	playerBody->setRotation(-90.0);	
+	SceneEntity *playerEntity = new SceneEntity();				
+	ScenePrimitive *playerBody = new ScenePrimitive(ScenePrimitive::TYPE_CIRCLE, 30,30,3);				
+	playerBody->setRoll(-90.0);	
 	playerEntity->addChild(playerBody);
-	playerEntity->setPosition(640/2,480/2);
-	gameScreen->addChild(playerEntity);
+	gameScene->addChild(playerEntity);
 	player->playerEntity = playerEntity;												
 	
 	player->state = 0;
@@ -108,7 +106,7 @@ void HelloPolycodeApp::handleEvent(Event *event) {
 							for(int j=0; j < MAX_PLAYERS; j++) {
 								if(clientPlayer->clientID == serverState->players[j].clientID && serverState->players[j].state != 0) {
 									clientPlayer->playerEntity->setPosition(serverState->players[j].posX, serverState->players[j].posY);
-									clientPlayer->playerEntity->setRotation(serverState->players[j].angle);								
+									clientPlayer->playerEntity->setRoll(serverState->players[j].angle);								
 								}
 							}							
 						}

+ 3 - 3
Examples/C++/Contents/Networking_Client/HelloPolycodeApp.h

@@ -8,7 +8,7 @@ class ClientPlayer {
 	public:
 		int clientID;
 		char state;
-		ScreenEntity *playerEntity;
+		SceneEntity *playerEntity;
 };
 
 class HelloPolycodeApp : public EventHandler {
@@ -22,12 +22,12 @@ public:
     
 private:
 	Core *core;
-	Screen *gameScreen;
+	Scene *gameScene;
 	Client *client;
 	ClientData clientData;
 	char state;
 	
-	ScreenLabel *motdLabel;	
+	SceneLabel *motdLabel;	
 	
 	vector<ClientPlayer*> players;
 };

+ 12 - 14
Examples/C++/Contents/Networking_Server/HelloPolycodeApp.cpp

@@ -10,11 +10,11 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : ServerWorld(), EventHan
 	memset(serverInfo.motd, 0, 256);
 	strcat(serverInfo.motd, "MOTD : ** Welcome to the Network Example server! **");
 
-	gameScreen = new Screen();	
+	gameScene = new Scene(Scene::SCENE_2D);	
 
-	Screen *hudScreen = new Screen();
-	infoLabel = new ScreenLabel("Example server. [0 Players]", 32);
-	hudScreen->addChild(infoLabel);
+	Scene *hudScene = new Scene(Scene::SCENE_2D);
+	infoLabel = new SceneLabel("Example server. [0 Players]", 32);
+	hudScene->addChild(infoLabel);
 	
 	server = new Server(52345, 50, this);
 	
@@ -42,10 +42,10 @@ void HelloPolycodeApp::updateWorld(Number elapsed) {
 				player->rotateSpeed = 0;
 			break;			
 			case TURNING_LEFT:
-				player->rotateSpeed = -100;			
+				player->rotateSpeed = 100;			
 			break;
 			case TURNING_RIGHT:
-				player->rotateSpeed = 100;			
+				player->rotateSpeed = -100;			
 			break;
 			
 		}
@@ -57,7 +57,7 @@ void HelloPolycodeApp::updateWorld(Number elapsed) {
 	
 		// update the server display
 		player->playerEntity->setPosition(player->position.x, player->position.y);
-		player->playerEntity->setRotation(player->angle);
+		player->playerEntity->setRoll(player->angle);
 
 										
 	}
@@ -119,7 +119,7 @@ void HelloPolycodeApp::handleEvent(Event *event) {
 						Player *player = players[i];
 						players.erase(players.begin()+i);						
 						
-						gameScreen->removeChild(player->playerEntity);
+						gameScene->removeEntity(player->playerEntity);
 						delete player->playerEntity;
 						delete player;
 					}
@@ -134,13 +134,11 @@ void HelloPolycodeApp::handleEvent(Event *event) {
 				newPlayer->position.y = 480/2;				
 				newPlayer->client = serverEvent->client;												
 				newPlayer->client->addEventListener(this, ServerClientEvent::EVENT_CLIENT_DATA);					
-				ScreenEntity *playerEntity = new ScreenEntity();				
-				playerEntity->setPositionMode(ScreenEntity::POSITION_CENTER);
-				ScreenShape *playerBody = new ScreenShape(ScreenShape::SHAPE_CIRCLE, 30,30,3);				
-				playerBody->setRotation(-90.0);
+				SceneEntity *playerEntity = new SceneEntity();				
+				ScenePrimitive *playerBody = new ScenePrimitive(ScenePrimitive::TYPE_CIRCLE, 30,30,3);				
+				playerBody->setRoll(-90.0);
 				playerEntity->addChild(playerBody);
-				playerEntity->setPosition(640/2,480/2);
-				gameScreen->addChild(playerEntity);
+				gameScene->addChild(playerEntity);
 				newPlayer->playerEntity = playerEntity;												
 				players.push_back(newPlayer);
 				printf("Player connected\n");

+ 3 - 3
Examples/C++/Contents/Networking_Server/HelloPolycodeApp.h

@@ -8,7 +8,7 @@ class Player {
 	public:		
 		Vector2 position;
 		Number angle;
-		ScreenEntity *playerEntity;
+		SceneEntity *playerEntity;
 		ServerClient *client;
 		char turning_state;
 		char thrusting;
@@ -41,8 +41,8 @@ public:
     
 private:
 	Core *core;
-	Screen *gameScreen;
-	ScreenLabel *infoLabel;
+	Scene *gameScene;
+	SceneLabel *infoLabel;
 	Server *server;
 	vector<Player*> players;
 	ServerState serverState;

+ 1 - 1
Examples/C++/Contents/SkeletalAnimation/HelloPolycodeApp.cpp

@@ -15,7 +15,7 @@ HelloPolycodeApp::HelloPolycodeApp(PolycodeView *view) : EventHandler() {
 	scene->addEntity(mesh);
 	mesh->loadSkeleton("Resources/ninja.skeleton");
 	mesh->getSkeleton()->addAnimation("Run", "Resources/run.anim");
-	mesh->getSkeleton()->playAnimation("Run");
+	mesh->getSkeleton()->playAnimationByName("Run");
 
 	scene->getDefaultCamera()->setPosition(25,25,25);
 	scene->getDefaultCamera()->lookAt(Vector3(0,0,0));