コード例 #1
0
ファイル: Flashlight.cs プロジェクト: Facepunch/sandbox
    private void OnMeleeHit()
    {
        Host.AssertClient();

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

        ViewModelEntity?.SetAnimParameter("attack_hit", true);
    }
コード例 #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");
    }