public ParticleEffect GetEffect(string effectName) { var effect = fldata.Effects.FindEffect(effectName); Legacy.Effects.VisEffect visfx; if (effect == null) { visfx = fldata.Effects.FindVisEffect(effectName); } else { visfx = fldata.Effects.FindVisEffect(effect.VisEffect); } foreach (var texfile in visfx.Textures) { var path = Compatibility.VFS.GetPath(fldata.Freelancer.DataPath + texfile); if (path.EndsWith(".txm")) { resource.LoadTxm(path); } else if (path.EndsWith(".mat")) { resource.LoadMat(path); } } var alepath = Compatibility.VFS.GetPath(fldata.Freelancer.DataPath + visfx.AlchemyPath); var ale = new AleFile(alepath); var lib = new ParticleLibrary(resource, ale); return(lib.FindEffect((uint)visfx.EffectCrc)); }
public Player(Game game, String assetName, LightSource light) : base(game, assetName, light) { thrust = gameOptions.Thrust; gravity = gameOptions.Gravity; particleLibrary = null; deathTimer = 50; lifeCounter = 1; }
public AleViewer(string title, string name, AleFile ale, MainWindow main) { plib = new ParticleLibrary(main.Resources, ale); effectNames = new string[plib.Effects.Count]; for (int i = 0; i < effectNames.Length; i++) { effectNames[i] = string.Format("{0} (0x{1:X})", plib.Effects[i].Name, plib.Effects[i].CRC); } Title = title; this.name = name; this.rstate = main.RenderState; vps = main.Viewport; buffer = main.Commands; billboards = main.Billboards; polyline = main.Polyline; debug = main.DebugRender; SetupRender(0); }
public Level(Game game, ParticleLibrary _particleEffects, ref SoundPlayer _soundPlayer, Scene _scene, Player _playerOne, int peeps, int _levelNumber) { levelNumber = _levelNumber; particleEffects = _particleEffects; peepsLeft = peeps; scene = _scene; scene.Camera.ResetCamera(); soundPlayer = _soundPlayer; map = new Map(game, new Vector3(8, 7, 4), scene.Light, peepsLeft); playerOne = _playerOne; playerOne.SetStartPosition(map.GetPlayerStartPosition()); playerOne.SetPlayArea(map.GetPlayArea()); playerOne.AttachParticleLibrary(particleEffects); playerOne.AttachSoundPlayer(ref _soundPlayer); playerOne.Reset(); playerCollisionCheck = CollisionType.None; skybox = new Base3DObject(game, "Models/skybox", scene.Light); gameHud = new Hud(game.Content, game.GraphicsDevice.Viewport.TitleSafeArea); }
public AleViewer(string title, string name, AleFile ale, MainWindow main) { plib = new ParticleLibrary(main.Resources, ale); pool = new ParticleEffectPool(); effectNames = new string[plib.Effects.Count]; for (int i = 0; i < effectNames.Length; i++) { effectNames[i] = string.Format("{0} (0x{1:X})", plib.Effects[i].Name, plib.Effects[i].CRC); } Title = title; this.name = name; this.rstate = main.RenderState; aleViewport = new Viewport3D(main); aleViewport.DefaultOffset = aleViewport.CameraOffset = new Vector3(0, 0, 200); aleViewport.ModelScale = 25; buffer = main.Commands; billboards = main.Billboards; polyline = main.Polyline; debug = main.DebugRender; SetupRender(0); }
public static void Prepare(ImageLibrary imageLibrary, ParticleLibrary particleLibrary) { _imageLibrary = imageLibrary; _particleLibrary = particleLibrary; }
protected void InitParticles() { explosionParticles = new ExplosionParticleSystem(game, game.Content); explosionSmokeParticles = new ExplosionSmokeParticleSystem(game, game.Content); energyParticles = new EnergyParticleSystem(game, game.Content); particleLibrary = new ParticleLibrary(); explosionSmokeParticles.DrawOrder = 200; energyParticles.DrawOrder = 300; explosionParticles.DrawOrder = 400; game.Components.Add(explosionParticles); game.Components.Add(explosionSmokeParticles); game.Components.Add(energyParticles); particleLibrary.ExplosionParticles = explosionParticles; particleLibrary.ExplosionSmokeParticles = explosionSmokeParticles; particleLibrary.EnergyParticles = energyParticles; }
public void AttachParticleLibrary(ParticleLibrary _particleLibrary) { particleLibrary = _particleLibrary; }