Example #1
0
 public void HighlightTank()
 {
     if (this.tutorialData.Type == TutorialType.HighlightTankPart)
     {
         string tag  = "TankHull";
         string str2 = "TankWeapon";
         CameraOffsetBehaviour behaviour = FindObjectOfType <CameraOffsetBehaviour>();
         if (behaviour != null)
         {
             this.oldCameraOffset = behaviour.Offset;
             behaviour.AnimateOffset(this.cameraOffset);
             Camera outlineCamera = TutorialCanvas.Instance.OutlineCamera;
             this.highlightCamera = Instantiate <Camera>(outlineCamera);
             this.highlightCamera.transform.SetParent(behaviour.transform, false);
             this.highlightCamera.transform.localPosition    = Vector3.zero;
             this.highlightCamera.transform.localEulerAngles = Vector3.zero;
             this.highlightCamera.depth       = outlineCamera.depth + 1f;
             this.highlightCamera.cullingMask = (int)this.highlightLayer;
             this.highlightCamera.gameObject.SetActive(true);
             List <GameObject> list = new List <GameObject>();
             if (this.highlightHull)
             {
                 list.Add(GameObject.FindGameObjectWithTag(tag));
             }
             if (this.highlightWeapon)
             {
                 list.Add(GameObject.FindGameObjectWithTag(str2));
             }
             this.outlines = this.CreateOutlines(list.ToArray());
         }
         NewsContainerComponent component = FindObjectOfType <NewsContainerComponent>();
         if (component != null)
         {
             this.newsContainerAlpha = component.GetComponent <CanvasGroup>().alpha;
             component.GetComponent <CanvasGroup>().alpha = 0f;
         }
         base.Invoke("StartOutlineAnimation", 0.6f);
     }
 }
Example #2
0
 private void HighlightingContinue()
 {
     if (this.tutorialData.Type == TutorialType.HighlightTankPart)
     {
         base.CancelInvoke();
         CameraOffsetBehaviour behaviour = FindObjectOfType <CameraOffsetBehaviour>();
         if (behaviour != null)
         {
             behaviour.AnimateOffset(this.oldCameraOffset);
         }
         NewsContainerComponent component = FindObjectOfType <NewsContainerComponent>();
         if (component != null)
         {
             component.GetComponent <CanvasGroup>().alpha = this.newsContainerAlpha;
         }
         foreach (GameObject obj2 in this.outlines)
         {
             if (obj2 != null)
             {
                 obj2.SendMessage("Disable");
             }
         }
     }
 }