ProjectBaseConfig.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public abstract class ProjectBaseConfig : BaseConfig
  5. {
  6. public int Index { get; set; }
  7. protected BaseList baseList;
  8. protected List<BaseConfig> configs;
  9. public ProjectBaseConfig(BaseList baseList, List<BaseConfig> configs) {
  10. // configType = ConfigType.PROJECT;
  11. this.baseList = baseList;
  12. this.configs = configs;
  13. }
  14. public void Awake()
  15. {
  16. }
  17. public void Init() {
  18. BaseListUpdateConfig();
  19. }
  20. public void OnClick() {
  21. BaseListUpdateConfig();
  22. }
  23. public void OnDestroy()
  24. {
  25. }
  26. public void OnDown()
  27. {
  28. }
  29. public void OnEnter()
  30. {
  31. }
  32. public void OnExit()
  33. {
  34. }
  35. public void OnUp()
  36. {
  37. }
  38. public void Start()
  39. {
  40. }
  41. public void Update()
  42. {
  43. }
  44. void BaseListUpdateConfig() {
  45. if (!baseList) {
  46. Debug.LogError("Please Init baseList");
  47. return;
  48. }
  49. if (null == configs) {
  50. Debug.LogError("Please Init configs");
  51. return;
  52. }
  53. baseList.UpdateConfigs(configs);
  54. }
  55. }