bool DoTheThing(Wish w) { Tracker.Log(PlayerEvent.UsedInventory, true, customAttributes: new Dictionary <string, string>() { { "attribute_2", Peripheral.Instance.difficulty.ToString() }, { "attribute_1", w.type.ToString() } }, customMetrics: new Dictionary <string, double>() { { "metric_1", w.getEffect() } }); bool status = false; switch (w.type) { case WishType.MoreXP: status = Peripheral.Instance.xp_factor.AddEffect(w.getEffect(), w.getTime()); break; case WishType.MoreDreams: status = Peripheral.Instance.dream_factor.AddEffect(w.getEffect(), w.getTime()); break; case WishType.MoreDamage: status = Peripheral.Instance.damage_factor.AddEffect(w.getEffect(), w.getTime()); break; case WishType.MoreHealth: Peripheral.Instance.AdjustHealth(w.getEffect()); status = true; break; default: Debug.Log("Inventory does not know how to deal with wishtype " + w.type + "\n"); break; } return(status); //return status; }
public void updateInfoBoxLabel() { if (info_box == null) { return; } String str = (!my_wish.absolute) ? Show.ToPercent(my_wish.getEffect()) : my_wish.getEffect().ToString(); String[] hey = { str, Mathf.CeilToInt(my_wish.getTime()).ToString() }; MyLabel l = info_box.GetComponent <MyLabel>(); l.text.text = Show.FixText(l.content, hey); }