예제 #1
0
 public AnimationStripAnalyzer(AnimationStripSettings settings)
 {
     this.settings    = settings;
     tileSheetColumns = ((settings.TileSheetWidth - 1) / settings.FrameWidth) + 1;
     tileSheetRows    = ((settings.TileSheetHeight - 1) / settings.FrameHeight) + 1;
     tileSheetCount   = tileSheetColumns * tileSheetRows;
     ParseSpriteSheet(0);
 }
예제 #2
0
파일: AnimationStrip.cs 프로젝트: gmich/Gem
        public AnimationStrip(AnimationStripSettings settings)
        {
            this.Settings    = settings;
            currentFrame     = settings.StartFrame - 1;
            tileSheetColumns = ((settings.TileSheetWidth - 1) / settings.FrameWidth) + 1;
            tileSheetRows    = ((settings.TileSheetHeight - 1) / settings.FrameHeight) + 1;
            tileSheetCount   = settings.LastFrame;

            frameUpdateTimer = new GTimer(settings.FrameDelay, settings.FrameDelay, NextFrame);
        }