mog2d is a simple 2d game engine for iOS / android. It's based on OpenGL ES2.
FirstScene.h
#include "mog/mog.h"
using namespace mog;
class FirstScene : public Scene {
virtual void onLoad() override;
};
FirstScene.cpp
#include "FirstScene.h"
void FirstScene::onLoad() {
}
FirstScene.cpp
#include "FirstScene.h"
void FirstScene::onLoad() {
auto sprite = Sprite::create("test.png");
this->add(sprite);
}
- mog::Sprite
- mog::Slice9Sprite
- mog::SpriteSheet
- mog::Label
- mog::Rectangle
- mog::RoundedRectangle
- mog::Circle
- mog::Triangle
- mog::Group
mog::Group
class can grouping multiple Entities.
Ex.
// If you specify true for the argument, combine draw calls into one.
auto group = Group::create(true);
auto sprite = Sprite::create("test.png");
group->add(sprite);
auto rect = Rectangle::create(Size(100, 100));
group->add(rect);
this->add(group);