コード例 #1
0
 // Token: 0x06003444 RID: 13380 RVA: 0x000C2BF4 File Offset: 0x000C0DF4
 public override void PrimaryAttack(global::ViewModel vm, global::ItemRepresentation itemRep, global::IThrowableItem itemInstance, ref global::HumanController.InputSample sample)
 {
     base.PrimaryAttack(vm, itemRep, itemInstance, ref sample);
     vm.Play("pull_pin");
     this.pullPinSound.Play();
     this.GetHandGrenadeItemInstance(itemInstance).nextPrimaryAttackTime   = Time.time + 1000f;
     this.GetHandGrenadeItemInstance(itemInstance).nextSecondaryAttackTime = Time.time + 1000f;
 }
コード例 #2
0
 // Token: 0x060032BC RID: 12988 RVA: 0x000C0088 File Offset: 0x000BE288
 public virtual void Local_ReadyArrow(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample)
 {
     if (vm)
     {
         vm.Play("drawarrow", 0);
     }
     itemInstance.completeDrawTime = Time.time + this.drawLength;
     this.drawArrowSound.PlayLocal(Camera.main.transform, Vector3.zero, 1f, 1f, 3f, 20f, 0);
 }
コード例 #3
0
    // Token: 0x0600363D RID: 13885 RVA: 0x000C54D0 File Offset: 0x000C36D0
    public virtual void Local_BeginStrikes(int numStrikes, global::ViewModel vm, global::ItemRepresentation itemRep, global::IStrikeGunItem itemInstance, ref global::HumanController.InputSample sample)
    {
        string name = "strike" + numStrikes;

        vm.Play(name, 4);
        AudioClip clip = this.strikeSounds[numStrikes - 1];

        clip.PlayLocal(Camera.main.transform, Vector3.zero, 1f, Random.Range(0.96f, 1.03f), 2f, 2f, 0);
    }
コード例 #4
0
    // Token: 0x06003761 RID: 14177 RVA: 0x000C6454 File Offset: 0x000C4654
    public override void PrimaryAttack(global::ViewModel vm, global::ItemRepresentation itemRep, global::IThrowableItem itemInstance, ref global::HumanController.InputSample sample)
    {
        global::ITorchItem torchInstance = this.GetTorchInstance(itemInstance);

        if (torchInstance.isLit)
        {
            return;
        }
        if (vm)
        {
            vm.Play("ignite");
        }
        torchInstance.realIgniteTime          = Time.time + 0.8f;
        torchInstance.nextPrimaryAttackTime   = Time.time + 1.5f;
        torchInstance.nextSecondaryAttackTime = Time.time + 1.5f;
    }
コード例 #5
0
    // Token: 0x06003445 RID: 13381 RVA: 0x000C2C54 File Offset: 0x000C0E54
    public override void AttackReleased(global::ViewModel vm, global::ItemRepresentation itemRep, global::IThrowableItem itemInstance, ref global::HumanController.InputSample sample)
    {
        Debug.Log("Attack released!!!");
        vm.Play("throw");
        vm.PlayQueued("deploy");
        this.GetHandGrenadeItemInstance(itemInstance).nextPrimaryAttackTime   = Time.time + 1f;
        this.GetHandGrenadeItemInstance(itemInstance).nextSecondaryAttackTime = Time.time + 1f;
        global::Character component  = global::PlayerClient.GetLocalPlayer().controllable.GetComponent <global::Character>();
        Vector3           eyesOrigin = component.eyesOrigin;
        Vector3           forward    = component.eyesAngles.forward;
        BitStream         bitStream  = new BitStream(false);

        bitStream.WriteVector3(eyesOrigin);
        bitStream.WriteVector3(forward * this.GetHandGrenadeItemInstance(itemInstance).heldThrowStrength);
        Debug.Log("Throw strength is : " + this.GetHandGrenadeItemInstance(itemInstance).heldThrowStrength);
        this.GetHandGrenadeItemInstance(itemInstance).EndHoldingBack();
        itemRep.ActionStream(1, 0, bitStream);
    }
コード例 #6
0
    // Token: 0x060032BD RID: 12989 RVA: 0x000C00F0 File Offset: 0x000BE2F0
    public virtual void Local_FireArrow(global::ViewModel vm, global::ItemRepresentation itemRep, global::IBowWeaponItem itemInstance, ref global::HumanController.InputSample sample)
    {
        if (vm)
        {
            vm.Play("fire_1", 0);
        }
        this.MakeReadyIn(itemInstance, this.fireRate);
        global::Character character = itemInstance.character;

        if (character == null)
        {
            return;
        }
        Ray     eyesRay    = character.eyesRay;
        Vector3 eyesOrigin = character.eyesOrigin;

        this.FireArrow(eyesOrigin, character.eyesRotation, itemRep, itemInstance);
        BitStream bitStream = new BitStream(false);

        bitStream.WriteVector3(eyesOrigin);
        bitStream.WriteQuaternion(character.eyesRotation);
        itemRep.ActionStream(1, 0, bitStream);
    }