SceneMonoConfigBasic.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using Fort23.UTool;
  3. using UnityEngine;
  4. namespace GameLogic.Combat.CombatTool.SceneTool
  5. {
  6. public class SceneMonoConfigBasic: MonoBehaviour,IDisposable
  7. {
  8. public GameObject skyObejct;
  9. public Material shengShiMaterial;
  10. protected Transform root;
  11. protected Transform moveRoot;
  12. public void Init(Transform root,Transform moveRoot)
  13. {
  14. this.root = root;
  15. this.moveRoot = moveRoot;
  16. ProInit();
  17. }
  18. protected virtual void ProInit()
  19. {
  20. }
  21. public void UpdateScene()
  22. {
  23. skyObejct.transform.position = new Vector3(root.position.x, 0, root.position.z);
  24. ProUpdate();
  25. }
  26. protected virtual void ProUpdate()
  27. {
  28. }
  29. public void Dispose()
  30. {
  31. ProDispose();
  32. root = null;
  33. moveRoot = null;
  34. }
  35. protected virtual void ProDispose()
  36. {
  37. }
  38. }
  39. }