//---------------------------------------------------------------------------------------------------------------------------------------------------
//
// Copyright (C)2007 DarkWynter Studios. All rights reserved.
//
//---------------------------------------------------------------------------------------------------------------------------------------------------
// {License Information: Creative Commons}
//---------------------------------------------------------------------------------------------------------------------------------------------------
namespace ElementalGame
{
#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using System.Xml;
using System.Diagnostics;
#endregion
// Represents all the particles on the map except for those carried by a Player
// Broken down into earth, water, and wind particles
public class ParticleManager
{
public static Model particleModel;
public static Texture2D hotEarthTex;
public static Texture2D hotEarthTexBump;
public static Texture2D coldEarthTex;
public static Texture2D coldEarthTexBump;
public static Texture2D hotWaterTex;
public static Texture2D hotWaterTexBump;
public static Texture2D coldWaterTex;
public static Texture2D coldWaterTexBump;
public static Texture2D hotAirTex;
public static Texture2D hotAirTexBump;
public static Texture2D coldAirTex;
public static Texture2D coldAirTexBump;
public static Effect effect;
public ParticleManager()
{
effect = ElementalGame.content.Load("Shaders/ElementalGPU");
// Load Air Textures
hotAirTex = ElementalGame.content.Load("_textures/AirParticleFire");
hotAirTexBump = ElementalGame.content.Load("_textures/AirParticleFire_bump");
coldAirTex = ElementalGame.content.Load("_textures/AirParticleCold");
coldAirTexBump = ElementalGame.content.Load("_textures/AirParticleCold_bump");
// Load Earth Textures
hotEarthTex = ElementalGame.content.Load("_textures/EarthParticleLava");
hotEarthTexBump = ElementalGame.content.Load("_textures/EarthParticleLava_bump");
coldEarthTex = ElementalGame.content.Load("_textures/EarthParticleFrozen");
coldEarthTexBump = ElementalGame.content.Load("_textures/EarthParticleFrozen_bump");
// Load Water Textures
hotWaterTex = ElementalGame.content.Load("_textures/WaterParticleBoiling");
hotWaterTexBump = ElementalGame.content.Load("_textures/WaterParticleBoiling_bump");
coldWaterTex = ElementalGame.content.Load("_textures/WaterParticleIce");
coldWaterTexBump = ElementalGame.content.Load("_textures/WaterParticleIce_bump");
particleModel = ElementalGame.content.Load("_models/boulderHighPoly");
foreach (ModelMesh mesh in particleModel.Meshes)
{
for (int i = 0; i < mesh.MeshParts.Count; i++)
{
// Add effect to mesh
mesh.MeshParts[i].Effect = effect;
}
}
}
}
}