Ejemplo n.º 1
0
        public SpringBlock()
            : base()
        {
            Texture = TextureManager.Textures[Texture_Name];
            Frame = new Rectangle(0, 0, Definitions.Grid_Cell_Pixel_Size, TextureManager.Textures[Texture_Name].Height);
            Origin = new Vector2(-Horizontal_Offset, -Vertical_Offset);

            _animationEngine = new SpriteSheetAnimationEngine(this);
        }
Ejemplo n.º 2
0
        public RouteMarker()
            : base()
        {
            _animationEngine = new SpriteSheetAnimationEngine(this);
            _animationEngine.ID = "animation-engine";
            _animationEngine.Sequence = AnimationDataManager.Sequences[Animation_Sequence];

            RenderLayer = Render_Layer;
            RenderDepth = Render_Depth;
            Visible = true;
        }
Ejemplo n.º 3
0
        public Flag()
            : base()
        {
            RenderLayer = Render_Layer;
            RenderDepth = Flag_Render_Depth;

            Visible = true;
            Collidable = true;

            ActivatedWhenMovingLeft = false;

            _animationEngine = new SpriteSheetAnimationEngine(this);
        }
Ejemplo n.º 4
0
        protected override Serializer Deserialize(Serializer serializer)
        {
            serializer.KnownSerializedObjects.Add(_animationEngine);

            base.Deserialize(serializer);

            Collidable = serializer.GetDataItem<bool>("collidable");
            _collisionBoundingBox = serializer.GetDataItem<Rectangle>("collision-box");
            _animationEngine = serializer.GetDataItem<SpriteSheetAnimationEngine>("animation-engine");
            _poleWorldPosition = serializer.GetDataItem<Vector2>("pole-position");

            return serializer;
        }