map2.SetTriggers(triggers2, 1);
map2.SetWidth(1);
+ triggers1[0].map = &map2;
+ triggers1[0].target = Vector<int>(6, 2);
+
+ triggers2[0].map = &map1;
+ triggers2[0].target = Vector<int>(8, 3);
+
SDL_Surface *mapMaximImg(IMG_Load("test-data/maxim-map.png"));
Sprite mapMaximSprite(mapMaximImg, 32, 64);
SimpleAnimation mapMaximAnimation(&mapMaximSprite, (tileSize/walkSpeed) / 2 * 1000, 2, 0, 0, true);
mapMonster.SetAnimation(&mapMonsterAnimation);
mapMonster.Position() = Vector<float>(64, 32);
mapMonster.SetOrientation(Entity::ORIENTATION_SOUTH);
+ map1.SetEntities(&mapMonster, 1);
InitScreen screen(width, height);
} else {
MapState *mapState(new MapState(&map1));
- mapState->AddEntity(&mapMaxim);
- mapState->AddEntity(&mapSelan);
- mapState->AddEntity(&mapGuy);
- mapState->AddEntity(&mapDekar);
-
mapState->ControlEntity(&mapMaxim);
mapState->SetWalkingSpeed(walkSpeed);
-
- mapState->AddEntity(&mapMonster);
mapMonster.StartAnimation(*mapState);
state = mapState;