private void AddBonus(PrizeList prize) { switch (prize) { case PrizeList.trapQntIncrease: quantityOfTraps++; /* ChangeScore("Traps added");*/ break; case PrizeList.trapQntDecrease: quantityOfTraps = quantityOfTraps == 1 ? 1 : quantityOfTraps--; /* ChangeScore("Traps removed");*/ break; case PrizeList.splashRangeIncrease: splashLength++; break; case PrizeList.splashRangeDecrease: splashLength = splashLength == 1 ? 1 : splashLength--; break; case PrizeList.speedIncrease: step++; break; case PrizeList.speedDecrease: step = step <= 3 ? 3 : step--; break; default: break; } ChangeScore(prize.ToString()); }
public static PrizeList GetBonus() { if (bonusList.Count == 0) { return(PrizeList.empty); } PrizeList prize = bonusList[0]; bonusList.Remove(prize); return(prize); }
private async Task <PrizeList> GetPrizeData() { var client = _httpClientFactory.CreateClient(); client.BaseAddress = new Uri("http://api.nobelprize.org"); var result = await client.GetAsync("/v1/prize.json"); result.EnsureSuccessStatusCode(); var stringResult = await result.Content.ReadAsStringAsync(); PrizeList data = JsonConvert.DeserializeObject <PrizeList>(stringResult); return(data); }
public override void OnEnter() { base.OnEnter(); prizeList = Owner.GetComponent <PrizeList>(); }
private void AddBonus(PrizeList prize) { }
private void списокВиданихПремійToolStripMenuItem_Click(object sender, EventArgs e) { PrizeList prizes = new PrizeList(); prizes.Show(); }