Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (NetGame.isClient || ReplayRecorder.isPlaying)
        {
            return;
        }
        GiftBase giftBase = other.GetComponent <GiftBase>();

        if (giftBase == null)
        {
            CapsuleCollider component = other.GetComponent <CapsuleCollider>();
            if (component != null && component.height > 3f)
            {
                giftBase = other.GetComponentInParent <GiftBase>();
            }
        }
        if (giftBase != null)
        {
            if (GiftService.instance != null)
            {
                GiftService.instance.DeliverGift(giftBase.userId, giftBase.giftId);
            }
            if (giftBase is BigGift)
            {
                StartCoroutine(BigGiftChutes());
            }
            else
            {
                Fireworks.instance.ShootFirework();
            }
        }
    }
 public void Remove(GiftBase gift)
 {
     _gifts.Remove(gift);
 }
 public void Add(GiftBase gift)
 {
     _gifts.Add(gift);
 }
Пример #4
0
 public void Remove(GiftBase gift)
 {
     this.gifts.Remove(gift);
 }
Пример #5
0
 public void Add(GiftBase gift)
 {
     this.gifts.Add(gift);
 }