Beispiel #1
0
        /// <summary>
        /// Gets a dimension offset depending on the size of the object passed in.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static Vector2 GetDimensionOffsetFromItem(StardewValley.Object obj)
        {
            if (ObjectUtilities.IsSameType(typeof(StardewValley.Object), obj.GetType()))
            {
                return(new Vector2(64f, 64f));
            }
            if (ObjectUtilities.IsSameType(typeof(Revitalize.Framework.Objects.MultiTiledObject), obj.GetType()))
            {
                return(new Vector2(64f * (obj as MultiTiledObject).Width, 64f * (obj as MultiTiledObject).Height));
            }

            return(new Vector2(64f, 64f));
        }