BuffStackInfo.cs 791 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Fort23.Core;
  2. namespace GameLogic.Combat.Buff
  3. {
  4. public class BuffStackInfo : CObject
  5. {
  6. public BuffInfo BuffInfo;
  7. public int count;
  8. public float _currTime;
  9. public BuffBasic BuffBasic;
  10. public override void ActiveObj()
  11. {
  12. }
  13. public override void DormancyObj()
  14. {
  15. CObjectPool.Instance.Recycle(BuffInfo);
  16. BuffInfo = null;
  17. count = 0;
  18. _currTime = 0;
  19. BuffBasic = null;
  20. }
  21. public void Update(float time)
  22. {
  23. _currTime += time;
  24. if (BuffInfo.buffTime > 0 && _currTime > BuffInfo.buffTime)
  25. {
  26. BuffBasic.RemoveBuffStackInfo(this);
  27. return;
  28. }
  29. }
  30. }
  31. }