本文整理汇总了C++中Quad::setWidthHeight方法的典型用法代码示例。如果您正苦于以下问题:C++ Quad::setWidthHeight方法的具体用法?C++ Quad::setWidthHeight怎么用?C++ Quad::setWidthHeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Quad
的用法示例。
在下文中一共展示了Quad::setWidthHeight方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: applyState
void Logo::applyState()
{
StateObject::applyState();
core->setClearColor(Vector(1,1,1));
//glClearColor(1,1,1,0);
//core->enable2D(800);
/*
Quad *q = new Quad;
{
q->setTexture("zs");
q->width=800;
q->height=100;
q->position = Vector(400,300);
q->alpha = 0;
q->alpha.interpolateTo(1, 3, 0);
}
addRenderObject(q);
addAction(&jumpTitle, MOUSE_BUTTON_LEFT, 1);
*/
Quad *q = new Quad;
{
q->setTexture("sky");
q->setWidthHeight(800, 600);
q->position = Vector(400,300);
q->alpha = 0;
q->alpha.interpolateTo(1, 3, 0);
}
addRenderObject(q);
}
示例3: applyState
void Nag::applyState()
{
StateObject::applyState();
click = 0;
dsq->cursor->offset.stop();
dsq->cursor->internalOffset.stop();
dsq->cursor->offset = Vector(0,0,0);
dsq->cursor->internalOffset = Vector(0,0,0);
dsq->cursor->color = Vector(0,0,0);
dsq->sound->stopMusic();
hitBuy = false;
core->setInputGrab(false);
grab = false;
dsq->overlay2->alpha = 0;
dsq->stopVoice();
Quad *bg = new Quad("nag/nag", Vector(400,400));
bg->setWidthHeight(800, 800);
bg->followCamera = 1;
addRenderObject(bg, LR_BACKGROUND);
AquariaMenuItem *buy = new AquariaMenuItem();
buy->followCamera = 1;
buy->position = Vector(630, 400); //300, 540);
//buy->setLabel("Buy");
buy->useGlow("particles/glow", 480, 128);
buy->event.set(MakeFunctionEvent(Nag, onBuy));
buy->setDirMove(DIR_LEFT, buy);
buy->setDirMove(DIR_RIGHT, buy);
buy->setDirMove(DIR_UP, buy);
addRenderObject(buy, LR_BACKGROUND);
AquariaMenuItem *exit = new AquariaMenuItem();
exit->followCamera = 1;
exit->position = Vector(732, 543);
//exit->setLabel("Exit");
exit->useGlow("particles/glow", 128, 64);
exit->event.set(MakeFunctionEvent(Nag, onExit));
exit->setDirMove(DIR_LEFT, exit);
exit->setDirMove(DIR_RIGHT, exit);
exit->setDirMove(DIR_DOWN, exit);
addRenderObject(exit, LR_BACKGROUND);
buy->setDirMove(DIR_DOWN, exit);
exit->setDirMove(DIR_UP, buy);
buy->setFocus(true);
ic = 0;
irot.clear();
//Vector framePos(235, 405);
Vector framePos(240, 400);
Vector frameScale(0.98, 0.98);
for (int i = 0; i < numScreens; i++)
{
std::ostringstream os;
os << "nag/s-" << numToZeroString(i, 4);
Quad *q = new Quad(os.str(), framePos);
q->setTexture(os.str());
if (i != 0)
q->alpha = 0;
else
{
q->alpha = 0;
q->alpha.interpolateTo(1, nagFadeTime);
}
q->scale = Vector(0.75, 0.75) * frameScale;
addRenderObject(q, LR_BACKGROUND);
irot.push_back(q);
}
Quad *frame = new Quad("nag/nag-frame", framePos);
frame->scale = frameScale;
addRenderObject(frame, LR_BACKGROUND);
dsq->toggleCursor(1, 0.5);
dsq->fade(0, 1);
dsq->main(1);
dsq->sound->playMusic("openwaters3", SLT_NORMAL, SFT_IN, 2);
}