FunctionEvent.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using UnityEngine;
  2. using System.Collections;
  3. public abstract class FunctionEvent
  4. {
  5. protected BuffFunctionData mData;
  6. protected Buff_Function_Type mType;
  7. protected int mBuffId;
  8. protected Fighter mCaster;
  9. protected string mSkillName;
  10. public int BuffId
  11. {
  12. get { return mBuffId; }
  13. set { mBuffId = value; }
  14. }
  15. public Fighter Caster
  16. {
  17. get { return mCaster; }
  18. set { mCaster = value; }
  19. }
  20. public Buff_Function_Type Type
  21. {
  22. get { return mType; }
  23. }
  24. public BattleBuffType BuffType
  25. {
  26. get { return mData.buffType; }
  27. }
  28. public int Group
  29. {
  30. get { return mData.Group; }
  31. }
  32. public string SkillName
  33. {
  34. get { return mSkillName; }
  35. set { mSkillName = value; }
  36. }
  37. public BuffFunctionData Data
  38. {
  39. get { return mData; }
  40. }
  41. public FunctionEvent(BuffFunctionData data)
  42. {
  43. mData = data;
  44. }
  45. public virtual float GetValue()
  46. {
  47. return Data.value;
  48. }
  49. public virtual void Enter(Fighter fighter) { }
  50. public virtual void Exit(Fighter fighter) { }
  51. }