Exemplo n.º 1
0
    private void OnMeleeHit()
    {
        Host.AssertClient();

        if (IsLocalPawn)
        {
            _ = new Sandbox.ScreenShake.Perlin(1.0f, 1.0f, 3.0f);
        }

        ViewModelEntity?.SetAnimParameter("attack_hit", true);
    }
Exemplo n.º 2
0
    protected virtual void ShootEffects()
    {
        Host.AssertClient();

        Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle");

        if (IsLocalPawn)
        {
            _ = new Sandbox.ScreenShake.Perlin();
        }

        ViewModelEntity?.SetAnimParameter("fire", true);
        CrosshairPanel?.CreateEvent("fire");
    }