SpawnerNodeBase.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityGameFramework.Runtime;
  5. using GameFramework.Event;
  6. namespace YLBattle
  7. {
  8. /// <summary>
  9. /// 孵化器基类
  10. /// </summary>
  11. public class SpawnerNodeBase : MonoBehaviour
  12. {
  13. public enum ProduceType
  14. {
  15. /// <summary>
  16. /// 清空后 开始CD倒计时
  17. /// </summary>
  18. Clean,
  19. /// <summary>
  20. /// 未达到孵化上限 便开始CD倒计时
  21. /// </summary>
  22. Incomplete,
  23. }
  24. public int index = 0; // 序号 用于剧情系统 激活指定序号 孵化器
  25. public bool isEnable = false; // 是否激活(组件级别)
  26. public ESpawnerCreateType spawnType = ESpawnerCreateType.CREATE_DEFAULT; // 孵化器类型
  27. public ESpawnerTriggerType triggerType = ESpawnerTriggerType.TRIGGER_DEFAULT; // 孵化器 默认激活类型
  28. public ESpawnerEnableType enableType = ESpawnerEnableType.Enable_TC_DEFAULT; // 孵化器 任务卡激活类型
  29. public ESpawnerWaitType waitType = ESpawnerWaitType.WAIT_IDLE; // 默认 怪物初始状态
  30. public int requirementTaskId = 0;
  31. public int requirementStepId = 0;
  32. public List<SpawnerNodeBase> enableSpawnerList = new List<SpawnerNodeBase>(); // 关联该孵化器关闭时 激活的其他孵化器列表
  33. public int maxNum; // 最大数量
  34. public bool isFill; // 是否填装 扑齐数量
  35. public float produceTime; // 生产时间间隔
  36. public float offsetPos; // 位置偏移范围(随机范围半径)
  37. public ProduceType produceType = ProduceType.Clean;
  38. // <summary>
  39. // 产卵点列表
  40. // </summary>
  41. public List<SpawnPoint> spawnList;
  42. /// <summary>
  43. /// 出生点
  44. /// </summary>
  45. public int point = 0;
  46. /// <summary>
  47. /// 是否小范围随机
  48. /// </summary>
  49. public bool randomPos = true;
  50. /// <summary>
  51. /// 随机的距离
  52. /// </summary>
  53. public float randomDis = 5.0f;
  54. /// <summary>
  55. /// 点坐标
  56. /// </summary>
  57. public Transform pointTran = null;
  58. public bool isLastNode = false;
  59. public int createCount = 0;
  60. }
  61. }