예제 #1
0
        public override IObject2D CreateObject2D(LandWorld2D landWorld2D, IObject obj)
        {
            AltitudeLandObject altitudeLandObject = obj as AltitudeLandObject;

            if (altitudeLandObject != null)
            {
                return(new AltitudeObject2D(this, altitudeLandObject));
            }
            return(null);
        }
예제 #2
0
        public AltitudeObject2D(IObject2DFactory factory, AltitudeLandObject landObject)
        {
            Texture texture = factory.GetTextureByIndex(0);

            this.ObjectSprite = new Sprite(texture, this.GetTransitionTextureCoord(landObject.LandTransition));

            this.ObjectSprite.Position = this.ObjectSprite.Position;

            this.ObjectSprite.Scale = new Vector2f(0.5f, 0.5f);

            this.Position = new Vector2f(landObject.Position.X, landObject.Position.Y);
        }