/// <summary>Given a RectTransform <paramref name="rectTransform" />, set its margins along all sides to 0.</summary> /// <param name="rectTransform">The RectTransform whose margins we're setting.</param> public static void SetAllMarginsToZero(this RectTransform rectTransform) { foreach (RectangularAlignment alignmentDirection in LocalGeneralUtils.GetEnumValues <RectangularAlignment>()) { rectTransform.SetRectMargin(alignmentDirection, 0); } }
/// <summary> /// Initialize and return a brand new Dictionary mapping between each Dish type and the number 0. /// </summary> /// <returns>A brand new Dictionary mapping between each Dish type and the number 0.</returns> public static SerializableDictionary <Dish, int> InitializeZeroMapping() { return(LocalGeneralUtils.GetEnumList <Dish>().ToDictionary(x => x, x => 0).ToSerializableDictionary()); }
/// <summary> /// Return a list of the decorations and advertisements that this player has NOT bought. /// </summary> /// <returns>a list of the decorations and advertisements that this player has NOT bought.</returns> public List <DecorAds> GetUnboughtDecorations() { return(LocalGeneralUtils.GetEnumList <DecorAds>().Where(decorAd => !decorAds.Contains(decorAd)).ToList()); }