public void CreateBlockedExplosionEffect(BaseShotEvent evt, BlockedWeaponNode node)
        {
            HitExplosionGraphicsComponent hitExplosionGraphics = node.hitExplosionGraphics;
            WeaponBlockedComponent        weaponBlocked        = node.weaponBlocked;
            Vector3 position = weaponBlocked.BlockPoint - (evt.ShotDirection * hitExplosionGraphics.ExplosionOffset);

            if (hitExplosionGraphics.UseForBlockedWeapon)
            {
                this.DrawExplosionEffect(position, weaponBlocked.BlockNormal, hitExplosionGraphics.ExplosionAsset, hitExplosionGraphics.ExplosionDuration, node);
            }
        }
Exemplo n.º 2
0
        public void PrepareSplashTargetsWhenBlockedWeapon(ShotPrepareEvent evt, BlockedWeaponNode weapon)
        {
            WeaponBlockedComponent weaponBlocked = weapon.weaponBlocked;
            StaticHit staticHit = new StaticHit {
                Position = weaponBlocked.BlockPoint,
                Normal   = weaponBlocked.BlockNormal
            };
            SplashHitData splashHit = SplashHitData.CreateSplashHitData(new List <HitTarget>(), staticHit, weapon.Entity);

            base.ScheduleEvent(new CollectSplashTargetsEvent(splashHit), weapon);
        }
Exemplo n.º 3
0
        public void SendShot(ShotPrepareEvent evt, BlockedWeaponNode weaponNode)
        {
            MuzzleLogicAccessor accessor = new MuzzleLogicAccessor(weaponNode.muzzlePoint, weaponNode.weaponInstance);

            base.ScheduleEvent(new SelfShotEvent(accessor.GetFireDirectionWorld()), weaponNode);
        }
Exemplo n.º 4
0
        public void RequestBulletBuild(BaseShotEvent evt, BlockedWeaponNode weaponNode)
        {
            MuzzleVisualAccessor accessor = new MuzzleVisualAccessor(weaponNode.muzzlePoint);

            base.ScheduleEvent(new BulletBuildEvent(accessor.GetFireDirectionWorld()), weaponNode);
        }