示例#1
0
        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();
        }
示例#2
0
        public MapLayer(GameData gameData, int tileWidth, int tileHeight)
        {
            this.gameData = gameData;
            this.tileWidth = tileWidth;
            this.tileHeight = tileHeight;

            this.reset();
        }
示例#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();
 }
示例#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;
        }
示例#5
0
 public SpriteLayer(GameData gameData)
 {
     this.gameData = gameData;
 }
示例#6
0
 public ProjectileLayer(GameData gameData)
 {
     this.gameData = gameData;
 }