Exemple #1
0
        public void Execute()
        {
            foreach (var entity in _destroyedGroup.GetEntities())
            {
                _gameAudioService.PlayMusicGetItem();
                var actor  = _actorContext.GetEntityWithActorId(entity.itemType.killerActorId);
                var player = _gameContext.GetEntityWithEntityId(actor.gameEntityId.value);
                Debug.Assert(actor != null, " player's tank have no owner");
                if (player != null && !player.isDestroyed && player.unit.health != 0)
                {
                    actor.score.value = actor.score.value + 500;
                    switch (entity.itemType.type)
                    {
                    case EItemType.Boom:
                        OnTriggerBoom(actor, player, _allEnmey);
                        break;

                    case EItemType.Upgrade:
                        OnTriggerUpgrade(actor, player, _allEnmey);
                        break;

                    case EItemType.AddLife:
                        OnTriggerAddLife(actor, player, _allEnmey);
                        break;
                    }
                }
            }
        }
Exemple #2
0
 //delete
 public void Remove(int idx)
 {
     Debug.Assert(idx < allOffsets.Count, "out of range");
     if (idx >= allOffsets.Count)
     {
         return;
     }
     allColliders.RemoveAt(idx);
     allOffsets.RemoveAt(idx);
 }
Exemple #3
0
 // Token: 0x060000B0 RID: 176 RVA: 0x00005E46 File Offset: 0x00004046
 protected virtual void Awake()
 {
     this._referenceHolder = base.GetComponent <IReferenceHolder>();
     Debug.Assert(this._referenceHolder != null, base.GetType() + " miss IReferenceHolder ");
     this.DoAwake();
 }