FighterSpawnPoint.cs 694 B

123456789101112131415161718192021222324252627282930
  1. using UnityEngine;
  2. using System;
  3. using System.Collections;
  4. [System.Serializable]
  5. public struct ActorTranSync
  6. {
  7. public Vector3 LocalPosition;
  8. public Vector3 Position;
  9. public Vector3 Forward;
  10. }
  11. public class FighterSpawnPoint : MonoBehaviour
  12. {
  13. public Color color = new Color(1, 0, 0);
  14. public float radius = 0.25f;
  15. public ActorTranSync TranSync = new ActorTranSync();
  16. void OnDrawGizmos()
  17. {
  18. Gizmos.color = color;
  19. Gizmos.DrawSphere(transform.position, radius);
  20. #if UNITY_EDITOR
  21. TranSync.Position = transform.position;
  22. TranSync.Forward = transform.forward;
  23. TranSync.LocalPosition = transform.localPosition;
  24. #endif
  25. }
  26. }