Magic_Game/Easy2D/Object/Layer.cpp

28 lines
312 B
C++

#include "..\easy2d.h"
Layer::Layer() :
m_bBlock(true)
{
}
Layer::~Layer()
{
}
int Layer::getBlock() const
{
return m_bBlock;
}
void Layer::setBlock(bool block)
{
m_bBlock = block;
}
bool Layer::_exec(bool active)
{
// 若图层阻塞消息,则永远取得画面焦点
return BatchNode::_exec(active) || m_bBlock;
}