public GreenMushroomModel(ItemEnemySpriteFactory itemEnemySpriteFactory, Vector2 coordinates, Vector2 velocity, CollisionGrid collisionGrid)
            : base(itemEnemySpriteFactory)
        {
            Texture = ItemEnemySpriteFactory.GetItemSprite("greenmushroom");
            //Initialize state first
            CurrentState = new ItemStandardState(this);
            IsAnimated   = false;
            CurrentState.Enter(null);

            //Define the characteristics of a brick block here
            Position     = coordinates;
            CurrentFrame = 0;
            //If additional frames of QuestionBlocks are added, update Columns
            Columns     = 1;
            Rows        = 1;
            LayerDepth  = 1;
            Scale       = new Vector2(10, 10);
            Width       = Texture.Width / Columns;
            Height      = Texture.Height / Rows;
            TotalFrames = 1;
            Velocity    = velocity;

            //Bump Animation variables
            FixedPosition = Position;
            horizontalV   = 1;
            //MoveAwayFactor = new Vector2(50, 0);
            CollisionGrid    = collisionGrid;
            ItemOutsideBlock = 0;
        }
Exemple #2
0
        public CoinModel(ItemEnemySpriteFactory itemEnemySpriteFactory, Vector2 coordinates, Vector2 velocity, String type)
            : base(itemEnemySpriteFactory)
        {
            Texture = ItemEnemySpriteFactory.GetItemSprite("coinstatic");
            //Initialize state first
            CurrentState = new ItemStandardState(this);
            CurrentState.Enter(null);

            //Define the characteristics of a brick block here
            Position     = coordinates;
            CurrentFrame = 0;
            //If additional frames of QuestionBlocks are added, update Columns
            Columns     = 4;
            Rows        = 1;
            LayerDepth  = 1;
            Scale       = new Vector2(10, 10);
            Width       = Texture.Width / Columns;
            Height      = Texture.Height / Rows;
            TotalFrames = 4;
            Velocity    = velocity;

            //Bump Animation variables
            FixedPosition = Position;
            ItemGoingUp   = false;
            Debug.WriteLine(type);
        }
        public FireFlowerModel(ItemEnemySpriteFactory itemEnemySpriteFactory, Vector2 coordinates, Vector2 velocity, CollisionGrid collisionGrid)
            : base(itemEnemySpriteFactory)
        {
            Texture = ItemEnemySpriteFactory.GetItemSprite("fireflower");
            //Initialize state first
            CurrentState = new ItemStandardState(this);
            CurrentState.Enter(null);

            //Define the characteristics of a brick block here
            Position     = coordinates;
            CurrentFrame = 0;
            //If additional frames of QuestionBlocks are added, update Columns
            Columns     = 4;
            Rows        = 1;
            LayerDepth  = 1;
            Scale       = new Vector2(10, 10);
            Width       = Texture.Width / Columns;
            Height      = Texture.Height / Rows;
            TotalFrames = 4;
            Velocity    = velocity;

            //Bump Animation variables
            FixedPosition = Position;
            CollisionGrid = collisionGrid;
        }
Exemple #4
0
 protected EnemyModel(ItemEnemySpriteFactory itemEnemySpriteFactory)
 {
     ItemEnemySpriteFactory = itemEnemySpriteFactory;
     Sprite      = new EnemySprite(this);
     Support     = false;
     HorizontalV = 1;
     VerticalV   = 2;
 }
Exemple #5
0
        protected ItemModel(ItemEnemySpriteFactory itemEnemySpriteFactory)
        {
            ItemEnemySpriteFactory = itemEnemySpriteFactory;
            Sprite    = new ItemSprite(this);
            IsVisible = true;
            ConsumedPositionFactor = 1;
            Support        = false;
            CanGravity     = false;
            verticalV      = 1;
            horizontalV    = 0;
            MoveAwayFactor = new Vector2(horizontalV, verticalV);

            Time = new Stopwatch();
        }
Exemple #6
0
        public TurtleEnemyModel(ItemEnemySpriteFactory itemEnemySpriteFactory, Vector2 coordinates, Vector2 velocity)
            : base(itemEnemySpriteFactory)
        {
            Texture = ItemEnemySpriteFactory.GetEnemySprite("turtle");
            //Initialize state first
            CurrentState = new TurtleStandardState(this);
            CurrentState.Enter(null);

            //Define the characteristics of a brick block here
            Position     = coordinates;
            CurrentFrame = 0;
            //If additional frames of QuestionBlocks are added, update Columns
            Columns    = 3;
            Rows       = 1;
            LayerDepth = 1;
            Scale      = new Vector2(10, 10);
            Width      = Texture.Width / Columns;
            Height     = Texture.Height / Rows;
            Velocity   = velocity;
        }