Inheritance: UnityEngine.MonoBehaviour, ITotem
Exemplo n.º 1
0
 private void Explode(Totem totem)
 {
     SoundManager.Instance.AudioSourceLib.ExplosiveTotem.Play ();
     GameManager.Instance.Goal ();
     Destroy(totem.gameObject);
     Destroy(gameObject);
 }
Exemplo n.º 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();
        }
Exemplo n.º 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!");
        }
Exemplo n.º 4
0
 private void FillHole(Totem totem)
 {
     filled = true;
     fillTotem = totem;
     fillTotem.Stop();
     Destroy(fillTotem.gameObject.GetComponent<Collider>());
     Destroy(gameObject.GetComponent<Collider>());
     SnapTotemToThisTransform();
 }
Exemplo n.º 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();
        }
Exemplo n.º 6
0
 private void StopTotem(Totem totem)
 {
     Debug.Log("Hitted by a non phantom totem, f**k you!");
     totem.Stop();
     totem.transform.DOKill();
 }
Exemplo n.º 7
0
 private void HittedByNonExplosiveTotem(Totem totem)
 {
     Debug.Log("Hitted by a non explosive totem");
     totem.Stop();
     GameManager.Instance.Lose();
 }