Example #1
0
    // Token: 0x060035FB RID: 13819 RVA: 0x000C513C File Offset: 0x000C333C
    public virtual void DoWeaponEffects(Transform soundTransform, global::Socket muzzleSocket, bool firstPerson, global::ItemRepresentation itemRep)
    {
        this.PlayFireSound(soundTransform, firstPerson, itemRep);
        GameObject gameObject = muzzleSocket.InstantiateAsChild((!firstPerson) ? this.muzzleFlashWorld : this.muzzleflashVM, false);

        Object.Destroy(gameObject, 1f);
    }
Example #2
0
    // Token: 0x06003325 RID: 13093 RVA: 0x000C1174 File Offset: 0x000BF374
    public virtual void DoWeaponEffects(Transform soundTransform, Vector3 startPos, Vector3 endPos, global::Socket muzzleSocket, bool firstPerson, Component hitComponent, bool allowBlood, global::ItemRepresentation itemRep)
    {
        Vector3 vector = endPos - startPos;

        vector.Normalize();
        bool           flag       = this.IsSilenced(itemRep);
        GameObject     gameObject = (GameObject)Object.Instantiate(this.tracerPrefab, startPos, Quaternion.LookRotation(vector));
        global::Tracer component  = gameObject.GetComponent <global::Tracer>();

        if (component)
        {
            component.Init(hitComponent, 406721553, this.GetBulletRange(itemRep), allowBlood);
        }
        if (flag)
        {
            component.startScale = Vector3.zero;
        }
        this.PlayFireSound(soundTransform, firstPerson, itemRep);
        if (!flag)
        {
            GameObject gameObject2 = muzzleSocket.InstantiateAsChild((!firstPerson) ? this.muzzleFlashWorld : this.muzzleflashVM, false);
            Object.Destroy(gameObject2, 1f);
        }
    }