void Start() { KeysMan.AddKeyEvent(KeyCode.Escape, Application.Quit); KeysMan.AddKeyEvent(KeyCode.F1, ToggleShowInfo); KeysMan.AddKeyEvent(KeyCode.F2, ToggleGravity); KeysMan.AddKeyEvent(KeyCode.F3, ToggleCrawl); KeysMan.AddKeyEvent(KeyCode.F4, ToggleNeuron); KeysMan.AddKeyEvent(KeyCode.Mouse0, checkCollision); UIMan.Inst.SetText(0, null, "Show/Hide Infomation (F1)"); Init(); }
void Start() { // notice: camera control keys, please see the CameraCtrl.cs:Update KeysMan.AddKeyEvent(KeyCode.Escape, Application.Quit); KeysMan.AddKeyEvent(KeyCode.F, ToggleNeuronActive); KeysMan.AddKeyEvent(KeyCode.F1, ToggleShowInfo); KeysMan.AddKeyEvent(KeyCode.F2, ToggleGravity); KeysMan.AddKeyEvent(KeyCode.F3, ToggleMuscle); KeysMan.AddKeyEvent(KeyCode.F4, ToggleNeuron); KeysMan.AddKeyEvent(KeyCode.Mouse0, checkCollision); // use to select neurons. UIMan.Inst.SetText(0, null, "Show/Hide Infomation (F1)"); Init(); }