//gets current card data after clicking Yes/no buttons public void GetCardData() { cardData = cardSpawner.GetComponentInChildren <Card>(); cardWeight = cardData.weight; cardType = cardData.cardType; int cardscore = cardData.score; score += cardscore; yesButton.GetComponent <Button>().interactable = false; noButton.GetComponent <Button>().interactable = false; // The next card is delayed by 1 second to allow time for the weight to drop and the player to notice the card // is changed. Also the yes/no buttons will be inactive during this time to prevent spamming Invoke("DelayChoosingCard", 1f); }
public ExerciseItem(int id, string name, List <MuscleGroup> muscles, string type, List <string> weightTypes, string desc = "", string img = "", string link = "") { ID = id; Name = name; Muscles = muscles; Description = desc; ImageSource = img; Link = link; ExerciseType t; Enum.TryParse(type, true, out t); Type = t; foreach (var wt in weightTypes) { WeightType w; Enum.TryParse(wt, true, out w); WeightTypes.Add(w); } }
public override double CalculateFuelConsumption(double averageSpeed) { return(base.CalculateFuelConsumption(averageSpeed) * WeightTypes.GetCoefficient(trailerWeightType)); }