// Token: 0x06000D8B RID: 3467 RVA: 0x00042BE4 File Offset: 0x00040DE4
        public void Pulse()
        {
            Vector3 position = base.transform.position;
            float   num      = this.radius * this.radius;

            foreach (PurchaseInteraction purchaseInteraction in PurchaseInteraction.readOnlyInstancesList)
            {
                float sqrMagnitude = (purchaseInteraction.transform.position - position).sqrMagnitude;
                if (sqrMagnitude <= num && purchaseInteraction.available)
                {
                    float b = Mathf.Sqrt(sqrMagnitude) / this.pulseTravelSpeed;
                    ChestRevealer.PendingReveal item = new ChestRevealer.PendingReveal
                    {
                        gameObject = purchaseInteraction.gameObject,
                        time       = Run.FixedTimeStamp.now + b,
                        duration   = this.revealDuration
                    };
                    ChestRevealer.pendingReveals.Add(item);
                }
            }
            EffectManager.instance.SpawnEffect(this.pulseEffectPrefab, new EffectData
            {
                origin = position,
                scale  = this.radius * this.pulseEffectScale
            }, false);
        }
Exemplo n.º 2
0
 // Token: 0x060008F5 RID: 2293 RVA: 0x00026D84 File Offset: 0x00024F84
 private static void StaticFixedUpdate()
 {
     ChestRevealer.pendingReveals.Sort();
     while (ChestRevealer.pendingReveals.Count > 0)
     {
         ChestRevealer.PendingReveal pendingReveal = ChestRevealer.pendingReveals[0];
         if (!pendingReveal.time.hasPassed)
         {
             break;
         }
         if (pendingReveal.gameObject)
         {
             ChestRevealer.RevealedObject.RevealObject(pendingReveal.gameObject, pendingReveal.duration);
         }
         ChestRevealer.pendingReveals.RemoveAt(0);
     }
 }