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);
            }
        }
예제 #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);
        }
예제 #3
0
        public void SendShot(ShotPrepareEvent evt, BlockedWeaponNode weaponNode)
        {
            MuzzleLogicAccessor accessor = new MuzzleLogicAccessor(weaponNode.muzzlePoint, weaponNode.weaponInstance);

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

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