private void SetButtonPressed(Properties.Color buttonColor) { /* Algorithm: SetButtonPressed * Description: Intermediate logic for set pressed button for player * * colorButtonPressed * * START * buttonPressed <-- SEARCH colorButtonPressed in buttons INDEX * END */ if (buttonColor == Properties.Color.Red) { ButtonPressed = buttons [0]; } else if (buttonColor == Properties.Color.Green) { ButtonPressed = buttons [1]; } else if (buttonColor == Properties.Color.Blue) { ButtonPressed = buttons [2]; } marathon.gameObject.SendMessage("AssignNewColorToCube"); }
public Properties.TouchStatus CheckTouchCorrectFloor(Properties.Color floorColor) { /* Algorithm: CheckTouchCorrectFloor * Description: Check if cube touch a floor with same color * * floorColor * * START * IF color is EQUAL TO floorColor * RETURN true * ELSE IF cube.color is NOT EQUAL TO floorColor * RETURN false * END */ if (floorColor != Properties.Color.White) { if (currentColor == floorColor) { return(Properties.TouchStatus.Successful); } else if (currentColor != floorColor) { return(Properties.TouchStatus.Failed); } } return(Properties.TouchStatus.Neutral); }
void CheckPressedButton(Properties.Color color) { /* Algorithm: CheckPressedButton * Description: Get button pressed and send this to BoardAction * * START * SEND color button to INTERFACE action in BoardAction * END */ boardActions.gameObject.SendMessage("SetButtonPressed", color); }
public Settings() { settings = Properties.Settings.Default; colorSettings = Properties.Color.Default; }