本文整理汇总了C++中Quad::setDecayRate方法的典型用法代码示例。如果您正苦于以下问题:C++ Quad::setDecayRate方法的具体用法?C++ Quad::setDecayRate怎么用?C++ Quad::setDecayRate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quad
的用法示例。
在下文中一共展示了Quad::setDecayRate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: paint
void AutoMap::paint(const Vector &pos)
{
Quad *q = new Quad("particles/WhiteGlow", pos);
q->setLife(1);
q->setDecayRate(0.5);
q->color = paintColor;
q->followCamera = 1;
q->setWidthHeight(8,8);
dsq->game->addRenderObject(q, this->layer);
}
示例2: spawnChildClone
void Quad::spawnChildClone(float t)
{
if (!this->texture) return;
Quad *q = new Quad;
q->setTexture(this->texture->name);
q->setLife(t+0.1f);
q->setDecayRate(1);
q->width = this->width;
q->height = this->height;
q->alpha = 1;
q->alpha.interpolateTo(0, t);
if (isfh())
q->flipHorizontal();
q->position = this->position;
q->followCamera = this->followCamera;
q->scale = this->scale;
q->offset = this->offset;
q->blendType = this->blendType;
//q->parentManagedPointer = true;
//q->renderBeforeParent = false;
core->getTopStateData()->addRenderObject(q, this->layer);
//addChild(q);
}