Ejemplo n.º 1
0
 internal static void Start()
 {
     Util.DebugLog("Constructing");
     line               = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TrajectoryLine>();
     impact_cross       = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TargetingCross>();
     target_cross       = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TargetingCross>();
     target_cross.Color = Color.green;
 }
 internal FlightOverlay(Trajectory trajectory)
 {
     Util.DebugLog("Constructing");
     _trajectory        = trajectory;
     line               = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TrajectoryLine>();
     impact_cross       = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TargetingCross>();
     target_cross       = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TargetingCross>();
     target_cross.Color = Color.green;
 }
Ejemplo n.º 3
0
        private void OnDestroy()
        {
            if (line != null)
            {
                Destroy(line);
            }

            if (targetingCross != null)
            {
                Destroy(targetingCross);
            }

            line           = null;
            targetingCross = null;
        }
Ejemplo n.º 4
0
        private void OnDestroy()
        {
            if (line != null)
            {
                line.enabled = false;
                line.Vertices.Clear();
            }

            if (targetingCross != null)
            {
                targetingCross.enabled = false;
            }

            line           = null;
            targetingCross = null;
        }
Ejemplo n.º 5
0
        internal static void Destroy()
        {
            Util.DebugLog("");
            if (line != null)
            {
                UnityEngine.Object.Destroy(line);
            }

            if (impact_cross != null)
            {
                UnityEngine.Object.Destroy(impact_cross);
            }

            if (target_cross != null)
            {
                UnityEngine.Object.Destroy(target_cross);
            }

            line         = null;
            impact_cross = null;
            target_cross = null;
        }
Ejemplo n.º 6
0
 public void Awake()
 {
     line           = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TrajectoryLine>();
     targetingCross = FlightCamera.fetch.mainCamera.gameObject.AddComponent <TargetingCross>();
 }