private void AssignCoffeeMachineButtons() { root.Q <Button>("OnButton").clicked += () => { coffeeMachine.ToggleMachine(true); }; root.Q <Button>("OffButton").clicked += () => { coffeeMachine.ToggleMachine(false); }; root.Q <Button>("MildButton").clicked += () => { coffeeMachine.ChangeCoffeeType(CoffeeStrength.Mild); }; root.Q <Button>("NormalButton").clicked += () => { coffeeMachine.ChangeCoffeeType(CoffeeStrength.Normal); }; root.Q <Button>("StrongButton").clicked += () => { coffeeMachine.ChangeCoffeeType(CoffeeStrength.Strong); }; root.Q <Button>("SmallButton").clicked += () => { coffeeMachine.ChangeCoffeeSize(CoffeeSize.Small); }; root.Q <Button>("MediumButton").clicked += () => { coffeeMachine.ChangeCoffeeSize(CoffeeSize.Medium); }; root.Q <Button>("BigButton").clicked += () => { coffeeMachine.ChangeCoffeeSize(CoffeeSize.Big); }; root.Q <Button>("MakeFavoriteCoffeeButton").clicked += () => { status.value = coffeeMachine.MakeFavoriteCoffee().ToString(); }; root.Q <Button>("MakeCoffeeButton").clicked += () => { status.value = coffeeMachine.MakeRegularCoffee().ToString(); }; }
public void OnMildPressed() { coffeeMachine.ChangeCoffeeType(CoffeeStrength.Mild); }