Ejemplo n.º 1
0
        private void HandleKill(LivingEntity deadEntity, Vector bodyDirection, List <AbstractParticleUnit> sceneParticles)
        {
            deadEntity.LegsContainer.ClearContent();
            deadEntity.TorsoContainer.ClearContent();
            deadEntity.CollisionShape.CanCollide = false;
            sceneParticles.Add(ParticleFactory.CreateDeadMenBody(EntityFactory.CreateDeadBody(deadEntity.DeadBodyPath), deadEntity.Position, bodyDirection));
            var wPosition         = deadEntity.Position + new Vector(r.Next(48, 64), r.Next(48, 64));
            var collectableWeapon = AbstractWeaponFactory.CreateRuntimeCollectable(wPosition, deadEntity.GetWeaponType());

            currentLevel.Collectables.Add(collectableWeapon);
            currentLevel.Sprites.Add(collectableWeapon.SpriteContainer);
        }