public void OnInteract(T_Player player) { if (HasEaten) { return; } if (player.ServeCustomer(ingredients)) { player.IncrementScore(ingredients.Count * Constants.SATISFIED_CUSTOMER_REWARD); player.IncrementTime(ingredients.Count * Constants.SATISFIED_CUSTOMER_REWARD_TIME); State = CustomerState.LEAVING; player.ThrowInDustbin(); } else { if (State != CustomerState.ANGRY) { failedServer = player; State = CustomerState.ANGRY; } else { if (player == failedServer) { failedServer.IncrementScore(2 * Constants.ANGRY_CUSTOMER_PENALTY); } else { playerManager.PenalizeAll(); } State = CustomerState.LEAVING; } } }
public void OnInteract(T_Player player) { if (player.ThrowInDustbin()) { player.IncrementScore(Constants.ANGRY_CUSTOMER_PENALTY); } }