public void attackCell(Cell attackedCell) { beads = attackedCell.getBeads(); height = attackedCell.getHeight(); player = attackedCell.getPlayer(); type = attackedCell.getBeadType(); }
public BeadsValue(byte[] array, BeadType type, int cursor, ulong size = 0, ulong count = 0) { this.array = array; this.Type = type; this.cursor = cursor; this.size = size; this.count = count; }
public void reverseLastData(float heightOffset) { CellData data = oldDatas[oldDatas.Count - 1]; oldDatas.Remove(data); this.height = data.height; this.type = data.type; this.player = data.player; if (this.getBeads() != null) { foreach (GameObject bead in this.getBeads()) { Object.Destroy(bead); } } this.beads = new List <GameObject>(); GameObject beadPrefab = null; if (this.player == Player.Black) { if (this.type == BeadType.Totts) { beadPrefab = gameManager.blackTotts; } else if (this.type == BeadType.Tzarras) { beadPrefab = gameManager.blackTzarras; } else if (this.type == BeadType.Tzaars) { beadPrefab = gameManager.blackTzaars; } } else { if (this.type == BeadType.Totts) { beadPrefab = gameManager.whiteTotts; } else if (this.type == BeadType.Tzarras) { beadPrefab = gameManager.whiteTzarras; } else if (this.type == BeadType.Tzaars) { beadPrefab = gameManager.whiteTzaars; } } float currentY = 0.018f; for (int i = 0; i < this.height; i++) { GameObject instant = Object.Instantiate(beadPrefab, new Vector3(this.position.x, currentY, this.position.z), beadPrefab.transform.rotation); this.beads.Add(instant); currentY += heightOffset; } }
public void reinforceCell(Cell addCell) { foreach (GameObject bead in addCell.getBeads()) { beads.Add(bead); } height += addCell.getHeight(); type = addCell.getBeadType(); }
public void setBeadTypeByName(GameObject bead) { if (bead.gameObject.name.Contains("Tzaars")) { type = BeadType.Tzaars; } else if (bead.gameObject.name.Contains("Tzarras")) { type = BeadType.Tzarras; } else { type = BeadType.Totts; } }
private void AddTag(BeadType type) { if (elementCount % 2 == 0) { flagIndex = cursor; buffer[flagIndex] = (byte)type; cursor++; } else { buffer[flagIndex] = (byte)(buffer[flagIndex] | ((byte)type) << 4); } elementCount++; }