public void FacePad(bool a_faceDown, bool a_faceUp, bool a_faceLeft, bool a_faceRight)
{
if (!buttonDown)
{
// Check to see if I can fire any countermeasures
//if (gotPickup)
{
// Missile is UP, Chaff is DOWN, Mine is RIGHT, Pinwheel is LEFT
if (a_faceDown && chaffCooldown <= 0)//(a_down)
{
SpawnChaff();
buttonDown = true;
gotPickup = false;
}
if (a_faceUp && missileCooldown <= 0) //(a_up)
{
SpawnMissile();
buttonDown = true;
gotPickup = false;
}
if (a_faceRight && minesCooldown <= 0) //(a_right)
{
SpawnSkyMine();
buttonDown = true;
gotPickup = false;
}
if (a_faceLeft && pinwheelCooldown <= 0) //(a_left)
{
SpawnPinwheel();
buttonDown = true;
gotPickup = false;
}
}
}
//Reset button
//if (!a_down && !a_up && !a_left && !a_right)
if (!a_faceDown && !a_faceUp && !a_faceLeft && !a_faceRight)
{
buttonDown = false;
}
}