/// <summary> /// 不显示所有的格子 /// </summary> public void ClearAllHexagon() { EnumShowHexagonType showType = EnumShowHexagonType.eShowHexagonType_CastRange; for (; showType < EnumShowHexagonType.eShowHexagonType_Max; showType++) { this.ClearHexagon(showType); } }
/// <summary> /// 显示不同类型的格子(包括建筑) /// </summary> /// <param name="eShowHexagonType"></param> /// <param name="listHex"></param> public void ShowHexagon(EnumShowHexagonType eShowHexagonType, List <CVector3> listHex) { string strTexture = ""; if (EnumShowHexagonType.eShowHexagonType_Highlight == eShowHexagonType) { strTexture = "Texture/Hexagon/Highlight"; } this.ShowHexagon(eShowHexagonType, listHex, strTexture); }
/// <summary> /// 不显示格子建筑高亮 /// </summary> /// <param name="eShowHexagonType"></param> public void ClearHexagon(EnumShowHexagonType eShowHexagonType) { if (eShowHexagonType == EnumShowHexagonType.eShowHexagonType_Highlight) { for (int i = 0; i < this.m_listMapNodeBuilding.Count; i++) { MapNodeBuilding mapNodeBuilding = this.m_listMapNodeBuilding[i]; mapNodeBuilding.IsHighlight = false; } } }
public void ShowHexagon(EnumShowHexagonType eShowHexagonType, List <CVector3> listHex, string strTexture) { switch (eShowHexagonType) { case EnumShowHexagonType.eShowHexagonType_CastRange: if (null != this.m_castRangeHexagonDrawCall) { this.m_castRangeHexagonDrawCall.SetHexagons(listHex, strTexture); } break; case EnumShowHexagonType.eShowHexagonType_Highlight: if (null != this.m_highlightHexagonDrawCall) { this.m_highlightHexagonDrawCall.SetHexagons(listHex, strTexture); } if (null != listHex) { this.m_listHexagonEnabled = listHex; } else { this.m_listHexagonEnabled.Clear(); } break; case EnumShowHexagonType.eShowHexagonType_Affect: if (null != this.m_affectHexagonDrawCall) { this.m_affectHexagonDrawCall.SetHexagons(listHex, strTexture); } break; case EnumShowHexagonType.eShowHexagonType_Selected: if (null != this.m_selectHexagonDrawCall) { this.m_selectHexagonDrawCall.SetHexagons(listHex, strTexture); } break; case EnumShowHexagonType.eShowHexagonType_Hover: this.ShowHoverHexagons(listHex); break; case EnumShowHexagonType.eShowHexagonType_Path: if (null != this.m_pathHexagonDrawCall) { this.m_pathHexagonDrawCall.SetHexagons(listHex, strTexture); } break; } CSceneMgr.singleton.ShowHexagon(eShowHexagonType, listHex); }
/// <summary> /// 显示格子建筑是否高亮 /// </summary> /// <param name="eShowHexagonType"></param> /// <param name="listHex"></param> public void ShowHexagon(EnumShowHexagonType eShowHexagonType, List <CVector3> listHex) { if (eShowHexagonType == EnumShowHexagonType.eShowHexagonType_Highlight) { for (int i = 0; i < this.m_listMapNodeBuilding.Count; i++) { MapNodeBuilding mapNodeBuild = this.m_listMapNodeBuilding[i]; if (listHex != null && listHex.Exists((CVector3 p) => p.Equals(mapNodeBuild.HexPos))) { mapNodeBuild.IsHighlight = true; } else { mapNodeBuild.IsHighlight = false; } } } }
/// <summary> /// 不显示该类型的格子(包括建筑) /// </summary> /// <param name="eShowHexagonType"></param> public void ClearHexagon(EnumShowHexagonType eShowHexagonType) { switch (eShowHexagonType) { case EnumShowHexagonType.eShowHexagonType_CastRange: if (null != this.m_castRangeHexagonDrawCall) { this.m_castRangeHexagonDrawCall.ClearHexagons(); } break; case EnumShowHexagonType.eShowHexagonType_Highlight: if (null != this.m_highlightHexagonDrawCall) { this.m_highlightHexagonDrawCall.ClearHexagons(); } this.m_listHexagonEnabled.Clear(); break; case EnumShowHexagonType.eShowHexagonType_Affect: if (null != this.m_affectHexagonDrawCall) { this.m_affectHexagonDrawCall.ClearHexagons(); } break; case EnumShowHexagonType.eShowHexagonType_Selected: if (null != this.m_selectHexagonDrawCall) { this.m_selectHexagonDrawCall.ClearHexagons(); } break; case EnumShowHexagonType.eShowHexagonType_Path: if (null != this.m_pathHexagonDrawCall) { this.m_pathHexagonDrawCall.ClearHexagons(); } break; } CSceneMgr.singleton.ClearHexagon(eShowHexagonType); }
/// <summary> /// 显示不同类型的格子(包括建筑) /// </summary> /// <param name="eShowHexagonType"></param> /// <param name="listHex"></param> public void ShowHexagon(EnumShowHexagonType eShowHexagonType, List <CVector3> listHex) { string strTexture = "Texture/Hexagon/Hexagon.png"; switch (eShowHexagonType) { case EnumShowHexagonType.eShowHexagonType_Highlight: strTexture = "Texture/Hexagon/Highlight.png"; break; case EnumShowHexagonType.eShowHexagonType_Affect: strTexture = "Texture/Hexagon/Affect.png"; break; case EnumShowHexagonType.eShowHexagonType_CastRange: strTexture = "Texture/Hexagon/CastRange.png"; break; case EnumShowHexagonType.eShowHexagonType_Path: strTexture = "Texture/Hexagon/MovingPath.png"; break; } this.ShowHexagon(eShowHexagonType, listHex, strTexture); }