GameObjectComponent.cs 524 B

12345678910111213141516171819202122232425
  1. using UnityEngine;
  2. namespace ET.Client
  3. {
  4. [ComponentOf(typeof(Unit))]
  5. public class GameObjectComponent: Entity, IAwake, IDestroy
  6. {
  7. private GameObject gameObject;
  8. public GameObject GameObject
  9. {
  10. get
  11. {
  12. return this.gameObject;
  13. }
  14. set
  15. {
  16. this.gameObject = value;
  17. this.Transform = value.transform;
  18. }
  19. }
  20. public Transform Transform { get; private set; }
  21. }
  22. }