Пример #1
0
    // Token: 0x060035FA RID: 13818 RVA: 0x000C50E4 File Offset: 0x000C32E4
    public virtual void MakeTracer(Vector3 startPos, Vector3 endPos, float range, Component component, bool allowBlood)
    {
        Vector3 vector = endPos - startPos;

        vector.Normalize();
        GameObject     gameObject = (GameObject)Object.Instantiate(this.tracerPrefab, startPos, Quaternion.LookRotation(vector));
        global::Tracer component2 = gameObject.GetComponent <global::Tracer>();

        if (component2)
        {
            component2.Init(component, 406721553, range, allowBlood);
        }
    }
Пример #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);
        }
    }