//============================================================================= // default constructor //============================================================================= Boss::Boss() : Entity() { spriteData.width = bossNS::WIDTH; spriteData.height = bossNS::HEIGHT; spriteData.x = bossNS::X; // location on screen spriteData.y = bossNS::Y; spriteData.rect.bottom = bossNS::HEIGHT/2; // rectangle to select parts of an image spriteData.rect.right = bossNS::WIDTH; velocity = D3DXVECTOR2(0,0); startFrame = 0; // first frame of ship animation endFrame = 0; // last frame of ship animation currentFrame = startFrame; radius = bossNS::WIDTH/2.0; // collision radius collision = false; collisionType =entityNS::BOX;// entityNS::CIRCLE; target = false; edge.bottom = bossNS::HEIGHT/2; edge.top = -bossNS::HEIGHT/2; edge.right = bossNS::WIDTH/2; edge.left = -bossNS::WIDTH/2; spriteData.scale = 1; active = true; speed = 100; hits = 0; setInvisible(); emp.resetScale(); emp.setMaxEMPTime(0.4f); //maxHits = 3; }
bool Boss::wasHit() { hits += 1; if(hits>=maxHits) { setInvisible(); return true; } return false; }
InspectorGroupElement::InspectorGroupElement(QWidget* parent) : InspectorBase(parent) { QWidget* w = new QWidget; ge.setupUi(w); _layout->insertWidget(_layout->count()-1, w); ge.color->setColor(Qt::black); connect(ge.setColor, SIGNAL(clicked()), SLOT(setColor())); connect(ge.setVisible, SIGNAL(clicked()), SLOT(setVisible())); connect(ge.setInvisible, SIGNAL(clicked()), SLOT(setInvisible())); // // Select // QLabel* l = new QLabel; l->setText(tr("Select")); QFont font(l->font()); font.setBold(true); l->setFont(font); l->setAlignment(Qt::AlignHCenter); _layout->addWidget(l); QFrame* f = new QFrame; f->setFrameStyle(QFrame::HLine | QFrame::Raised); f->setLineWidth(2); _layout->addWidget(f); QHBoxLayout* hbox = new QHBoxLayout; notes = new QToolButton(this); notes->setText(tr("Notes")); notes->setEnabled(true); hbox->addWidget(notes); rests = new QToolButton(this); rests->setText(tr("Rests")); rests->setEnabled(true); hbox->addWidget(rests); _layout->addLayout(hbox); connect(notes, SIGNAL(clicked()), SLOT(notesClicked())); connect(rests, SIGNAL(clicked()), SLOT(restsClicked())); }
void Player::intersectedPickup(Pickup *pPickup) { if (pPickup->pickupType == Health_T && health < 100) { health = 100; pPickup->enabled = false; pPickup->elapsedTime = sf::Time::Zero; } else if (pPickup->pickupType == Ammo_T && ammo < 255) { ammo = (unsigned char) std::min(ammo + 5, 255); pPickup->enabled = false; pPickup->elapsedTime = sf::Time::Zero; } else if (pPickup->pickupType == Invisible_T) { setInvisible(); invisibleTime = sf::Time::Zero; pPickup->enabled = false; } }
bool EvaSystemTray::qt_invoke( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: changeToolTip((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1))),(const QString&)static_QUType_QString.get(_o+2),(const short)(*((const short*)static_QUType_ptr.get(_o+3)))); break; case 1: setOnline(); break; case 2: setOffline(); break; case 3: setLeave(); break; case 4: setInvisible(); break; case 5: setLoginWaiting(); break; case 6: newTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1)))); break; case 7: newTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1))),(short)(*((short*)static_QUType_ptr.get(_o+2)))); break; case 8: gotTxtMessage((const unsigned int)(*((const unsigned int*)static_QUType_ptr.get(_o+1)))); break; case 9: newSysMessage(); break; case 10: gotSysMessage(); break; case 11: static_QUType_int.set(_o,getSenderID()); break; case 12: slotTimeout(); break; case 13: slotClickTimeout(); break; case 14: minMaxAction(); break; default: return KSystemTray::qt_invoke( _id, _o ); } return TRUE; }
FUNCTION void Q5MC(obj Q4XN) { setInvisible(Q4XN, 0x00); detachScript(Q4XN, "reminvis"); return; }
void LeprechaunController::onCapturePig() { setBeginFlag(LeprechaunFlag::carryingPig, true); setInvisible(false); }
void RPropertyAttributes::mixWith(const RPropertyAttributes & other) { setAffectsOtherProperties(affectsOtherProperties() || other.affectsOtherProperties()); setInvisible(isInvisible() || other.isInvisible()); choices.intersect(other.choices); }