FParticleTrack.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using UnityEngine;
  2. using System.Collections;
  3. namespace Flux
  4. {
  5. public class FParticleTrack : FTrack {
  6. // public override CacheMode AllowedCacheMode { get { return CacheMode.Editor | CacheMode.RuntimeBackwards | CacheMode.RuntimeForward; } }
  7. // public override CacheMode RequiredCacheMode { get { return CacheMode.Editor | CacheMode.RuntimeBackwards; } }
  8. public override CacheMode AllowedCacheMode { get { return 0; } }
  9. public override CacheMode RequiredCacheMode { get { return 0; } }
  10. public ParticleSystem ParticleSystem { get; private set; }
  11. public override void Init()
  12. {
  13. ParticleSystem = Owner.GetComponentInChildren<ParticleSystem>();
  14. base.Init();
  15. }
  16. // public override void CreateCache()
  17. // {
  18. // FParticleTrackCache particleTrackCache = new FParticleTrackCache(this);
  19. // particleTrackCache.Build(true);
  20. //
  21. // Cache = particleTrackCache;
  22. // }
  23. //
  24. // public override void ClearCache()
  25. // {
  26. // FParticleTrackCache particleTrackCache = (FParticleTrackCache)Cache;
  27. // if( particleTrackCache != null )
  28. // {
  29. // particleTrackCache.Clear();
  30. // }
  31. // Cache = null;
  32. // }
  33. //
  34. // public override bool CanCreateCache()
  35. // {
  36. // return ParticleSystem != null;
  37. // }
  38. // public override void UpdateEvents(int frame, float time)
  39. // {
  40. // if( HasCache )
  41. // {
  42. // Cache.GetPlaybackAt(time);
  43. // }
  44. // else
  45. // {
  46. // base.UpdateEvents(frame, time);
  47. // }
  48. // }
  49. }
  50. }