예제 #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;
 }