예제 #1
0
        public virtual void ShootEffects(int clipInfoIndex)
        {
            Host.AssertClient();

            if (clipInfoIndex < 0 || clipInfoIndex >= ClipInfos.Length)
            {
                return;
            }

            ClipInfo clipInfo = ClipInfos[clipInfoIndex];

            if (clipInfo == null)
            {
                return;
            }

            if (CarriableInfo.Category != CarriableCategories.Melee)
            {
                foreach (KeyValuePair <string, string> keyValuePair in clipInfo.ShootEffectList)
                {
                    Particles.Create(keyValuePair.Key, EffectEntity, keyValuePair.Value);
                }
            }

            if (IsLocalPawn && clipInfo.ShakeEffect != null)
            {
                _ = new Perlin(clipInfo.ShakeEffect.Length, clipInfo.ShakeEffect.Speed, clipInfo.ShakeEffect.Size, clipInfo.ShakeEffect.Rotation);
            }

            ViewModelEntity?.SetAnimParameter("fire", true);
            CrosshairPanel?.CreateEvent("fire");
        }
예제 #2
0
파일: Crossbow.cs 프로젝트: zct8002/dm98
    protected override void ShootEffects()
    {
        Host.AssertClient();

        if (Owner == Player.Local)
        {
            new Sandbox.ScreenShake.Perlin(0.5f, 4.0f, 1.0f, 0.5f);
        }

        ViewModelEntity?.SetAnimParam("fire", true);
        CrosshairPanel?.OnEvent("fire");
    }
예제 #3
0
파일: Crossbow.cs 프로젝트: Redhacker1/dm98
        protected override void ShootEffects()
        {
            Host.AssertClient();

            if (Owner == Local.Pawn)
            {
                new Perlin(0.5f, 4.0f, 1.0f, 0.5f);
            }

            ViewModelEntity?.SetAnimBool("fire", true);
            CrosshairPanel?.CreateEvent("fire");
        }
예제 #4
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");
    }
예제 #5
0
    protected virtual void DoubleShootEffects()
    {
        Host.AssertClient();

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

        ViewModelEntity?.SetAnimParam("fire_double", true);
        CrosshairPanel?.OnEvent("fire");

        if (Owner == Player.Local)
        {
            new Sandbox.ScreenShake.Perlin(3.0f, 3.0f, 3.0f);
        }
    }
예제 #6
0
파일: Shotgun.cs 프로젝트: Redhacker1/dm98
        protected virtual void DoubleShootEffects()
        {
            Host.AssertClient();

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

            ViewModelEntity?.SetAnimBool("fire_double", true);
            CrosshairPanel?.CreateEvent("fire");

            if (IsLocalPawn)
            {
                new Perlin(3.0f, 3.0f, 3.0f);
            }
        }
예제 #7
0
    protected override void ShootEffects()
    {
        Host.AssertClient();

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

        if (Owner == Local.Pawn)
        {
            new Sandbox.ScreenShake.Perlin(0.5f, 4.0f, 1.0f, 0.5f);
        }

        ViewModelEntity?.SetAnimParameter("fire", true);
        CrosshairPanel?.CreateEvent("fire");
    }
예제 #8
0
        protected virtual void ShootEffects()
        {
            Host.AssertClient();

            Log.Info($"{EffectEntity} {ViewModelEntity} {IsFirstPersonMode} {CurrentView.Viewer} parent:{Parent}");
            Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle");

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

            ViewModelEntity?.SetAnimBool("fire", true);
            CrosshairPanel?.OnEvent("fire");
        }
예제 #9
0
        protected override void ShootEffects()
        {
            Host.AssertClient();

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

            ViewModelEntity?.SetAnimParam("fire", true);

            if (Owner == Player.Local)
            {
                _ = new Sandbox.ScreenShake.Perlin(1.0f, 1.5f, 2.0f);
            }

            CrosshairPanel?.OnEvent("fire");
        }
예제 #10
0
파일: Shotgun.cs 프로젝트: Redhacker1/dm98
        protected override void ShootEffects()
        {
            Host.AssertClient();

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

            ViewModelEntity?.SetAnimBool("fire", true);

            if (IsLocalPawn)
            {
                new Perlin(1.0f, 1.5f, 2.0f);
            }

            CrosshairPanel?.CreateEvent("fire");
        }
예제 #11
0
    public virtual void ShootEffects()
    {
        Host.AssertClient();

        var  muzzle  = EffectEntity.GetAttachment("muzzle");
        bool InWater = Physics.TestPointContents(muzzle.Pos, CollisionLayer.Water);

        Sound.FromEntity("rust_pistol.shoot", this);
        Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle");

        ViewModelEntity?.SetAnimParam("fire", true);
        CrosshairPanel?.OnEvent("onattack");

        if (Owner == Player.Local)
        {
            new Sandbox.ScreenShake.Perlin(0.5f, 2.0f, 0.5f);
        }
    }
예제 #12
0
    protected override void ShootEffects()
    {
        Host.AssertClient();

        var muzzle = EffectEntity.GetAttachment("muzzle");

        //bool InWater = Physics.TestPointContents( muzzle.Pos, CollisionLayer.Water );
        Sound.FromEntity(AttackSound.Name, this);

        Particles.Create("particles/balloon_grenade_launcher_muzzle.vpcf", EffectEntity, "muzzle");
        ViewModelEntity?.SetAnimParam("fire", true);
        CrosshairPanel?.OnEvent("onattack");

        if (Owner == Local.Client)
        {
            new Sandbox.ScreenShake.Perlin(0.5f, 2.0f, 0.5f);
        }
    }
예제 #13
0
파일: DmWeapon.cs 프로젝트: Redhacker1/dm98
        protected virtual void ShootEffects()
        {
            Host.AssertClient();

            var particle = Particles.Create("particles/pistol_muzzleflash.vpcf", EffectEntity, "muzzle");
            var Light    = new Light(EffectEntity.Position, 1000, Color.Yellow * 100);

            //EffectEntity.AddChild(Light);


            if (IsLocalPawn)
            {
                new Perlin();
            }

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

            HandleLight(Light);
        }