public void OnHexMouseEnter(MEHexEntry hexEntered) { if (Input.GetMouseButton(0)) { meController.TerrainExtend(hexEntered); } }
//Cycle terrain values public void TerrainCycle(MEHexEntry hex) { int i = (int)hex.Terrain; i++; if (i > MEConfig.maxTerrainValue) { i = 0; } hex.Terrain = (Deft.Terrain)i; }
public void UnitCycle(MEHexEntry hex) { if (hex.Occupant == null) { hex.Occupant = Instantiate(unit, HexVectorUtil.worldPositionOfHexCoord(hex.BoardPos), Quaternion.identity).GetComponent <MEUnitManager>(); hex.Occupant.Player = 1; hex.Occupant.myHex = hex; } else if (hex.Occupant.Player == 1) { hex.Occupant.Player = 2; } else if (hex.Occupant.Player == 2) { Destroy(hex.Occupant.gameObject); hex.Occupant = null; } }
public void DeleteHex(MEHexEntry hex) { Destroy(hex.HexManager.gameObject); HexGrid.Remove(hex.BoardPos); }
public void TerrainExtend(MEHexEntry hex) { hex.Terrain = extensionTerrainType; }
public void SetExtensionTerrain(MEHexEntry hex) { extensionTerrainType = hex.Terrain; }
public void OnUnitDown(MEHexEntry unitDown) { meController.UnitCycle(unitDown); }
public void OnHexDown(MEHexEntry hexDown) { meController.SetExtensionTerrain(hexDown); }
public void OnHexClick(MEHexEntry hexClicked) { meController.TerrainCycle(hexClicked); }
public void OnHexMouseFour(MEHexEntry hexClicked) { meController.DeleteHex(hexClicked); }