public ZertzContainerRenderer(ZertzBallContainerType type, float row, float offset, float ballHeight) { this.type = type; this.row = row; this.offset = offset; this.ballHeight = ballHeight; }
private void perform_CaptureBall(HexLocation loc, ZertzBallContainerType zbct) { lock(this.handlers) { foreach(IZertzActionHandler izah in this.handlers) { izah.CaptureBall(loc,zbct); } } }
private void perform_PutBall(ZertzBallContainerType containertype, ZertzBallType type, HexLocation location) { lock (this.handlers) { foreach (IZertzActionHandler izah in this.handlers) { izah.PutBall(containertype, type, location); } } }
private void perform_CaptureBall(HexLocation loc, ZertzBallContainerType zbct) { lock (this.handlers) { foreach (IZertzActionHandler izah in this.handlers) { izah.CaptureBall(loc, zbct); } } }
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); }
public ZertzContainerRenderer this [ZertzBallContainerType type] { get { switch (type) { case ZertzBallContainerType.Common: return(this.zcrc); case ZertzBallContainerType.Player1: return(this.zcrpa); case ZertzBallContainerType.Player2: return(this.zcrpb); default: return(null); } } }
public override ZertzMoveState TakeBall(ZertzBallType ball) { //GUARD if (this.Board.CanHop()) { throw new InvalidZertzActionException("Unable to do this action: capture move possible!"); } if (!this.Game.PlayerPoolsContains(ball)) { throw new InvalidZertzActionException("Unable to do this action: player doesn't have this type of ball available!"); } if (!this.Board.HasVacant()) { throw new InvalidZertzActionException("Unable to do this action: no vacant piece available!"); } ZertzBallContainerType source = this.Game.SourceType; //ACTIONS this.Game.DecreasePlayerPool(ball); //EVENTS this.Creator.perform_ChangeState(0x01); //NEXT_STATE return(new PlacRem1ZertzMoveState(this.Creator, ball, source)); }
public PlacRem1ZertzMoveState(ZertzMoveCreator creator, ZertzBallType ball, ZertzBallContainerType source) : base(creator) { this.ball = ball; this.source = source; }
private void perform_PutBall(ZertzBallContainerType containertype, ZertzBallType type, HexLocation location) { lock(this.handlers) { foreach(IZertzActionHandler izah in this.handlers) { izah.PutBall(containertype,type,location); } } }
public ZertzContainerRenderer this[ZertzBallContainerType type] { get { switch(type) { case ZertzBallContainerType.Common: return this.zcrc; case ZertzBallContainerType.Player1: return this.zcrpa; case ZertzBallContainerType.Player2: return this.zcrpb; default : return null; } } }
public void CaptureBall(HexLocation location, ZertzBallContainerType type) { }
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); }