private void clearCurrentPowerSelection() { if (currentPower) { currentPower.clearHighlight(); currentPower = null; } }
public void setCurrentPower(GodPowerButton nextPower) { if (currentPower != nextPower) { if (currentPower) { currentPower.clearHighlight(); } GodPower thePower = godPowerDictionary[nextPower.buttonId]; var powerCost = thePower.getEnergyCost(); if (playerGod.energy > powerCost) { currentPower = nextPower; nextPower.highlight(); } } }