Ejemplo n.º 1
0
    private void OnTriggerEnter(Collider other)
    {
        if (!pView.IsMine)
        {
            return;
        }

        if (other.tag.Equals("item") && !dead && !gc.getQuestionMode())
        {
            if (!other.GetComponent <Blaster>().getIsOwned())
            {
                if (other.GetComponent <Blaster>().getBlasterType() == 4)
                {
                    goldObj = other.GetComponent <Blaster>();
                    gc.upperLevelQuestion();
                }
                else
                {
                    if (pbc.getEmptySlots() != 0)
                    {
                        pbc.addBlaster(other.GetComponent <Blaster>());
                    }
                    else
                    {
                        Physics.IgnoreCollision(GetComponent <Collider>(), other);
                    }
                }
            }
        }
        if (other.tag.Equals("outOfBounds"))
        {
            outOfBounds      = true;
            outOfBoundsTimer = Time.time + outOfBoundsTimerLength;
            outOfBoundsImage.gameObject.SetActive(true);
        }
        if (other.tag.Equals("itemSpawn"))
        {
            Physics.IgnoreCollision(GetComponent <Collider>(), other);
        }
    }