public GreatCube(int levels, int squaresAcross, float squareWidth, Vector3 position) : base() { CubeSegment.LoadStaticContent(squaresAcross, squareWidth); cubeSegments = new CubeSegment[levels]; position3 = position; for (int i = 0; i < levels; i++) { cubeSegments[i] = new CubeSegment(new Vector3(position.X, position.Y - (i * squareWidth), position.Z), i%2 == 0); } }
/// <summary> /// When a Match Piece is created: /// - Randomly select an identity (texture) /// - Set its facing direction (front, side, back) /// - Set it's offset from the middle /// - Create a backsurface and front texture key /// </summary> public MatchPiece(CubeSegment segment, float XOffset, float size, int facingDirection, float ZOffset) : base(new Vector3(XOffset, 0.0f, ZOffset), size) { this.segment = segment; this.segmentIndex = facingDirection; position3 = new Vector3(XOffset, 0, 0); rotOffset = (float)(facingDirection * Math.PI / 2.0); playersSelecting = new bool[MAXPLAYERS]; noninteractedColor = inactiveColor[gameTheme]; isVirgin = true; }