public ZertzBallRenderer RemoveBall(HexLocation loc) { ZertzBallRenderer zbr = balls[loc.X, loc.Y]; balllocs.Remove(zbr); balls[loc.X, loc.Y] = null; return(zbr); }
public Vector3 Add(ZertzBallRenderer zbr) { lock(this.balls) { Vector3 v = GetNextPosition(zbr.Type); switch(zbr.Type) { case ZertzBallType.Black : this.black++; break; case ZertzBallType.Gray : this.gray++; break; case ZertzBallType.White : this.white++; break; } this.balls.Add(zbr); return v; } }
public void Remove(ZertzBallRenderer zbr) { lock (this.balls) { zbr.Container = ZertzBallContainerType.None; switch (zbr.Type) { case ZertzBallType.Black: this.black--; break; case ZertzBallType.Gray: this.gray--; break; case ZertzBallType.White: this.white--; break; } this.balls.Remove(zbr); } }
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); }
public Vector3 Add(ZertzBallRenderer zbr) { lock (this.balls) { Vector3 v = GetNextPosition(zbr.Type); switch (zbr.Type) { case ZertzBallType.Black: this.black++; break; case ZertzBallType.Gray: this.gray++; break; case ZertzBallType.White: this.white++; break; } this.balls.Add(zbr); return(v); } }
public void Remove(ZertzBallRenderer zbr) { lock(this.balls) { zbr.Container = ZertzBallContainerType.None; switch(zbr.Type) { case ZertzBallType.Black : this.black--; break; case ZertzBallType.Gray : this.gray--; break; case ZertzBallType.White : this.white--; break; } this.balls.Remove(zbr); } }
public void PutBall(ZertzBallRenderer ball, HexLocation loc) { balllocs.Add(ball,loc); balls[loc.X,loc.Y] = ball; }
public void PutBall(ZertzBallRenderer ball, HexLocation loc) { balllocs.Add(ball, loc); balls[loc.X, loc.Y] = ball; }
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; }