XNA 2D Camera Engine That Follows Sprite

So I figured it out using a combination of the tutorials above and have created the class below. It tweens towards your target and follows it around. Try it out. public interface IFocusable { Vector2 Position { get; } } public interface ICamera2D { /// <summary> /// Gets or sets the position of the camera … Read more

Changing the Coordinate System in LibGDX (Java)

If you use a Camera (which you should) changing the coordinate system is pretty simple: camera= new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); camera.setToOrtho(true, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); If you use TextureRegions and/or a TextureAtlas, all you need to do in addition to that is call region.flip(false, true). The reasons we use y-up by default (which you can easily change as … Read more

Can you style ordered list numbers?

You can do this using CSS counters, in conjunction with the :before pseudo element: ol { list-style: none; counter-reset: item; } li { counter-increment: item; margin-bottom: 5px; } li:before { margin-right: 10px; content: counter(item); background: lightblue; border-radius: 100%; color: white; width: 1.2em; text-align: center; display: inline-block; } <ol> <li>item</li> <li>item</li> <li>item</li> <li>item</li> </ol>

SVG use tag and ReactJS

MDN says that xlink:href is deprecated in favor of href. You should be able to use the href attribute directly. The example below includes both versions. As of React 0.14, xlink:href is available via React as the property xlinkHref. It is mentioned as one of the “notable enhancements” in the release notes for 0.14. <!– … Read more