/// <summary> /// creates empty NPC with placeholder attributes /// </summary> /// <param name="Content"></param> /// <param name="graphicsDevice"></param> /// <param name="world"></param> /// <param name="bilbo"></param> public NPC(ContentManager Content, GraphicsDevice graphicsDevice, World world, BillboardEngine bilbo, AudioManager audio) { model = null; position = Vector3.Zero; direction = Vector3.Zero; this.world = world; speed = 0; level = 0; maxHealth = 0; health = 0; active = false; newTarget = false; XP = 0; cooldown = 0; maxCooldn = 0; element = 0; kind = 0; strength = 0; pathFinder = null; target = Vector3.Zero; isHit = false; hitTimer = 0; isDead = false; billboardEngine = bilbo; this.graphicsDevice = graphicsDevice; this.audio = audio; explosion = new Explosion(Position, graphicsDevice, Content); dmgNumbers = new List <DmgNumber>(); }
/// <summary> /// creates empty NPC with placeholder attributes /// </summary> /// <param name="Content"></param> /// <param name="graphicsDevice"></param> /// <param name="world"></param> /// <param name="bilbo"></param> public NPC(ContentManager Content, GraphicsDevice graphicsDevice, World world, BillboardEngine bilbo, AudioManager audio) { model = null; position = Vector3.Zero; direction = Vector3.Zero; this.world = world; speed = 0; level = 0; maxHealth = 0; health = 0; active = false; newTarget = false; XP = 0; cooldown = 0; maxCooldn = 0; element = 0; kind = 0; strength = 0; pathFinder = null; target = Vector3.Zero; isHit = false; hitTimer = 0; isDead = false; billboardEngine = bilbo; this.graphicsDevice = graphicsDevice; this.audio = audio; explosion = new Explosion(Position, graphicsDevice, Content); dmgNumbers = new List<DmgNumber>(); }
public Charge(Vector3 position, GraphicsDevice gDevice, ContentManager Content) { graphicsDevice = gDevice; Position = position; Texture2D texture = Content.Load<Texture2D>("Particles/particle"); billboardEngine = new BillboardEngine(5, graphicsDevice); billboardEngine.Effect.Texture = texture; particleEffect = new ChargeParticleEffect(10000, graphicsDevice, texture, Color.Blue, Color.Green, 0.4f); particleEffect.VelocityScaling = 7.0f; }
public Explosion(Vector3 position, GraphicsDevice gDevice, ContentManager Content) { graphicsDevice = gDevice; Position = position; Texture2D texture = Content.Load<Texture2D>("Particles/fire"); billboardEngine = new BillboardEngine(5, graphicsDevice); billboardEngine.Effect.Texture = texture; particleEffect = new ParticleEffect(10000, graphicsDevice, texture, Color.Goldenrod, Color.DarkMagenta, 1.0f); particleEffect.VelocityScaling = 7.0f; }
public Explosion(Vector3 position, GraphicsDevice gDevice, ContentManager Content) { graphicsDevice = gDevice; Position = position; Texture2D texture = Content.Load <Texture2D>("Particles/fire"); billboardEngine = new BillboardEngine(5, graphicsDevice); billboardEngine.Effect.Texture = texture; particleEffect = new ParticleEffect(10000, graphicsDevice, texture, Color.Goldenrod, Color.DarkMagenta, 1.0f); particleEffect.VelocityScaling = 7.0f; }
public Charge(Vector3 position, GraphicsDevice gDevice, ContentManager Content) { graphicsDevice = gDevice; Position = position; Texture2D texture = Content.Load <Texture2D>("Particles/particle"); billboardEngine = new BillboardEngine(5, graphicsDevice); billboardEngine.Effect.Texture = texture; particleEffect = new ChargeParticleEffect(10000, graphicsDevice, texture, Color.Blue, Color.Green, 0.4f); particleEffect.VelocityScaling = 7.0f; }
public ParticleEffect(int maxNumParticles, GraphicsDevice gd, Texture2D texture, Color startCol, Color endCol, float lifetime) { graphicsDevice = gd; random = new Random(); billboardEngine = new BillboardEngine(maxNumParticles, graphicsDevice); particles = new Particle[maxNumParticles]; Effect.Texture = texture; startColor = startCol; endColor = endCol; particleLifetime = lifetime; this.VelocityScaling = 1.0f; this.SizeScaling = 0.8f; }
public ChargeParticleEffect(int maxNumParticles, GraphicsDevice gd, Texture2D texture, Color startCol, Color endCol, float lifetime) { graphicsDevice = gd; random = new Random(); billboardEngine = new BillboardEngine(maxNumParticles, graphicsDevice); particles = new Particle[maxNumParticles]; Effect.Texture = texture; startColor = startCol; endColor = endCol; particleLifetime = lifetime; this.VelocityScaling = 1.5f; this.SizeScaling = 0.8f; }
public NPCCollection(World w, ContentManager Content, Player pl, GraphicsDevice graphicsDevice, AudioManager audio) : base(Constants.CAP_NPCS) { //TODO world = w; Texture2D hitTexture = Content.Load <Texture2D>("bam"); billboardEngine = new BillboardEngine(5, graphicsDevice); billboardEngine.Effect.Texture = hitTexture; this.graphicsDevice = graphicsDevice; for (int i = 0; i < Constants.CAP_NPCS; i++) { _content.Add(new NPC(Content, graphicsDevice, world, billboardEngine, audio)); } player = pl; moveData = new byte[world.size * 2][]; for (int i = 0; i < world.size * 2; ++i) { moveData[i] = new byte[world.size * 2]; } models = new Model[5]; #region load models models[0] = Content.Load <Model>("Models/enemy4"); models[1] = Content.Load <Model>("Models/enemy3"); models[2] = Content.Load <Model>("Models/enemy1"); models[3] = Content.Load <Model>("Models/enemy2"); models[4] = Content.Load <Model>("Models/boss"); #endregion queue = new Queue <DmgNumber>(); //model0 = new ModelObject("cube"); pathFinder = new AStar(world, pl, new Point(1, 1), this); }