public void ResetVisability() { if (m_visibilityCount > 0) { m_visibilityCount = 0; HexCellDataShader.RefreshVisibility(this); } }
public void DecreaseVisibility() { m_visibilityCount--; if (m_visibilityCount == 0) { HexCellDataShader.RefreshVisibility(this); } }
public void IncreaseVisibility() { m_visibilityCount++; if (m_visibilityCount == 1) { IsExplored = true; HexCellDataShader.RefreshVisibility(this); } }
void Awake() { HexMetrics.NoiseSource = NoiseSource; HexMetrics.InitialiseHashGrid(Seed); HexUnit.UnitPrefab = HexUnitPrefab; m_hexCellShaderData = gameObject.AddComponent <HexCellDataShader>(); m_hexCellShaderData.HexGrid = this; CreateMap(CellCountX, CellCountZ, Wrap); }
public void Load(BinaryReader binReader) { m_terrainTypeIndex = binReader.ReadByte(); m_elevation = binReader.ReadByte(); IsExplored = binReader.ReadBoolean(); m_waterLevel = binReader.ReadByte(); m_urbanDensityLevel = binReader.ReadByte(); m_farmDensityLevel = binReader.ReadByte(); m_plantDensityLevel = binReader.ReadByte(); m_specialFeatureIndex = binReader.ReadByte(); m_walled = binReader.ReadBoolean(); m_hasIncomingRiver = binReader.ReadBoolean(); m_incomingRiverDirection = (HexDirection)binReader.ReadByte(); m_hasOutgoingRiver = binReader.ReadBoolean(); m_outgoingRiverDirection = (HexDirection)binReader.ReadByte(); for (int i = 0; i < m_roads.Length; ++i) { m_roads[i] = binReader.ReadBoolean(); } HexCellDataShader.RefreshTerrain(this); RefreshPosition(); }
public void SetMapData(float value) { HexCellDataShader.SetMapData(this, value); }