public void AddAngelEffect(Vector2 position) { Animation myAnimation; Animation myAnimation2; myAnimation = new Animation(effect3, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); sound1.Play(); myAnimation.FrameTime = 1 / 30.0f; myAnimation2 = new Animation(effect3, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation.FrameTime = 1 / 30.0f; effectList.Add(myAnimation); effectList.Add(myAnimation2); positionList.Add(position); positionList.Add(position); Random rand = new Random(); rotationList.Add(rand.Next()*10); rotationList.Add(rand.Next() * 10); }
public void LoadContent(ContentManager content, List<GameObject> all) { Animation redGlow = new Animation(content.Load<Texture2D>("animations/redglow"), new Rectangle(0, 0, 275, 275), 30, 0.5f, 10, 3); redGlow.FrameTime = 1 / 8f; Animation blueGlow = new Animation(content.Load<Texture2D>("animations/blueglow"), new Rectangle(0, 0, 275, 275), 30, 0.5f, 10, 3); blueGlow.FrameTime = 1 / 8f; Animation animation = new Animation(content.Load<Texture2D>("Animations/angel"), new Rectangle(0,0,110,126), 50, 1.0f, 10,5); _sprites.Add(Texture.ANGEL, new Sprite(animation)); animation = new Animation(content.Load<Texture2D>("animations/demon"), new Rectangle(0, 0, 110, 126), 50, 1.0f, 10, 5); _sprites.Add(Texture.DEVIL, new Sprite(animation)); animation = new Animation(content.Load<Texture2D>("animations/death"), new Rectangle(0, 0, 150, 180), 60, 1.0f, 10, 6); _sprites.Add(Texture.REAPER, new Sprite(animation)); animation = new Animation(content.Load<Texture2D>("animations/bunny2"), new Rectangle(0, 0, 90, 120), 30, 1.0f, 10, 3); _sprites.Add(Texture.BUNNY, new Sprite(animation)); animation = new Animation(content.Load<Texture2D>("animations/bunny1"), new Rectangle(0, 0, 90, 120), 30, 1.0f, 10, 3); _sprites.Add(Texture.BUNNY_GIRL, new Sprite(animation)); _sprites.Add(Texture.KNIFE, new Sprite(content.Load<Texture2D>("knife"), redGlow)); _sprites.Add(Texture.BABY, new Sprite(content.Load<Texture2D>("Child/child_face"), new Vector2(-55, -55))); _sprites.Add(Texture.CHILD_LEFTARM, new Sprite(content.Load<Texture2D>("Child/child_leftarm"), new Vector2(0,0))); _sprites.Add(Texture.CHILD_LEFTHAND, new Sprite(content.Load<Texture2D>("Child/child_lefthand"), new Vector2(0, 0))); _sprites.Add(Texture.CHILD_RIGHTARM, new Sprite(content.Load<Texture2D>("Child/child_rightarm"), new Vector2(0, 0))); _sprites.Add(Texture.CHILD_RIGHTHAND, new Sprite(content.Load<Texture2D>("Child/child_righthand"), new Vector2(0, 0))); animation = new Animation(content.Load<Texture2D>("animations/bible"), new Rectangle(0, 0, 100, 108), 20, 1.0f, 10,2); _sprites.Add(Texture.BIBLE, new Sprite(animation, blueGlow)); _sprites.Add(Texture.VEGETABLE, new Sprite(content.Load<Texture2D>("vegi"),blueGlow)); _sprites.Add(Texture.DRUGS, new Sprite(content.Load<Texture2D>("drugs"),redGlow)); _sprites.Add(Texture.GAME, new Sprite(content.Load<Texture2D>("games"),redGlow)); _sprites.Add(Texture.BUNNY_CAPTURED, new Sprite(content.Load<Texture2D>("cageRabit"))); _sprites.Add(Texture.CHILD_NEW_FACE, new Sprite(content.Load<Texture2D>("NewerChild/head"))); animation = new Animation(content.Load<Texture2D>("NewerChild/body"), new Rectangle(0, 0, 42, 54), 30, 1.0f, 10, 3); _sprites.Add(Texture.CHILD_NEW_TORSO, new Sprite(animation, new Vector2(30, 80))); }
public void AddDeathDespawnEffect(Vector2 position) { Animation myAnimation1; Animation myAnimation2; Animation myAnimation3; myAnimation1 = new Animation(effect5, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation1.FrameTime = 1 / 30.0f; effectList.Add(myAnimation1); myAnimation2 = new Animation(effect2, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation2.FrameTime = 1 / 30.0f; effectList.Add(myAnimation2); myAnimation3 = new Animation(effect2, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation3.FrameTime = 1 / 30.0f; effectList.Add(myAnimation3); positionList.Add(position); positionList.Add(position); positionList.Add(position); Random rand = new Random(); rotationList.Add(rand.Next() * 10); rotationList.Add(rand.Next() * 10); rotationList.Add(rand.Next() * 10); }
public void AddDemonEffect(Vector2 position) { sound2.Play(); Animation myAnimation1; Animation myAnimation2; myAnimation1 = new Animation(effect4, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation1.FrameTime = 1 / 30.0f; effectList.Add(myAnimation1); myAnimation2 = new Animation(effect4, new Rectangle(0, 0, 200, 227), 20, 1.0f, 10, 2); myAnimation2.FrameTime = 1 / 30.0f; effectList.Add(myAnimation2); positionList.Add(position); positionList.Add(position); Random rand = new Random(); rotationList.Add(rand.Next()*10); rotationList.Add(rand.Next() * 10); }
public Sprite(Animation animation, Animation glow) { _animation = animation; _backgroundAnimation = glow; _origin = GetOriginFromAnimation(animation); }
public Sprite(Texture2D texture, Animation glow) { _backgroundAnimation = glow; _texture = texture; _origin = GetOriginFromTexture(texture); }
public Sprite(Texture2D texture, Vector2 origin, Animation glow) { _backgroundAnimation = glow; _texture = texture; _origin = origin; }
public Sprite(Animation animation, Vector2 origin, Animation glow) { _animation = animation; _backgroundAnimation = glow; _origin = origin; }
public Sprite(Animation animation, Vector2 origin) { _animation = animation; _origin = origin; }
public Sprite(Animation animation) { _animation = animation; _origin = GetOriginFromAnimation(animation); }
private Vector2 GetOriginFromAnimation(Animation animation) { return Vector2.Zero; }