Commit Graph

2 Commits

Author SHA1 Message Date
Christopher Whitley a501f76162 Sprite Rework (#897)
* Add file header

* Refator to file-scoped namespace

* Least complex to most complext method ordering

* Refactor: Group properties at top before constructor

* Use the new UV properties from Texture2DRegion.
This removes the dependency on the texture size in the calculations if the TextureRegion property is changed.

* No longer need to cache normalized origin to preserve it

* Use ArgumentNullException instead

* Use ArgumentNullException.ThrowIfNull

* Refactor:  Use brackets for readability

* Add xml documentation

* Add check for disposed texture

* Moved `Sprite` to `MonoGame.Extended.Graphics`

* Moved extension methods for rendering sprite into `SpriteBatch.Extensions`

* `ISpriteBatchDrawable` is not used by anything
It was originally part of the ScreneGraph implementation in MonoGame.Extended which was replaced by the ECS system.  It appears that this interface was forgotten to be removed and is not used for anything anymore.

* Add `CreateSprite` methods

* Add file header

* Moved `SpriteSheetAnimationFrame` to `MonoGame.Extended.Graphics`

* Move properties before constructor.

* Changed `Duration` to `TimeSpan` type

* Renamed `Index` to `FrameIndex`

* Add `TextureRegion` property

* Make property get only

* Cleanup whitespace

* Remove `SpriteSheetAnimationFrameJsonConverter`

* Cleanup unused namespaces

* Make file-scoped namespace

* Added xml documentation

* Added file header

* marked constructor as internal.
This will be created from a spritesheet itself

* Move `SpriteSheetAnimationCycle` to `MonoGame.Extended.Graphcis`

* File scoped namespace

* Add file header

* Reorganize: Move properties above constructor

* Make `Frames` property a read-only span

* Remove duration, this is being moved to the frame itself

* Add `Name` property

* Set looping, reversed, and ping pong properties in ctor

* Make ctor internal
This will be an object created by a spritesheet instane itself.

* Cleanup: Whitespace

* Add `FrameCount` property

* Add `GetFrame` method and accompanying `this[int]` method.

* Documentation: Added missing documentation.

* WIP: Temporary commit for workstation change

* WIP: Temporary commit for workstation change

* WIP: Temporary commit for workstation change

* WIP: Temporary commit for workstation change

* Refactor: Animation Refactor Completed

* Refactor: Sprite stuff finished

* Remove tests that can't be run on GitHub CI
Need to find alternative

* Make optional name param the last param in Texture2DRegion ctors

* Resolve merge conflicts
2024-06-23 23:10:16 -04:00
Christopher Whitley f68cff17bf Moved tests into test directory 2024-05-18 20:01:37 -04:00