Items #3
13
.idea/.idea.S_Jump-and-grub/.idea/.gitignore
generated
vendored
Normal file
13
.idea/.idea.S_Jump-and-grub/.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Rider ignored files
|
||||||
|
/projectSettingsUpdater.xml
|
||||||
|
/contentModel.xml
|
||||||
|
/modules.xml
|
||||||
|
/.idea.S_Jump-and-grub.iml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
@ -12,9 +12,9 @@ namespace Controller
|
|||||||
hexGrid.OnHexPainted += DoSomething;
|
hexGrid.OnHexPainted += DoSomething;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DoSomething()
|
private void DoSomething(HexCoordinates coordinates)
|
||||||
{
|
{
|
||||||
Debug.Log("Painted!" );
|
Debug.Log("Painted! " + coordinates );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ namespace HexFiled
|
|||||||
private Canvas _gridCanvas;
|
private Canvas _gridCanvas;
|
||||||
private HexMesh _hexMesh;
|
private HexMesh _hexMesh;
|
||||||
private GameObject _baseGameObject;
|
private GameObject _baseGameObject;
|
||||||
public Action OnHexPainted;
|
public Action<HexCoordinates> OnHexPainted;
|
||||||
|
|
||||||
public HexGrid(FieldData fieldData)
|
public HexGrid(FieldData fieldData)
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ namespace HexFiled
|
|||||||
HexCell cell = _cells[index];
|
HexCell cell = _cells[index];
|
||||||
cell.color = _touchedColor;
|
cell.color = _touchedColor;
|
||||||
_hexMesh.Triangulate(_cells);
|
_hexMesh.Triangulate(_cells);
|
||||||
OnHexPainted.Invoke();
|
OnHexPainted.Invoke(coordinates);
|
||||||
}
|
}
|
||||||
void CreateCell (int x, int z, int i) {
|
void CreateCell (int x, int z, int i) {
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 198923afa36640e48b1ab9562775b526
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Loading…
x
Reference in New Issue
Block a user