GameObjectComponent.cs 496 B

12345678910111213141516171819202122232425
  1. using Base;
  2. using UnityEngine;
  3. using Component = UnityEngine.Component;
  4. namespace Model
  5. {
  6. [ObjectEvent]
  7. public class GameObjectComponentEvent : ObjectEvent<GameObjectComponent>, IAwake<GameObject>
  8. {
  9. public void Awake(GameObject gameObject)
  10. {
  11. this.GetValue().Awake(gameObject);
  12. }
  13. }
  14. public class GameObjectComponent : Component
  15. {
  16. public GameObject GameObject { get; private set; }
  17. public void Awake(GameObject gameObject)
  18. {
  19. this.GameObject = gameObject;
  20. }
  21. }
  22. }