Exemplo n.º 1
0
        //Initializes the implosion animation at the specified position
        public void AddImplosion(Vector2 implosionPosition)
        {
            Animation effectAnimation = new Animation();
            effectAnimation.Initialize(implosionTexture, implosionPosition, 12, false, 45, 134, 134, 1.0f);
            effectList.Add(effectAnimation);

            if (OptionsScreen.IsSoundOn())
                itemdrop.Play();
        }
Exemplo n.º 2
0
        public void Initialize(string textureString, Vector2 itemPosition)
        {
            //Initialize starting position
            Position = itemPosition;

            //Initialize item's texture
            itemTexture = Game.Content.Load<Texture2D>(textureString);

            //Animation to be played for texture. This is a 1 frame "animation". Just in case we want an animation in the future.
            itemAnimation = new Animation();
            itemAnimation.Initialize(itemTexture, Position, 1, true, 200, 270, 160, 0.50f);

            //Initialize all position state flags to be false
            TrappedInCorner = false;
            IsDragged = false;
        }
Exemplo n.º 3
0
        //Intializes the explosion animation at the specified position
        public void AddExplosion(Vector2 explosionPosition)
        {
            Animation effectAnimation = new Animation();
            effectAnimation.Initialize(explosionTexture, explosionPosition, 12, false, 45, 134, 134, 12.0f);
            effectList.Add(effectAnimation);

            //If the sound option is on, play the explosion sound
            if (OptionsScreen.IsSoundOn())
            {
                AudioManager.PlaySound("Explosion");
            }
        }