コード例 #1
0
        /// <summary>
        /// Create the specified center, sides, radiusX and radiusY.
        /// </summary>
        /// <param name="center">Center.</param>
        /// <param name="sides">Sides.</param>
        /// <param name="radiusX">Radius x.</param>
        /// <param name="radiusY">Radius y.</param>
        public static LW_Star Create(Vector2 center = default(Vector2), int sides = 3, float radiusX = 40f, float radiusY = 20f)
        {
            LW_Star instance = CreateInstance <LW_Star>();

            instance.Set(center, sides, radiusX, radiusY);
            return(instance);
        }
コード例 #2
0
        internal override void CopyPropertiesFrom(LW_Element element)
        {
            LW_Star star = element as LW_Star;

            if (star != null)
            {
                m_Center  = star.m_Center;
                m_RadiusX = star.m_RadiusX;
                m_RadiusY = star.m_RadiusY;
                m_Sides   = star.m_Sides;
            }
            base.CopyPropertiesFrom(element);
        }