Наследование: UnityEngine.MonoBehaviour, ITotem
Пример #1
0
 private void Explode(Totem totem)
 {
     SoundManager.Instance.AudioSourceLib.ExplosiveTotem.Play ();
     GameManager.Instance.Goal ();
     Destroy(totem.gameObject);
     Destroy(gameObject);
 }
Пример #2
0
        private void TeleportTotem(Totem totem)
        {
            totem.Stop();
            totem.transform.DOKill();
            totem.transform.position = portalTarget.transform.position;
            SoundManager.Instance.AudioSourceLib.PortalSound.Play ();

            totem.GoToSecondaryPositionToGo();
        }
Пример #3
0
        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!");
        }
Пример #4
0
 private void FillHole(Totem totem)
 {
     filled = true;
     fillTotem = totem;
     fillTotem.Stop();
     Destroy(fillTotem.gameObject.GetComponent<Collider>());
     Destroy(gameObject.GetComponent<Collider>());
     SnapTotemToThisTransform();
 }
Пример #5
0
        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();
        }
Пример #6
0
 private void StopTotem(Totem totem)
 {
     Debug.Log("Hitted by a non phantom totem, f**k you!");
     totem.Stop();
     totem.transform.DOKill();
 }
Пример #7
0
 private void HittedByNonExplosiveTotem(Totem totem)
 {
     Debug.Log("Hitted by a non explosive totem");
     totem.Stop();
     GameManager.Instance.Lose();
 }