BaseControl.cs 681 B

123456789101112131415161718192021
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.SceneManagement;
  4. namespace COM3D2.MeidoPhotoStudio.Plugin
  5. {
  6. internal abstract class BaseControl
  7. {
  8. public event EventHandler ControlEvent;
  9. public bool Enabled { get; set; } = true;
  10. public bool Visible { get; set; } = true;
  11. public virtual void Draw(params GUILayoutOption[] layoutOptions) { }
  12. public virtual void Update() { }
  13. public virtual void Awake() { }
  14. public virtual void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) { }
  15. public virtual void OnControlEvent(EventArgs args)
  16. {
  17. ControlEvent?.Invoke(this, args);
  18. }
  19. }
  20. }