コード例 #1
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        RingBehaviour collidingRing = collision.GetComponent <RingBehaviour>();

        if (collidingRing.gameObject.transform.position.y > this.transform.position.y && collidingRing.GetIsMoving())
        {
            parentPinBehaviour.RemoveRingFromPin(collidingRing);
            collidingRing.SetOnPin(false);
        }
    }
コード例 #2
0
 private void AddToPin(RingBehaviour collidingRingBehaviour)
 {
     parentPinBehaviour.CheckAddCollidingRingToPin(collidingRingBehaviour);
     collidingRingBehaviour.SetOnPin(true, this.transform.position);
 }