Ejemplo 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);
 }
Ejemplo n.º 2
0
    private void Shoot(Transform initTransform)
    {
        GameObject bulletGameObject = bullettPool.GetPooledObject();

        bulletGameObject.transform.position = initTransform.position;
        bulletGameObject.transform.rotation = initTransform.rotation;

        if (withYoffset)
        {
            bulletGameObject.transform.Translate(0, 0.055f, 0, Space.Self);
            withYoffset = false;
        }
        else
        {
            withYoffset = true;
        }

        IProjectile bullet = bulletGameObject.GetComponentInChildren <IProjectile>();

        bullet.Launch(vicTag);
        attackManager.UpdateBulletCount();
    }