Ejemplo n.º 1
0
 private void OnDestroy()
 {
     if (AppQuitWatcher.isQuitting)
     {
         return;
     }
     destHighlighter.Destroy();
     destHighlighter = null;
 }
Ejemplo n.º 2
0
        public void Setup()
        {
            if (!(bool)signalOrigin)
            {
                Debug.LogError("signalOrigin on CommsRadioCrewVehicle isn't set, using this.transform!",
                               this);
                signalOrigin = transform;
            }

            if (display == null)
            {
                Debug.LogError("display not set, can't function properly!", this);
            }
            if (validMaterial == null ||
                invalidMaterial == null)
            {
                Debug.LogError("Some of the required materials isn't set. Visuals won't be correct.",
                               this);
            }
            if (lcdArrow == null)
            {
                Debug.LogError("lcdArrow not set, can't display arrow!", this);
            }
            if (destinationHighlighterGO == null ||
                directionArrowsHighlighterGO == null)
            {
                Debug.LogError(
                    "destinationHighlighterGO or directionArrowsHighlighterGO is not set, can't function properly!!",
                    this);
            }
            if (spawnVehicleSound == null ||
                spawnModeEnterSound == null || confirmSound == null || cancelSound == null)
            {
                Debug.LogError("Not all audio clips set, some sounds won't be played!",
                               this);
            }
            trackMask       = LayerMask.GetMask("Default");
            destHighlighter =
                new CarDestinationHighlighter(destinationHighlighterGO, directionArrowsHighlighterGO);
        }