private void LoadParticleSystem() { //particleSystems List <Texture2D> texList = new List <Texture2D>(); texList.Add(GameConstants.Content.Load <Texture2D>("Particles/bubble")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud1")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud2")); //texList.Add(GameConstants.Content.Load<Texture2D>("Particles/cloud3")); VeilParticles = new VeilOfDath(texList, 10, 1f, new Vector2(0.5f, 0.5f)); VeilofDeath = new Veil(GameConstants.iDifficulty, Player, VeilParticles); }
private void Initialize(int toughness, Player victim, AParticleEnginge PE) { Position = new Vector3(GameManager.Instance.StartPos.X, (GameManager.Instance.Level > 0 ? GameManager.Instance.StartPos.Y - ((180 - 12 * toughness) + GameManager.Instance.fVeilDistance) / 2 : GameManager.Instance.StartPos.Y - (180 - 12 * toughness)), 0); //float temp = GameConstants.fMovingSpeed + (0.25f* (float)Math.Log(0.3f * 1)); //float temp2 = GameConstants.fMovingSpeed + (0.25f * (float)Math.Log(0.3f * 3)); //float temp3 = GameConstants.fMovingSpeed + (0.25f * (float)Math.Log(0.3f * 5)); //Console.WriteLine("Log_test: "+temp+","+temp2+","+temp3 ); fSpeed = Math.Max(0.1f * GameConstants.fMovingSpeed, 0.1f * (GameConstants.fMovingSpeed + (0.25f * (float)Math.Log(0.1f * GameConstants.iDifficulty * 5)))); Victim = victim; if (GameConstants.isDebugMode) { Console.WriteLine("PlayerSpeed: " + GameConstants.fMovingSpeed + " VeilSpeed: " + fSpeed); } fStartDistance = fDistance = Victim.Position.Y - Position.Y; if (GameConstants.isDebugMode) { Console.WriteLine("Distance: " + fDistance); } particleEngine = PE; }
public Veil(int toughness, Player victim, AParticleEnginge PE) { Initialize(toughness, victim, PE); LoadContent(); }