Example #1
0
        public void RemovePiece(HexLocation location)
        {
            ZertzRingRenderer zrr = this.boardR.RemoveRing(location);
            Vector3           via = this.zcr.MinimalTile.TileEscapeLocation;
            Vector3           des = this.zcr.MinimalTile.NextVector;

            this.zcr.MinimalTile.Add(zrr);
            zrr.RenderMover = RenderMoveManager.GenerateReverseHopMover(zrr.Location, via, 1.0f, RenderMoveManager.GenerateMoveMover(via, des, 2.0f, null));      //,RenderMoveManager.GenerateStaticMover(des)
        }
Example #2
0
        public void PutBall(ZertzBallContainerType containertype, ZertzBallType type, HexLocation location)
        {
            ZertzContainerRenderer zbcr = this.zcr[containertype];
            ZertzBallRenderer      zbr  = zbcr.GetBallOfType(type);

            zbcr.Remove(zbr);
            this.boardR.PutBall(zbr, location);
            zbr.RenderMover = RenderMoveManager.GenerateHopMover(zbr.Location, Maths.HexVector(location, 2.0f * ZertzRingRenderer.OUTER_RADIUS + ZertzRingRenderer.SPACING, 0.5f * ZertzRingRenderer.THICKNESS), 1.5f, null);
        }
Example #3
0
        public void PerformHop(HexLocation fr, HexLocation to)
        {
            ZertzBallRenderer ball = this.boardR.RemoveBall(fr);

            this.boardR.PutBall(ball, to);
            Vector3 la = ball.Location;
            Vector3 lc = Maths.HexVector(to, 2.0f * ZertzRingRenderer.OUTER_RADIUS + ZertzRingRenderer.SPACING, 0.5f * ZertzRingRenderer.THICKNESS);
            Vector3 lb = 0.5f * (la + lc);

            lb.Y            += 0.5f;
            ball.RenderMover = RenderMoveManager.GenerateHopMover(la, lb, lc, 0.5f, null);
        }