public TrainImageLayer(GameData gameData, TileSet tileSet, int imageIndex, int minMSTimeBeforeShow, int maxMSTimeBeforeShow, double minTrainSpeed, double maxTrainSpeed)
        {
            this.minMSTimeBeforeShow = minMSTimeBeforeShow;
            this.maxMSTimeBeforeShow = maxMSTimeBeforeShow;
            this.minTrainSpeed = minTrainSpeed;
            this.maxTrainSpeed = maxTrainSpeed;

            this.tileSet = tileSet;
            this.imageIndex = imageIndex;
            this.gameData = gameData;

            pxPerFrameSpeed = 0;
            pixelShiftSizeAccumulator = 0;

            xOffset = 0;
            yOffset = 0;

            fixedXOffset = 0;
            fixedYOffset = 0;

            maxLoopCount = 0;
            curLoopCount = 0;
            showImage = false;

            msLeftBeforeShow = getNextTime();
        }
Beispiel #2
0
        public MapLayer(GameData gameData, int tileWidth, int tileHeight)
        {
            this.gameData = gameData;
            this.tileWidth = tileWidth;
            this.tileHeight = tileHeight;

            this.reset();
        }
Beispiel #3
0
 public Game1()
 {
     sm_game = this;
     graphics = new GraphicsDeviceManager(this);
     graphics.PreferredBackBufferWidth = 1024;
     graphics.PreferredBackBufferHeight = 960;
     graphics.ApplyChanges();
     Content.RootDirectory = "Content";
     audioSys = new AudioSys();
     gameData = new GameData();
 }
Beispiel #4
0
        public ImageLayer(GameData gameData, TileSet tileSet, int imageIndex)
        {
            this.tileSet = tileSet;
            this.imageIndex = imageIndex;
            this.gameData = gameData;

            pxPerFrameSpeed = 0;
            pixelShiftSizeAccumulator = 0;

            xOffset = 0;
            yOffset = 0;

            fixedXOffset = 0;
            fixedYOffset = 0;
        }
Beispiel #5
0
 public SpriteLayer(GameData gameData)
 {
     this.gameData = gameData;
 }
 public ProjectileLayer(GameData gameData)
 {
     this.gameData = gameData;
 }