Exemple #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)});
 }
Exemple #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;
 }
Exemple #3
0
 public static ZertzBallRenderer[] GenerateBalls(ZertzBallContainer zbc, RenderContainer rc, ZertzCupRenderer zcr, int offsetid)
 {
     int id = offsetid;
     ZertzBallType zbt;
     ZertzBallRenderer zbr;
     ZertzBallRenderer[] list = new ZertzBallRenderer[zbc.Total];
     int j = 0x00;
     for(byte b = 0x00; b < 0x03; b++) {
         zbt = (ZertzBallType) b;
         for(int i = 0x00; i < zbc[zbt]; i++) {
             zbr = new ZertzBallRenderer(zbt);
             list[j++] = zbr;
             rc.Add(id++,zbr);
             zbr.RenderMover = RenderMoveManager.GenerateStaticMover(zcr.CommonContainer.Add(zbr));
         }
     }
     return list;
 }
Exemple #4
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);
        }
Exemple #5
0
        public static ZertzBallRenderer[] GenerateBalls(ZertzBallContainer zbc, RenderContainer rc, ZertzCupRenderer zcr, int offsetid)
        {
            int               id = offsetid;
            ZertzBallType     zbt;
            ZertzBallRenderer zbr;

            ZertzBallRenderer[] list = new ZertzBallRenderer[zbc.Total];
            int j = 0x00;

            for (byte b = 0x00; b < 0x03; b++)
            {
                zbt = (ZertzBallType)b;
                for (int i = 0x00; i < zbc[zbt]; i++)
                {
                    zbr       = new ZertzBallRenderer(zbt);
                    list[j++] = zbr;
                    rc.Add(id++, zbr);
                    zbr.RenderMover = RenderMoveManager.GenerateStaticMover(zcr.CommonContainer.Add(zbr));
                }
            }
            return(list);
        }