KinsonDigital / Velaptor

2D game development framework
https://docs.velaptor.io
MIT License
70 stars 16 forks source link

🚧Update to use latest version of CASL #936

Closed CalvinWilkinson closed 4 months ago

CalvinWilkinson commented 4 months ago

Description:

To allow this pull request to be merged, please make sure that the following items of this pull request are complete.

This pull request closes #934

✅The pull request head branch must be a feature branch with the syntax 'feature/-sync-testing'.
✅The pull request base branch must be a 'main' or 'preview' branch..
✅The pull request head branch contains a valid issue number.
✅The pull request title matches the linked issue title exactly.
✅The pull request assignees match the assignees of the issue.
✅The pull request labels match the labels of the issue.
✅The pull request organizational projects match the organizational projects of the issue.
✅The pull requests milestone matches the milestone of the issue.


Additional Info:

  1. Pull requests are automatically synced with the associated issue upon creation by one of the KinsonDigital workflow bots.
  2. The associated issue is the issue number that is embedded in the pull request head branch.
  3. The list above will be automatically updated as the pull request's various settings match or do not match the associated issue.
  4. To manually sync the pull request to the issue, create a comment with the [run-sync] command.

    Note You must be an admin member of the organization to use this command.


CalvinWilkinson commented 4 months ago

[!Note] Introduction of https://github.com/KinsonDigital/Velaptor/labels/%E2%9C%A8new%20feature 's

  1. Adding a new enum named AudioBuffer and a new property with the name BufferType to the IAudio interface and Audio class. This is used to know what type of buffering is being used for the audio. This is a new feature that comes from CASL v1.0.0-preview.18.
  2. Added a new Load(string atlasPathOrName) method to the ILoader<IAtlasDta> interface for loading texture atlas data.
  3. Added a new Load(string audioPathOrName, AudioBuffer bufferType) method to the ILoader<IAudio> interface for loading audio.
  4. Added a new Load(string texturePathOrName) method to the ILoader<ITexture> interface for loading textures.
CalvinWilkinson commented 4 months ago

[!Warning] Introduced https://github.com/KinsonDigital/Velaptor/labels/%F0%9F%A7%A8breaking%20changes

  1. Renamed the ISound interface to IAudio.
  2. Renamed the Sound class to Audio.
  3. Changed the data type of the Position and Length properties to TimeSpan.
  4. Replaced the State property from the ISound interface and Sound class with the following bool properties to represent the state of the audio.
    • IsPlaying
    • IsPaused
    • IsStopped
    • The State property was removed due to the unintentional exposure of the CASL API.
  5. Removed the Reset() method from the ISound interface and Sound class. This method was performing the same operation as the Stop() method.
  6. Removed the public constructor from the Sound class.
    • This was done to force users to use the content loader system.
  7. Refactored the name of the LoadSoundException to LoadAudioException
  8. Refactored the name of the SoundLoader class to AudioLoader
  9. Refactored the name of the PathResolverFactory.CreateSoundPathResolver() method to PathResolverFactory.CreateAudioPathResolver()
  10. Refactored the name of the ContentLoaderFactory.CreateSoundLoader() method to ContentLoaderFactory.CreateAudioLoader()
  11. The default name of the content folder Sound which is where audio content is located has been changed to Audio
  12. Refactored the ILoader<IAudio>.Unload() method parameter named sound to audio.