Commit Graph

16 Commits (f8277b304c221c0af3b32fd6f668d3b2b5ee3b1c)

Author SHA1 Message Date
En Yi 637319cfd0 Fix one-shot stream emitter 2023-11-22 00:12:09 +08:00
En Yi f94ecedc7d Fix aliveness check for emitter
Emitter aliveness should be checked with its finish state

Also update bubbling to re-activate an still alive handle
2023-11-20 22:47:30 +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 4ede1abcc1 Fix crashes in main application
Changelog:
- Fix crash on empty emitter config
- Fix engine de-init order
- Update assets file to load for main application
2023-11-07 20:47:30 +08:00
En Yi 0c540d5053 Move frame counter out of sprite component
This allows individual animation
2023-11-04 20:32:29 +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 dc0fcc381c Add size support for particle 2023-11-01 22:36:44 +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