Esempio n. 1
0
void MiniGolf::GameInit(){	
	levelPars = resMan->getLevelPars();
	levelNames = resMan->getLevelNames();
	ballMoving = false;
	arrowAngle = 0;
	strokeNum = totalScore = 0;
	objVerts.push_back(gameObjectData->at("ballVert"));
	objVerts.push_back(gameObjectData->at("arrowVert"));
	objVerts.push_back(gameObjectData->at("cupVert"));
	objNorms.push_back(gameObjectData->at("ballNorm"));
	objNorms.push_back(gameObjectData->at("arrowNorm"));
	objNorms.push_back(gameObjectData->at("cupNorm"));
	objColor.push_back(gameObjectData->at("ballColor"));
	objColor.push_back(gameObjectData->at("arrowColor"));
	objColor.push_back(gameObjectData->at("cupColor"));
	objIndices[0] = make_pair(0, 0);
	objIndices[1] = make_pair(1, 1);
	objIndices[2] = make_pair(2, 2);
	setDefaultModelView(defaultView);
		
	cup = Cup();
	ball = Ball();
	cup.setPos(cups[0].x, cups[0].y, cups[0].z);
	modelViews[2] = glm::translate(defaultView,glm::vec3(cup.x, cup.z, cup.y));
	ball.Initialize(tees[0].x, tees[0].y, tees[0].z);
	camManager = new Camera(&ball);
	camManager->setCamPos(5, 5, 7);
	camManager->setCamTarg(0, 0, 0);
}
void PacanariDamaman::GameInit(){	
	levelPars = resMan->getLevelPars();
	levelNames = resMan->getLevelNames();
	ballMoving = nextLevelCheat = swingDir = false;
	arrowAngle = rightAngle = leftAngle = 0;
	strokeNum = totalScore = 0;
	objVerts.push_back(gameObjectData->at("ballVert"));
	objVerts.push_back(gameObjectData->at("cupVert"));
	objVerts.push_back(gameObjectData->at("pacanariBodyVert"));
	objVerts.push_back(gameObjectData->at("pacanariCollarVert"));
	objVerts.push_back(gameObjectData->at("pacanariLimbVert"));
	objNorms.push_back(gameObjectData->at("ballNorm"));
	objNorms.push_back(gameObjectData->at("cupNorm"));
	objNorms.push_back(gameObjectData->at("pacanariBodyNorm"));
	objNorms.push_back(gameObjectData->at("pacanariCollarNorm"));
	objNorms.push_back(gameObjectData->at("pacanariLimbNorm"));
	objColor.push_back(gameObjectData->at("ballColor"));
	objColor.push_back(gameObjectData->at("cupColor"));
	objColor.push_back(gameObjectData->at("pacanariBodyColor"));
	objColor.push_back(gameObjectData->at("pacanariCollarColor"));
	objColor.push_back(gameObjectData->at("pacanariLimbColor"));
	objIndices[0] = make_pair(0, 0);
	objIndices[1] = make_pair(1, 1);
	objIndices[2] = make_pair(2, 2);
	objIndices[3] = make_pair(3, 3);
	objIndices[4] = make_pair(4, 4);
	objIndices[5] = make_pair(5, 4);
	objIndices[6] = make_pair(6, 4);
	objIndices[7] = make_pair(7, 4);
	setDefaultModelView(defaultView);
		
	cup = Cup();
	ball = Ball();
	cup.setPos(cups[0].x, cups[0].y, cups[0].z);
	modelViews[1] = glm::translate(defaultView,glm::vec3(cup.x, cup.z, cup.y));
	ball.Initialize(tees[0].x, tees[0].y, tees[0].z);
	camManager = new Camera(&ball);


}
Esempio n. 3
0
 Cup createProduct() { return Cup(); }
Esempio n. 4
0
/**
 * Literal for cup (cup/cups)
 *
 * @param long double d
 * @return Cup
 */
constexpr Cup operator "" _cup(long double d)
{
    return Cup(d);
}