Пример #1
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);
        }
Пример #2
0
        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;
        }
Пример #3
0
        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;
        }