Exemplo n.º 1
0
 private void PickUpItem(CollectibleDef item)
 {
     if (item.attackID > 0)
     {
         EventManager.TriggerEvent(GlobalEvents.ItemPickedUp);
         attackManager.SetAttack(item.attackID, item.animController);
         attackManager.UpdateBulletCount(item.bulletCount);
     }
     flashBlue.FlashForXSecs(0.18f);
     audioManager.PlaySoundByClip(item.weaponNameAudio);
 }
Exemplo n.º 2
0
 public void SpawnPlayer()
 {
     setPlayerVisible(true);
     inputManager.enabled = true;
     gameObject.layer     = 8;
     transform.position   = new Vector3(transform.position.x, transform.position.y, 0);
     animManager.ResetAnimators();
     attackManager.SetDefaultAttack();
     attackManager.RestoreGrenade();
     animManager.PlaySpawnAnim();
     health.IgnoreDamages = true;
     health.currentHP     = health.maxHP;
     playerIndicator.SetVisible(true);
     flashBright.FlashForXSecs(ignoreDamagesDuration);
     timeUtils.TimeDelay(ignoreDamagesDuration, () =>
                         { health.IgnoreDamages = false;
                           playerIndicator.SetVisible(false); });
 }