package com.Tutorial
{
    import com.adamatomic.flixel.*;
    public class Door extends FlxSprite
    {
        [Embed(source='../../data/doorway.png')] private var ImgPoster:Class;
        private var _move_speed:int = 400;
        private var _jump_power:int = 800;   
        private var _max_health:int = 10;
        private var _hurt_counter:Number = 0;
        private var _can_jump:Boolean = true;
        private var _last_jump:Number = 0;
		
        public function Door(X:Number,Y:Number):void
        {
            super(ImgPoster, X, Y, true, true);//Max speeds
            maxVelocity.x = 200;
            maxVelocity.y = 200;
            health = 1;
            acceleration.y = 0;
            drag.x = 300;
            width = 16;
            height = 16;
            offset.x = 0;
            offset.y = 0;
            addAnimation("0", [0]);
        }
    
        override public function update():void
        {
            if(dead)
            {
                if(finished) exists = false;
                else
                    super.update();
                return;
            }
            			
            super.update();
        }
    }
}