private void Explode(Totem totem) { SoundManager.Instance.AudioSourceLib.ExplosiveTotem.Play (); GameManager.Instance.Goal (); Destroy(totem.gameObject); Destroy(gameObject); }
private void TeleportTotem(Totem totem) { totem.Stop(); totem.transform.DOKill(); totem.transform.position = portalTarget.transform.position; SoundManager.Instance.AudioSourceLib.PortalSound.Play (); totem.GoToSecondaryPositionToGo(); }
private void TryStopTotem(Totem totem) { TotemPhantom phantomTotem = totem.GetComponent<TotemPhantom>(); if (phantomTotem == null) StopTotem(totem); else Debug.Log("Hitted by a phantom totem, its ok!"); }
private void FillHole(Totem totem) { filled = true; fillTotem = totem; fillTotem.Stop(); Destroy(fillTotem.gameObject.GetComponent<Collider>()); Destroy(gameObject.GetComponent<Collider>()); SnapTotemToThisTransform(); }
private void TryToFillHole(Totem totem) { TotemHoleFiller holeFiller = totem.GetComponent<TotemHoleFiller>(); if (holeFiller != null && holeType == totem.Type) { FillHole(totem); return; } totem.Stop(); totem.transform.DOKill(); Debug.Log("Hit a totem, but it was not of the same type of the hole"); GameManager.Instance.Lose(); }
private void StopTotem(Totem totem) { Debug.Log("Hitted by a non phantom totem, f**k you!"); totem.Stop(); totem.transform.DOKill(); }
private void HittedByNonExplosiveTotem(Totem totem) { Debug.Log("Hitted by a non explosive totem"); totem.Stop(); GameManager.Instance.Lose(); }