/// <summary> /// Called when the player selects destination for gold /// </summary> void GoldDestinationSelected_(ButtonValues selection) { _goldZone = selection; _selectionState = MineSelectionState.CoalDestination; Carts[(int)selection].SetContents(MineItemDrop.Gold); TxtCommentary.text = _players[_activePlayerIndex].GetPlayerName() + ":\nWhere would you like to place the COAL?"; }
public Layout() { buttonValues = new ButtonValues[7]; for (int i = 0; i < 7; i++) { buttonValues[i] = new ButtonValues(); } }
public TriggerControllerButton( string namePart, int button, ButtonValues buttonValue, string macroName) : base(namePart, macroName) { this.Type = TriggerType.ControllerButton; this.button = button; this.buttonValue = buttonValue; }
/// <summary> /// Called when the player selects destination for gold /// </summary> void GoldClaimSelected_(ButtonValues selection) { // stop the time limit _zoneSelectionLimit.Abort(); // store the selection _goldClaimZone = selection; _selectionState = MineSelectionState.None; // show carts and enable movement StartCoroutine(MoveCartsOn()); StartCoroutine(Runaround_()); }
public static ButtonValues GetButtonValues(DateTime initialDate, DateTime finalDate) { ButtonValues buttonValues = new ButtonValues(); buttonValues.Payables = FinancialManager.GetPayables(initialDate, finalDate); buttonValues.Receivables = FinancialManager.GetReceivables(initialDate, finalDate); buttonValues.NetPurchases = PurchasesManager.GetNetPurchases(initialDate, finalDate); buttonValues.NetSales = SalesManager.GetNetSales(initialDate, finalDate); buttonValues.GrossPurchases = PurchasesManager.GetGrossPurchases(initialDate, finalDate); buttonValues.GrossSales = SalesManager.GetGrossSales(initialDate, finalDate); buttonValues.LaborCostValue = HumanResourcesManager.GetHumanResourcesSpendings(initialDate, finalDate); buttonValues.Currency = "EUR"; return(buttonValues); }
public static ButtonValues GetButtonValues(DateTime initialDate, DateTime finalDate) { ButtonValues buttonValues = new ButtonValues(); buttonValues.Payables = FinancialManager.GetPayables(initialDate, finalDate); buttonValues.Receivables = FinancialManager.GetReceivables(initialDate, finalDate); buttonValues.NetPurchases = PurchasesManager.GetNetPurchases(initialDate, finalDate); buttonValues.NetSales = SalesManager.GetNetSales(initialDate, finalDate); buttonValues.GrossPurchases = PurchasesManager.GetGrossPurchases(initialDate, finalDate); buttonValues.GrossSales = SalesManager.GetGrossSales(initialDate, finalDate); buttonValues.LaborCostValue = HumanResourcesManager.GetHumanResourcesSpendings(initialDate, finalDate); buttonValues.Currency = "EUR"; return buttonValues; }
/// <summary> /// A player has selected an input /// </summary> /// <param name="playerIndex">The player that selected the input</param> /// <param name="selection">The item that was selected</param> public void OptionSelected(int playerIndex, ButtonValues selection) { // if not the active player, ignore if (playerIndex == _activePlayerIndex) { // do the correct action based on the selection state switch (_selectionState) { case MineSelectionState.GoldDestination: GoldDestinationSelected_(selection); break; case MineSelectionState.CoalDestination: CoalDestinationSelected_(selection); break; case MineSelectionState.GoldClaim: GoldClaimSelected_(selection); break; } } }
/// <summary> /// Called when the player selects destination for coal /// </summary> void CoalDestinationSelected_(ButtonValues selection) { // can't put coal and gold in the same zone if (_goldZone != selection) { TxtErrorMessage.text = ""; _coalZone = selection; _selectionState = MineSelectionState.GoldClaim; Carts[(int)selection].SetContents(MineItemDrop.Coal); TxtCommentary.text = _players[_activePlayerIndex].GetPlayerName() + ":\nTell the other players where you put the gold.\nYou get " + Truth_Points + " for telling the truth,\nor " + Wrong_Points + " for each player who picks\nthe cart that contains coal"; } else { TxtErrorMessage.text = "Gold and coal cannot go into same cart"; } }
public CalculatorForm() { InitializeComponent(); _buttonValues = new ButtonValues(); _calculator = new Calculator(); foreach (var element in MainGrid.Children) { if (element is Button) { ((Button)element).Click += Button_Click; } } CalculationInput = _buttonValues.ZERO; CalculationHistory = string.Empty; }
/// <summary> /// Callback for the zone selection timer - called once timer expires /// </summary> void ZoneSelectionTimeoutCallback_() { _timeoutOccurred = true; var random = UnityEngine.Random.Range(0, 3); _goldZone = (ButtonValues)random; _goldClaimZone = (ButtonValues)random; _coalZone = (ButtonValues)(3 - random); TxtErrorMessage.text = ""; _selectionState = MineSelectionState.None; // add items to carts Carts[random].SetContents(MineItemDrop.Gold); Carts[3 - random].SetContents(MineItemDrop.Coal); // show carts and enable movement StartCoroutine(MoveCartsOn()); StartCoroutine(Runaround_()); }
public Calculator() { _buttonValues = new ButtonValues(); firstArgument = null; }