示例#1
0
        public virtual void OnTriggerEnter2D(Collider2D other)
        {
            Collectibles collectedItem = other.GetComponent <Collectibles> ();

            if (collectedItem != null)
            {
                other.GetComponent <Collectibles> ().collectItem(other.gameObject, playerType);
            }
        }
示例#2
0
        public void OnTriggerEnter2D(Collider2D other)
        {
            Collectibles collectibles = other.GetComponent <Collectibles> ();

            if (collectibles)
            {
                if (collectibles.bulletBehaviour == BulletBehaviour.blast)
                {
                    Destroy(collectibles.gameObject);
                    Destroy(this.gameObject);
                }
                else
                {
                }
            }
            else
            {
                Destroy(this.gameObject);
            }
        }