⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmdecorator.cpp

📁 Soul的源代码,类似于劲舞团之类的游戏
💻 CPP
字号:
#include "CMDecorator.h"

using namespace MatrixCore::Pattern;

CMDecorator::CMDecorator()
	: prev( 0 ), next( 0 )
{
}

CMDecorator::~CMDecorator()
{
	remove();
}

bool CMDecorator::process()
{
	while( next != 0 && next->process() == false )
		delete next;

	return true;
}

void CMDecorator::add( CMDecorator* d )
{
	if( d == 0 )
		return;

	d->prev = this;
	d->next = next;
	if( next != 0 )
		next->prev = d;
	next = d;
}

void CMDecorator::addTail( CMDecorator* d )
{
	if( next == 0 )
	{
		next = d;
		next->prev = this;
	}
	else
		next->addTail( d );
}

void CMDecorator::remove()
{
	if( prev != 0 )
		prev->next = next;
	if( next != 0 )
		next->prev = prev;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -