Skip to content
Snippets Groups Projects
Commit f91e4015 authored by Richard Marcus's avatar Richard Marcus
Browse files

ModeSelection UI

parent 93c04775
No related branches found
No related tags found
No related merge requests found
fileFormatVersion: 2
guid: eec83b50c1e0c604aa91430f72c8dbb0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -16,7 +16,7 @@ void Start()
Cam = Camera.main;
//Set MarkPointMode as the default ActiveToolMode
ActiveToolMode = ToolMode.ExtraMode;//ToolMode.MarkPointMode;
// ActiveToolMode = ToolMode.ExtraMode;//ToolMode.MarkPointMode;
CommunicationEvents.ToolModeChangedEvent.Invoke(ActiveToolMode);
}
......@@ -46,8 +46,7 @@ void Update()
transform.up = -Cam.transform.forward;
}
//Check if the ToolMode was switched
CheckToolModeSelection();
}
......@@ -66,23 +65,7 @@ void CheckMouseButtons(Ray ray)
//Checks if the ToolMode was switched by User, and handle it
void CheckToolModeSelection() {
if (Input.GetButtonDown("ToolMode")) {
ToolMode tempActiveToolMode = CommunicationEvents.ActiveToolMode;
//Change the ActiveToolMode dependent on which Mode was selected
if ((int)tempActiveToolMode == Enum.GetNames(typeof(ToolMode)).Length - 1)
{
tempActiveToolMode = 0;
}
else
{
tempActiveToolMode++;
}
//Invoke the Handler for the Facts
CommunicationEvents.ToolModeChangedEvent.Invoke(tempActiveToolMode);
}
}
......
fileFormatVersion: 2
guid: ac72be71662640f4ab0aaf102090fb95
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment