public void Upgrade() { if (zoneType == 1) { if (PointAndCurency.GetGold() >= 300) //cost 300 { PointAndCurency.subtractGold(300); zoneType = zoneType + 1; upgradeCost = 500; //new cost //numberOfSouls = 50; for (int x = 0; x < numberOfSouls; x++) { Souls.createSoul(); } } } else if (zoneType == 2) { if (PointAndCurency.GetGold() >= 500) //cost 500 { PointAndCurency.subtractGold(500); zoneType = zoneType + 1; upgradeCost = 700; //new cost //numberOfSouls = numberOfSouls + 50; for (int x = 0; x < 50; x++) { Souls.createSoul(); } } } else if (zoneType == 3) { if (PointAndCurency.GetGold() >= 700) //cost 700 { PointAndCurency.subtractGold(700); zoneType = zoneType + 1; upgradeCost = 1000; //new cost //numberOfSouls = numberOfSouls + 25; for (int x = 0; x < 25; x++) { Souls.createSoul(); } } } else if (zoneType == 4) { if (PointAndCurency.GetGold() >= 1000) //cost 1000 { PointAndCurency.subtractGold(1000); zoneType = zoneType + 1; upgradeCost = 0; //new cost //numberOfSouls = numberOfSouls + 25; for (int x = 0; x < 25; x++) { Souls.createSoul(); } } } //if (zoneType == (int)ZoneStates.Water) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Earth; // //} //} //if (zoneType == (int)ZoneStates.Earth) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Village; // //} //} //if (zoneType == (int)ZoneStates.Village) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Town; // //} //} //if (zoneType == (int)ZoneStates.Town) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.City; // //} //} //if (zoneType == (int)ZoneStates.City) //{ // //Message that zone is not upgradable any further //} }
public void Upgrade() { if (zoneType == 1) { if (PointAndCurency.GetGold() > 300) { PointAndCurency.subtractGold(300); zoneType = zoneType + 1; } } else if (zoneType == 2) { if (PointAndCurency.GetGold() > 500) { PointAndCurency.subtractGold(500); zoneType = zoneType + 1; } } else if (zoneType == 3) { if (PointAndCurency.GetGold() > 700) { PointAndCurency.subtractGold(700); zoneType = zoneType + 1; } } else if (zoneType == 4) { if (PointAndCurency.GetGold() > 1000) { PointAndCurency.subtractGold(1000); zoneType = zoneType + 1; } } //if (zoneType == (int)ZoneStates.Water) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Earth; // //} //} //if (zoneType == (int)ZoneStates.Earth) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Village; // //} //} //if (zoneType == (int)ZoneStates.Village) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.Town; // //} //} //if (zoneType == (int)ZoneStates.Town) //{ // //(If player has enough money resources) then do rest // To be implemented // //{ // zoneType = (int)ZoneStates.City; // //} //} //if (zoneType == (int)ZoneStates.City) //{ // //Message that zone is not upgradable any further //} }