Exemplo n.º 1
0
        public PolygonPath(GameObjectItem gameObject)
        {
            Position  = gameObject.Position;
            LineWidth = Constants.Instance.DefaultPathItemLineWidth;
            LineColor = Constants.Instance.ColorPrimitives;

            IsPolygon = true;
        }
Exemplo n.º 2
0
        // Factory functions
        public static PolygonPath CreateEmpty(GameObjectItem go)
        {
            var polygon = new PolygonPath(go);

            polygon.gameObject = go;
            polygon.layer      = go.layer;

            return(polygon);
        }
Exemplo n.º 3
0
        public override Item clone()
        {
            GameObjectItem result = (GameObjectItem)this.MemberwiseClone();

            result.CustomProperties = new SerializableDictionary(CustomProperties);
            result.polygon          = (Vector2[])polygon.Clone();
            result.hovering         = false;
            return(result);
        }
Exemplo n.º 4
0
        // 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);
        }
Exemplo n.º 5
0
        // 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);
        }
Exemplo n.º 6
0
        // 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);
        }