Exemple #1
0
 public void EndMinigame()
 {
     AudioManager.PlaySound("RecordScratch");
     GameObject.Find("InactiveAudioMan").GetComponent <AudioManager>().Awake(); // restore overworld audioMan
     AudioManager.PlaySound("Background");
     worldRef.SetMinigameMode(false);                                           // turn off minigame mode
     overworldCamera.SetActive(true);                                           // restore overworld camera
     worldRef.comicController.HideComicAndShiftCam(moveSpeed);
     DestroyImmediate(gameObject);                                              // destroy the minigame
 }
Exemple #2
0
 protected void Start()
 {
     playing         = false;
     worldRef        = GameObject.FindWithTag("WORLD").GetComponent <WorldScript>();
     overworldCamera = GameObject.FindWithTag("MainCamera");
     initPos         = canvasTransform.anchoredPosition;
     initScale       = canvasTransform.localScale;
     if (worldRef != null)
     {
         worldRef.SetMinigameMode(true);
         worldRef.comicController.SlideComicLeftAndOut(moveSpeed);
     }
     AudioManager.PlaySound("RecordScratch");
 }