本文整理汇总了C++中Global::getGlobal方法的典型用法代码示例。如果您正苦于以下问题:C++ Global::getGlobal方法的具体用法?C++ Global::getGlobal怎么用?C++ Global::getGlobal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Global
的用法示例。
在下文中一共展示了Global::getGlobal方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: preGameTracker
void preGameTracker(int x, int y) {
globe.getGlobal()->mX = x;
globe.getGlobal()->mY = y;
if (x > 1.5) {
menu = ( y / 150);
}
}
示例2: preGameMouseEvent
void preGameMouseEvent(int button, int state, int x, int y) {
if(x>1.5){
if (button == 0 && state == 0) {
globe.getGlobal()->mouseDown = true;
pick = menu;
}
if (button == 0 && state == 1) {
globe.getGlobal()->mouseDown = false;
if (x > 1.5) {
menu = (y / 150);
preGameSelect;
}
if(menu==pick){
curtain.setFlip(true);
}
}
}
}
示例3: preGameUpdater
void preGameUpdater() {
if (curtain.getFrame() == 60) {
globe.getGlobal()->stage = pick+1;
globe.getGlobal()->settingTable = false;
if(pick==0){
PlaySound(NULL, 0, 0);
}
}
glutPostRedisplay();
}
示例4: drawPreGameBack
void drawPreGameBack()
{
glPushMatrix(); {
if (globe.getGlobal()->option.KONAMI_TRIG) {
globe.getGlobal()->rainbowTyrenol[0] = (globe.getGlobal()->rainbowTyrenol[0] + 0.01) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[0] + 0.01);
globe.getGlobal()->rainbowTyrenol[1] = (globe.getGlobal()->rainbowTyrenol[1] + 0.015) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[1] + 0.015);
globe.getGlobal()->rainbowTyrenol[2] = (globe.getGlobal()->rainbowTyrenol[2] + 0.02) > 1 ? 0.5 : (globe.getGlobal()->rainbowTyrenol[2] + 0.02);
glColor3f(globe.getGlobal()->rainbowTyrenol[0], globe.getGlobal()->rainbowTyrenol[1], globe.getGlobal()->rainbowTyrenol[2]);
}
else {
glColor3f(0.2, 0.9, 0.2);
}
glBegin(GL_POLYGON); {
glVertex3f(0, 2, 0.0);
glVertex3f(2, 2, 0.0);
glVertex3f(2, 0, 0.0);
glVertex3f(0, 0, 0.0);
}
glEnd();
}
glPopMatrix();
if(globe.getGlobal()->option.KONAMI_TRIG){
globe.getGlobal()->beMyRain->drawRain();
}
glColor4f(0.2, 0.2, 0.2,0.5);
glBegin(GL_POLYGON); {
glVertex3f(0, 1.3, 0);
glVertex3f(2, 1.3, 0);
glVertex3f(2, 0.7, 0);
glVertex3f(0, 0.7, 0);
}
glEnd();
glColor3f(0.2, 0.9, 0.9);
glBegin(GL_POLYGON); {
glVertex3f(1.3,2,0);
glVertex3f(2,2,0);
glVertex3f(2,0,0);
glVertex3f(1.3,0,0);
}
glEnd();
}
示例5: drawCursor
void drawCursor() {
glLoadIdentity();
if(globe.getGlobal()->mouseDown){
glColor3f(1, 1, 1);
}
else{
glColor3f(0.8,0.8,0.8);
}
glPushMatrix(); {
glTranslatef(1.4, 1.6 - (0.6*menu), 0);
glBegin(GL_TRIANGLES); {
glVertex3f(0, 0.05, 0);
glVertex3f(0 + 0.05*sqrt(3), 0, 0);
glVertex3f(0, -0.05, 0);
}
glEnd();
}
glPopMatrix();
}