ref #97 Added objects in testworld.

This commit is contained in:
IgorekLoschinin 2021-09-16 21:54:32 +03:00
parent 7601938d83
commit 9ba0df95eb
3 changed files with 31 additions and 4 deletions

View File

@ -11,11 +11,26 @@
namespace TestLvl {
GroupObjBox::GroupObjBox() {
GroupObjBox::GroupObjBox(): CRAWL::IWorldItem("GroupObjBox") {
setDistance(10);
setDistance(2);
changeLayout(CRAWL::Refresh::CIRCLE);
add(new GroupObjboxItem);
add(new GroupObjboxItem);
add(new GroupObjboxItem);
add(new GroupObjboxItem);
add(new GroupObjboxItem);
}
void GroupObjBox::render(unsigned int tbfMsec)
{
}
void GroupObjBox::init()
{
}

View File

@ -13,10 +13,15 @@
namespace TestLvl {
class GroupObjBox: public CRAWL::ControlPos {
class GroupObjBox: public CRAWL::ControlPos, public CRAWL::IWorldItem {
public:
GroupObjBox();
// IRender interface
public:
void render(unsigned int tbfMsec);
void init();
};
}

View File

@ -18,6 +18,7 @@
#include <Crawl/fire.h>
#include <Crawl/moon.h>
#include <Crawl/sun.h>
#include <groupobjbox.h>
namespace TestLvl {
@ -36,7 +37,13 @@ CRAWL::WorldRule *World::initWorldRules() {
{registerObject<CRAWL::DynamicWint>(), 1},
{registerObject<Background>(), 1},
{registerObject<Day>(), 1}}}
{registerObject<Day>(), 1}}},
{2,
{
{registerObject<GroupObjBox>(),20}
}
},
};
}