示例#1
0
 public ZertzGameScene()
 {
     this.zcr = new ZertzCupRenderer(rc,0x100);
     this.game = new ZertzGame(out hls);
     this.game.RegisterActionHandler(this);
     this.boardR = new ZertzBoardRenderer(this.game.Board.Width,this.game.Board.Height);
     si = new StateIndicator(800,200,16.0f,this.game.Board.VisualRepresentation,this.game.Board.TextureBounds,this.game.Board.VisualFactor,new PointF[] {new PointF(1.0f/12.0f,0.5f),new PointF(2.0f/12.0f,0.33f),new PointF(2.0f/12.0f,0.67f),new PointF(3.0f/12.0f,0.33f),new PointF(3.0f/12.0f,0.67f),new PointF(4.0f/12.0f,0.5f),new PointF(5.0f/12.0f,0.5f)});
 }
示例#2
0
        public static ZertzRingRenderer[] GenerateRings(RenderContainer rc, ZertzBoardRenderer board, ZertzGame game, ZertzCupRenderer cup, HexLocation[] hls, int offsetid)
        {
            int n  = hls.Length;
            int id = offsetid;
            ZertzRingRenderer zrr;

            ZertzRingRenderer[] list = new ZertzRingRenderer[n];
            ZertzTileRenderer   ztr;
            float time = n * TIME_FACTOR + TIME_OFFSET;

            for (int i = 0x00; i < n; i++)
            {
                ztr = cup.MinimalTile;
                zrr = new ZertzRingRenderer(game, hls[i], ztr.NextVector, ztr.TileEscapeLocation, time);
                board.PutRing(zrr, hls[i]);
                ztr.Add(zrr);
                list[i] = zrr;
                rc.Add(id++, zrr);
                time -= TIME_FACTOR;
            }
            cup.ClearTiles();
            return(list);
        }
示例#3
0
 public static ZertzRingRenderer[] GenerateRings(RenderContainer rc, ZertzBoardRenderer board, ZertzGame game, ZertzCupRenderer cup, HexLocation[] hls, int offsetid)
 {
     int n = hls.Length;
     int id = offsetid;
     ZertzRingRenderer zrr;
     ZertzRingRenderer[] list = new ZertzRingRenderer[n];
     ZertzTileRenderer ztr;
     float time = n*TIME_FACTOR+TIME_OFFSET;
     for(int i = 0x00; i < n; i++) {
         ztr = cup.MinimalTile;
         zrr = new ZertzRingRenderer(game,hls[i],ztr.NextVector,ztr.TileEscapeLocation,time);
         board.PutRing(zrr,hls[i]);
         ztr.Add(zrr);
         list[i] = zrr;
         rc.Add(id++,zrr);
         time -= TIME_FACTOR;
     }
     cup.ClearTiles();
     return list;
 }