public PolygonPath(GameObjectItem gameObject) { Position = gameObject.Position; LineWidth = Constants.Instance.DefaultPathItemLineWidth; LineColor = Constants.Instance.ColorPrimitives; IsPolygon = true; }
// Factory functions public static PolygonPath CreateEmpty(GameObjectItem go) { var polygon = new PolygonPath(go); polygon.gameObject = go; polygon.layer = go.layer; return(polygon); }
public override Item clone() { GameObjectItem result = (GameObjectItem)this.MemberwiseClone(); result.CustomProperties = new SerializableDictionary(CustomProperties); result.polygon = (Vector2[])polygon.Clone(); result.hovering = false; return(result); }
// Factory function public static SoundEffectsItem CreateEmpty(GameObjectItem go) { var sound = new SoundEffectsItem(); sound.SoundData = new ListItem <SoundDataItem>(); sound.gameObject = go; sound.layer = go.layer; sound.Position = go.Position; return(sound); }
// Factory functions. public static TextureItem CreateEmpty(GameObjectItem go) { var texture = new TextureItem(); texture.gameObject = go; texture.layer = go.layer; texture.Position = go.Position; texture.TintColor = Microsoft.Xna.Framework.Color.White; texture.Scale = Microsoft.Xna.Framework.Vector2.One; return(texture); }
// Factory function public static AnimationItem CreateEmpty(GameObjectItem go) { var animation = new AnimationItem(); animation.gameObject = go; animation.layer = go.layer; animation.AnimationData = new List <AnimationDataItem>(); animation.Position = go.Position; animation.TintColor = Microsoft.Xna.Framework.Color.White; animation.Scale = Microsoft.Xna.Framework.Vector2.One; animation.FrameWidth = 116; animation.Columns = 1; return(animation); }