Commit Graph

16 Commits (87655006066f9d2e290919e29c290094062eb4f4)

Author SHA1 Message Date
En Yi 204329d2aa Use float for timing in particle system
Also, update the assets_loader due to this
2024-04-24 21:47:58 +08:00
En Yi c76ceba9bf Add delta time into particle system updates
Only update the callbacks to use it
2024-04-24 21:06:57 +08:00
En Yi 0a6e7b4ddc Add delta time handling
Internal Changelog:
- Major change: all engine that does counting uses delta time instead of
  frame counting
- Animation runs at 24 FPS
- Water fill is at a constant rate as well
- Particle update will need to be given delta time as well.
- Particle system is not updated to use float, so no delta time handling
  for the system in this commit
2024-04-23 22:44:52 +08:00
En Yi 05e58677a5 Add angle and rotation range for particle system 2023-11-22 23:18:08 +08:00
En Yi ad789329d1 Add emitter component
Also, add funciton to check if emitter handle is still alive
2023-11-20 22:06:58 +08:00
En Yi 8165cd41c2 Rework stream handling function
Changelog:
- Add callback function to stop the emitter
    - This is use to automatically stop the emitter when the condition
      is met
- Update particle test program
2023-11-20 20:48:41 +08:00
En Yi be75263c2c Implement stream-type particle emitter 2023-11-18 19:44:20 +08:00
En Yi cb0a93ee70 Implement feature to start and stop emitter 2023-11-18 15:48:43 +08:00
En Yi 5350c2b761 Refactor particle system for future feature
This is to support persistent emitter later on

Also, re-check the update logic
2023-11-18 12:45:57 +08:00
En Yi 26cc567b7f Add emitter config to asset file loading 2023-11-06 21:36:23 +08:00
En Yi ebecc68941 Add better support for particle system
Changelog:
- Move sprite to emitter itself to allow better reusing emitter config
- Dedicate a function for destroying entity. This is helpful for dealing
  with events that only occurs during entity destruction
2023-11-04 14:36:59 +08:00
En Yi 43aa821c18 Refactor particle system
Changelog:
- Config should contain constants that determine the spawning of an
  emitter.
- Move user_data and update_func to emitter, since these values can
  change depending on the scene.
- Assets now load in Emitter Configs
2023-11-02 22:42:18 +08:00
En Yi ad421d724a Add sprite rotation 2023-11-02 21:18:47 +08:00
En Yi edf78412dc Improve particle system
Add support for texture and rotation
2023-11-01 22:18:40 +08:00
En Yi 7c86e0b3c5 Implement initial particle system
Changelog:
- Can only to one-shot burst emitter
- Add test for it
2023-10-21 14:37:54 +08:00
En Yi 7b2c48524d Add skeleton for particle system 2023-10-18 21:45:19 +08:00