mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-27 02:04:41 +00:00
ref #97 Added objects in testworld.
This commit is contained in:
parent
7601938d83
commit
9ba0df95eb
@ -11,11 +11,26 @@
|
|||||||
|
|
||||||
namespace TestLvl {
|
namespace TestLvl {
|
||||||
|
|
||||||
GroupObjBox::GroupObjBox() {
|
GroupObjBox::GroupObjBox(): CRAWL::IWorldItem("GroupObjBox") {
|
||||||
|
|
||||||
setDistance(10);
|
setDistance(2);
|
||||||
changeLayout(CRAWL::Refresh::CIRCLE);
|
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()
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,10 +13,15 @@
|
|||||||
|
|
||||||
namespace TestLvl {
|
namespace TestLvl {
|
||||||
|
|
||||||
class GroupObjBox: public CRAWL::ControlPos {
|
class GroupObjBox: public CRAWL::ControlPos, public CRAWL::IWorldItem {
|
||||||
public:
|
public:
|
||||||
GroupObjBox();
|
GroupObjBox();
|
||||||
|
|
||||||
|
|
||||||
|
// IRender interface
|
||||||
|
public:
|
||||||
|
void render(unsigned int tbfMsec);
|
||||||
|
void init();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include <Crawl/fire.h>
|
#include <Crawl/fire.h>
|
||||||
#include <Crawl/moon.h>
|
#include <Crawl/moon.h>
|
||||||
#include <Crawl/sun.h>
|
#include <Crawl/sun.h>
|
||||||
|
#include <groupobjbox.h>
|
||||||
|
|
||||||
namespace TestLvl {
|
namespace TestLvl {
|
||||||
|
|
||||||
@ -36,7 +37,13 @@ CRAWL::WorldRule *World::initWorldRules() {
|
|||||||
{registerObject<CRAWL::DynamicWint>(), 1},
|
{registerObject<CRAWL::DynamicWint>(), 1},
|
||||||
|
|
||||||
{registerObject<Background>(), 1},
|
{registerObject<Background>(), 1},
|
||||||
{registerObject<Day>(), 1}}}
|
{registerObject<Day>(), 1}}},
|
||||||
|
{2,
|
||||||
|
{
|
||||||
|
{registerObject<GroupObjBox>(),20}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user