public void UseMagicTrap() { if (PocketDroidConstant.TRAPNUM >= 0) { if (PocketDroidConstant.OBJECTTYPE == 0) { PocketDroidConstant.HINTTEXT = "Congratulations! You trapped a monster!"; PocketDroidConstant.POINTSNUM += 20; PocketDroidConstant.MONSTRER_ACTIVATED = false; } else { PocketDroidConstant.HINTTEXT = "Here is no monster."; } //StartCoroutine(HideHint()); CaptureSceneManager captureSceneManager = FindObjectOfType <CaptureSceneManager>(); captureSceneManager.UseMagicEye(); PocketDroidConstant.TRAPNUM -= 1; } else { PocketDroidConstant.HINTTEXT = "You don't have any magic trap."; StartCoroutine(HideHint()); } }
private void PowerDown() { CaptureSceneManager manager = FindObjectOfType <CaptureSceneManager>(); if (manager != null) { manager.OrbDestroyed(); } Destroy(gameObject); }
private void Awake() { audioSource = GetComponent <AudioSource>(); rigidbody = GetComponent <Rigidbody>(); manager = FindObjectOfType <CaptureSceneManager>(); Assert.IsNotNull(audioSource); Assert.IsNotNull(rigidbody); Assert.IsNotNull(dropSound); Assert.IsNotNull(successSound); Assert.IsNotNull(throwSound); }
private void Awake() { _instance = this; }
void Start() { captureSceneManager = GameObject.Find("CaptureSceneManager").GetComponent <CaptureSceneManager>(); buttonAudio = GetComponent <AudioSource>(); }