oulah 2
This commit is contained in:
parent
ff84620152
commit
468b87faed
@ -160,8 +160,22 @@ void ConfigBuilder::readConfig() {
|
||||
|
||||
readGrid("grid");
|
||||
|
||||
if (collectedData.theme != "bad"){
|
||||
collectedData.playersWidth = 90;
|
||||
collectedData.invadersSize = 30;
|
||||
collectedData.missilesWidth = 32;
|
||||
collectedData.torpedosWidth = 11;
|
||||
|
||||
}
|
||||
else{
|
||||
collectedData.playersWidth = getInt("players.width", 100, 50, 500);
|
||||
collectedData.invadersSize = getInt("invaders.size",30,10,100);
|
||||
collectedData.missilesWidth = getInt("projectiles.missiles.width",10,5,100);
|
||||
collectedData.torpedosWidth = getInt("projectiles.torpedos.width",10,1,100);
|
||||
}
|
||||
|
||||
// players
|
||||
collectedData.playersWidth = getInt("players.width", 100, 50, 500);
|
||||
|
||||
collectedData.startXPosition = getInt("players.startXPosition",600 ,0 ,1200);
|
||||
collectedData.playersSpeed = getInt("players.speed",1,1,100);
|
||||
collectedData.playersFireCooldown = getInt("players.fireCooldown",10,1,100);
|
||||
@ -174,7 +188,7 @@ void ConfigBuilder::readConfig() {
|
||||
readPlayer("players.user2", collectedData.playerDefs[1]);
|
||||
|
||||
// invaders
|
||||
collectedData.invadersSize = getInt("invaders.size",30,10,100);
|
||||
|
||||
collectedData.invadersSpeed = getInt("invaders.speed",7,1,100);
|
||||
collectedData.invadersDistance = getInt("invaders.distance",15,5,100);
|
||||
collectedData.invadersFireCooldown = getInt("invaders.fireCooldown",0,0,100);
|
||||
@ -184,12 +198,10 @@ void ConfigBuilder::readConfig() {
|
||||
readInvaderType("invaders.typeC", collectedData.invadersDef[InvaderType::TYPEC]);
|
||||
|
||||
// projectiles
|
||||
collectedData.missilesWidth = getInt("projectiles.missiles.width",10,5,100);
|
||||
collectedData.missilesLength = collectedData.missilesWidth*PROJ_LENGTH_FACTOR;
|
||||
collectedData.missilesSpeed = getInt("projectiles.missiles.speed",10,5,100);
|
||||
getColor("projectiles.missiles.color", collectedData.missilesColor);
|
||||
|
||||
collectedData.torpedosWidth = getInt("projectiles.torpedos.width",10,1,100);
|
||||
collectedData.torpedosLength = collectedData.torpedosWidth*PROJ_LENGTH_FACTOR;
|
||||
collectedData.torpedosSpeed = getInt("projectiles.torpedos.speed",10,1,100);
|
||||
getColor("projectiles.torpedos.color", collectedData.torpedosColor);
|
||||
|
||||
|
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
Loading…
Reference in New Issue
Block a user