Пример #1
0
 public BackGroundObject(float positionX, float positionY, Sprite sprite, float speed, Trex trex)
 {
     Sprite     = sprite;
     PositionX  = positionX;
     _positionY = positionY;
     Speed      = speed;
     _trex      = trex;
 }
Пример #2
0
 public ObstacleManager(EntityManager entityManager, Trex trex, ScoreBoard scoreBoard, Texture2D spriteSheet, GraphicsDevice graphicsDevice)
 {
     _entityManager = entityManager;
     _trex          = trex;
     _scoreBoard    = scoreBoard;
     _random        = new Random();
     _spriteSheet   = spriteSheet;
     _gd            = graphicsDevice;
 }
Пример #3
0
        public ScoreBoard(Texture2D texture, Vector2 position, Trex trex, SoundEffect sfx)
        {
            _texture      = texture;
            Position      = position;
            _trex         = trex;
            _sfxMilestone = sfx;

            _trex.Died += SetHighScore;
        }
Пример #4
0
 public CactusGroup(Texture2D spriteSheet, bool isLarge, GroupSize size, Trex trex, Vector2 position, GraphicsDevice graphicsDevice) : base(trex, position)
 {
     IsLarge = isLarge;
     Size    = size;
     Sprite  = GenerateSprite(spriteSheet);
     HitBox.Inflate(-3, -3);
     _gD   = graphicsDevice;
     Speed = 1;
 }
Пример #5
0
        public BackGroundManager(Texture2D spriteSheet, EntityManager entityManager, Trex trex)
        {
            _spriteSheet   = spriteSheet;
            _entityManager = entityManager;
            _trex          = trex;
            _random        = new Random();

            _cloudSprite = new Sprite(_spriteSheet, CLOUD_SPRITE_COORDS_X, CLOUD_SPRITE_COORDS_Y, CLOUD_WIDTH, CLOUD_HEIGHT);
        }
Пример #6
0
        public GroundManager(Texture2D spriteSheet, EntityManager entityManager, Trex trex)
        {
            _spriteSheet   = spriteSheet;
            _entityManager = entityManager;
            _groundSprites = new List <GroundTile>();
            _trex          = trex;
            _random        = new Random();

            _regularSprite = new Sprite(spriteSheet, GROUND_SPRITE_X, GROUND_SPRITE_Y, GROUND_SPRITE_WIDTH, GROUND_SPRITE_HEIGHT);
            _bumpySprite   = new Sprite(spriteSheet, GROUND_SPRITE_X + GROUND_SPRITE_WIDTH, GROUND_SPRITE_Y, GROUND_SPRITE_WIDTH, GROUND_SPRITE_HEIGHT);
        }
Пример #7
0
 protected Obstacle(Trex trex, Vector2 position)
 {
     _trex    = trex;
     Position = position;
 }
Пример #8
0
 public FlyingDino(Trex trex, Vector2 position, Texture2D spriteSheet) : base(trex, position)
 {
     CreateAnimation(spriteSheet);
     Speed = 1;
 }