本文整理汇总了C++中ParticleEffect::Move方法的典型用法代码示例。如果您正苦于以下问题:C++ ParticleEffect::Move方法的具体用法?C++ ParticleEffect::Move怎么用?C++ ParticleEffect::Move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleEffect
的用法示例。
在下文中一共展示了ParticleEffect::Move方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _AddEffect
ParticleEffect* ParticleManager::_AddEffect(const ParticleEffectDef *def, float x, float y)
{
if (!def) {
IF_PRINT_WARNING(VIDEO_DEBUG)
<< "AddEffect() failed because def was NULL!" << std::endl;
return 0;
}
if (def->_systems.empty()) {
IF_PRINT_WARNING(VIDEO_DEBUG)
<< "AddEffect() failed because def->_systems was empty!" << std::endl;
return 0;
}
ParticleEffect *effect = _CreateEffect(def);
if (!effect) {
IF_PRINT_WARNING(VIDEO_DEBUG)
<< "Could not create particle effect!" << std::endl;
return 0;
}
effect->Move(x, y);
_all_effects.push_back(effect);
_active_effects.push_back(effect);
return effect;
};
示例2: AddParticleEffect
bool ParticleManager::AddParticleEffect(const std::string &effect_filename, float x, float y)
{
ParticleEffect *effect = new ParticleEffect(effect_filename);
if(!effect->IsLoaded()) {
PRINT_WARNING << "Failed to add effect to particle manager" <<
" for file: " << effect_filename << std::endl;
delete effect;
return false;
}
effect->Move(x, y);
_all_effects.push_back(effect);
_active_effects.push_back(effect);
return true;
}