public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed && state != manipState.grabbed) { transform.parent.parent = masterObj; } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } if (curState == manipState.selected) { highlight.SetActive(true); highlightMat.SetFloat("_EmissionGain", .55f); } if (curState == manipState.grabbed) { highlight.SetActive(true); transform.parent.parent = manipulatorObj.parent; highlightMat.SetFloat("_EmissionGain", .75f); } }
public override void setState(manipState state) { if (curState == state) { return; } if (previewing) { if (previewWhenGrabbed) { if (state == manipState.none) { preview(false); } } else if (curState == manipState.selected) { preview(false); } } if (curState == manipState.grabbed && state != manipState.grabbed) { flashEmptySamplers(false); Release(); } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } if (curState == manipState.selected) { highlight.SetActive(true); highlightMat.SetFloat("_EmissionGain", .3f); if (deck == null) { preview(true); } } if (curState == manipState.grabbed) { if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } highlight.SetActive(true); flashEmptySamplers(true); highlightMat.SetFloat("_EmissionGain", .5f); if (insertCoroutine != null) { StopCoroutine(insertCoroutine); } transform.parent = manipulatorObj.parent; } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { if (!invisibleMesh) { rend.material = offMat; } else { rend.enabled = false; } } else if (curState == manipState.selected) { rend.material = glowMat; glowMat.SetFloat("_EmissionGain", .4f); if (invisibleMesh) { rend.enabled = true; } } else if (curState == manipState.grabbed) { rend.material = glowMat; glowMat.SetFloat("_EmissionGain", .6f); offset = transform.localPosition.x - transform.parent.InverseTransformPoint(manipulatorObj.position).x; if (invisibleMesh) { rend.enabled = true; } } }
public override void setState(manipState state) { curState = state; if (disabled) { return; } if (curState == manipState.none) { label.gameObject.SetActive(false); symbol.gameObject.SetActive(false); } else if (curState == manipState.selected) { symbol.material.SetColor("_TintColor", normalColor); labelMat.SetColor("_TintColor", normalColor); label.gameObject.SetActive(true); symbol.gameObject.SetActive(true); manager.SelectAudio(); } else if (curState == manipState.grabbed) { symbol.material.SetColor("_TintColor", Color.white); label.gameObject.SetActive(true); symbol.gameObject.SetActive(true); labelMat.SetColor("_TintColor", Color.white); manager.GrabAudio(); StartCoroutine(flash()); createItem(); } }
public override void setState(manipState state) { if (curState == manipState.selected && curState != state) { selectEvent(false); } else if (curState == manipState.grabbed && curState != state) { grabEvent(false); } curState = state; if (curState == manipState.none) { if (!toggled) { setTextState(false); } } else if (curState == manipState.selected) { selectEvent(true); setTextState(true); } else if (curState == manipState.grabbed) { setTextState(true); keyHit(true); grabEvent(true); } }
public override void setState(manipState state) { if (!sticky) { return; } bool lateHitCheck = false; if (curState == manipState.grabbed && state != manipState.grabbed) { lateHitCheck = true; } curState = state; if (curState == manipState.grabbed) { toggled = !toggled; keyHitCheck(); } else if (lateHitCheck) { keyHitCheck(); } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed) { transform.parent = masterObj; _deviceInterface.updateResolution(transform.localScale.x > 2); } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } if (curState == manipState.selected) { highlight.SetActive(true); highlightMat.SetFloat("_EmissionGain", .35f); } if (curState == manipState.grabbed) { highlight.SetActive(true); highlightMat.SetFloat("_EmissionGain", .45f); } if (curState == manipState.grabbed) { transform.parent = manipulatorObj.parent; } }
public override void setState(manipState state) { manipState prevState = curState; curState = state; if (curState == manipState.none) { Display.localScale = Vector3.one; } else if (curState == manipState.selected) { if (prevState != manipState.grabbed) { if (spinRoutine != null) { StopCoroutine(spinRoutine); } spinRoutine = StartCoroutine(spinAnim()); } Display.localScale = Vector3.one * 1.1f; } else if (curState == manipState.grabbed) { confirmSelection(); } }
public override void setState(manipState state) { if (curState == manipState.grabbed && curState != state) { keyHit(false); } curState = state; if (curState == manipState.none) { if (!toggled) { textMat.SetColor("_TintColor", offColor); } } else if (curState == manipState.selected) { textMat.SetColor("_TintColor", onColor); } else if (curState == manipState.grabbed) { textMat.SetColor("_TintColor", onColor); keyHit(true); } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed && state != manipState.grabbed) { _interface.updateTurntableGrab(false); } curState = state; if (curState == manipState.none) { mat.SetFloat("_EmissionGain", .4f); } if (curState == manipState.selected) { mat.SetFloat("_EmissionGain", .5f); } if (curState == manipState.grabbed) { _interface.updateTurntableGrab(true); mat.SetFloat("_EmissionGain", .6f); startRot = transform.localRotation; startPos = masterObj.InverseTransformPoint(manipulatorObj.position); startPos.y = 0; lastAngle = Mathf.Atan2(startPos.x, startPos.z) * Mathf.Rad2Deg; } }
public override void setState(manipState state) { if (curState == state) { return; } curState = state; if (curState == manipState.none) { mat.SetColor("_TintColor", normalColor); } else if (curState == manipState.selected) { mat.SetColor("_TintColor", selectColor); manager.SelectAudio(); } else if (curState == manipState.grabbed) { mat.SetColor("_TintColor", grabColor); menu.toggleMenu(); manager.GrabAudio(); } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed) { transform.parent = masterObj; glowTrans.gameObject.SetActive(false); returnRoutineID = StartCoroutine(returnRoutine()); if (_interface != null) { _interface.onGrab(false, -1); } } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } else if (curState == manipState.selected) { highlight.SetActive(true); } else if (curState == manipState.grabbed) { if (_interface != null) { _interface.onGrab(true, -1); } if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } highlight.SetActive(false); glowTrans.gameObject.SetActive(true); transform.parent = manipulatorObj.parent; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; if (manipulatorObjScript != null) { manipulatorObjScript.setVerticalPosition(transform); } pads.Clear(); lastStickPos.Clear(); pads = FindObjectsOfType <drumpad>().ToList(); for (int i = 0; i < pads.Count; i++) { lastStickPos.Add(pads[i].transform.parent.InverseTransformPoint(sticktip.position)); } } }
public override void setState(manipState state) { if (curState == manipState.grabbed && state != curState) { if (!isToggle) { keyHit(false); } if (!glowMatOnToggle) { rend.material = offMat; } } curState = state; if (curState == manipState.none) { if (!singleID) { _componentInterface.onSelect(false, button2DID[0], button2DID[1]); } selectOverlay.SetActive(false); } else if (curState == manipState.selected) { if (!singleID) { _componentInterface.onSelect(true, button2DID[0], button2DID[1]); } selectOverlay.SetActive(true); } else if (curState == manipState.grabbed) { if (!singleID) { _componentInterface.onSelect(true, button2DID[0], button2DID[1]); } if (isToggle) { toggled = !toggled; if (toggled) { keyHit(true); } else if (!onlyOn) { keyHit(false); } } else { keyHit(true); } if (!glowMatOnToggle) { rend.material = glowMat; } } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed && state != manipState.grabbed) { transform.parent = masterObj; glowTrans.gameObject.SetActive(false); if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } returnRoutineID = StartCoroutine(returnRoutine()); } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } if (curState == manipState.selected) { highlight.SetActive(true); } if (curState == manipState.grabbed) { if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } highlight.SetActive(false); glowTrans.gameObject.SetActive(true); transform.parent = manipulatorObj.parent; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; if (manipulatorObjScript != null) { manipulatorObjScript.setVerticalPosition(transform); } transform.Translate(0, 0, -.035f, Space.Self); transform.Rotate(90, 0, 0, Space.Self); } }
public override void setState(manipState state) { if (curState == manipState.grabbed && state != manipState.grabbed) { if (_componentInterface != null) { _componentInterface.hit(false, buttonID); } } curState = state; if (curState == manipState.none) { mat.SetColor("_TintColor", normalColor); mat.SetFloat("_EmissionGain", .3f); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .3f); } } else if (curState == manipState.selected) { mat.SetColor("_TintColor", normalColor); mat.SetFloat("_EmissionGain", .6f); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .3f); } } else if (curState == manipState.grabbed) { mat.SetColor("_TintColor", Color.white); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .6f); } if (_componentInterface != null) { _componentInterface.hit(true, buttonID); } } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.grabbed && state != manipState.grabbed) { setTouch(false); transform.parent = masterObj; if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } returnRoutineID = StartCoroutine(returnRoutine()); } curState = state; if (curState == manipState.none) { highlight.SetActive(false); } if (curState == manipState.selected) { highlight.SetActive(true); } if (curState == manipState.grabbed) { if (returnRoutineID != null) { StopCoroutine(returnRoutineID); } manipulatorObjScript.toggleController(false); highlight.SetActive(false); transform.parent = manipulatorObj.parent; transform.localPosition = Vector3.zero; transform.localRotation = Quaternion.identity; if (manipulatorObjScript != null) { manipulatorObjScript.setVerticalPosition(transform); } transform.Rotate(45, 0, 0, Space.Self); } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { mat.SetColor("_TintColor", Color.black); } else if (curState == manipState.selected) { mat.SetColor("_TintColor", customColor * 0.5f); } else if (curState == manipState.grabbed) { mat.SetColor("_TintColor", customColor); offset = transform.InverseTransformPoint(manipulatorObj.position).z; } }
public override void setState(manipState state) { if (curState == state) { return; } if (curState == manipState.selected) { mouseoverFeedback.SetActive(false); } if (curState == manipState.grabbed) { Release(); } curState = state; if (curState == manipState.none) { updateForceWireShow(false); } if (curState == manipState.selected) { updateForceWireShow(true); mouseoverFeedback.SetActive(true); } if (curState == manipState.grabbed) { updateForceWireShow(true); collCandidates.Clear(); if (connected != null) { collCandidates.Add(connected.transform); } transform.parent = manipulatorObj; updateJackList(); foreach (omniJack j in targetJackList) { j.flash(cordColor); } } }
public override void setState(manipState state) { if (curState == manipState.grabbed && state != manipState.grabbed) { for (int i = 0; i < selectedEvents.Count; i++) { if (selectedEvents[i] != null) { selectedEvents[i].overlapCheck(); } } updateViz(); if (!rend.enabled) { Close(); } } curState = state; if (curState == manipState.none) { mats[0].SetColor("_TintColor", Color.blue); } else if (curState == manipState.selected) { mats[0].SetColor("_TintColor", Color.white); } else if (curState == manipState.grabbed) { mats[0].SetColor("_TintColor", Color.red); manipOffset = _interface.worldPosToGridPos(manipulatorObj.position, false, false); startPosition = transform.localPosition; for (int i = 0; i < selectedEvents.Count; i++) { if (selectedEvents[i] != null) { selectedEvents[i].multiselect_io = selectedEvents[i].in_out; selectedEvents[i].multiselect_track = selectedEvents[i].track; } } } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { mat.SetColor("_EmissionColor", customColor * 0.25f); } else if (curState == manipState.selected) { mat.SetColor("_EmissionColor", customColor * 0.5f); } else if (curState == manipState.grabbed) { mat.SetColor("_EmissionColor", customColor); offset.x = transform.localPosition.x - transform.parent.InverseTransformPoint(manipulatorObj.position).x; offset.y = transform.localPosition.y - transform.parent.InverseTransformPoint(manipulatorObj.position).y; } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { rend.material = offMat; } else if (curState == manipState.selected) { rend.material = glowMat; glowMat.SetFloat("_EmissionGain", .5f); } else if (curState == manipState.grabbed) { rend.material = glowMat; glowMat.SetFloat("_EmissionGain", .7f); offset = transform.localPosition.x - transform.parent.InverseTransformPoint(manipulatorObj.position).x; } }
public override void setState(manipState state) { curState = state; setGlowState(state); if (curState == manipState.grabbed) { turnCount = 0; if (!masterControl.instance.dialUsed) { if (_dialCheckRoutine != null) { StopCoroutine(_dialCheckRoutine); } _dialCheckRoutine = StartCoroutine(dialCheckRoutine()); } Vector2 temp = dialCoordinates(manipulatorObj.right); deltaRot = Vector2.Angle(temp, Vector2.up) * Mathf.Sign(temp.x) - curRot; } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { setVizState(toggled ? vizstate.on : vizstate.off); } else if (curState == manipState.selected) { setVizState(toggled ? vizstate.selected_on : vizstate.selected_off); } else if (curState == manipState.grabbed) { setVizState(toggled ? vizstate.grab_on : vizstate.grab_off); startWidth = width; startX = transform.localPosition.x; offset = transform.parent.InverseTransformPoint(manipulatorObj.position).x; } }
void setGlowState(manipState s) { Color c = customColor; switch (s) { case manipState.none: littleDisk.SetActive(false); for (int i = 0; i < mats.Length; i++) { mats[i].SetFloat("_EmissionGain", .1f); mats[i].SetColor("_TintColor", c); } break; case manipState.selected: littleDisk.SetActive(true); for (int i = 0; i < mats.Length; i++) { mats[i].SetFloat("_EmissionGain", .3f); mats[i].SetColor("_TintColor", c); } break; case manipState.grabbed: littleDisk.SetActive(true); for (int i = 0; i < mats.Length; i++) { mats[i].SetFloat("_EmissionGain", .25f); mats[i].SetColor("_TintColor", masterControl.instance.tipColor); } break; default: break; } }
public override void setState(manipState state) { if (curState == state) { return; } curState = state; if (curState == manipState.none) { colorChange(false); } if (curState == manipState.selected) { colorChange(true); } if (curState == manipState.grabbed) { colorChange(true); } }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { mat.SetColor("_TintColor", normalColor); mat.SetFloat("_EmissionGain", .3f); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .3f); } } else if (curState == manipState.selected) { mat.SetColor("_TintColor", normalColor); mat.SetFloat("_EmissionGain", .6f); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .3f); } } else if (curState == manipState.grabbed) { mat.SetColor("_TintColor", Color.white); if (textMat != null) { textMat.SetColor("_TintColor", normalColor); textMat.SetFloat("_EmissionGain", .6f); } mainmenu.itemSelect(itemType, ID); } }
public override void setState(manipState state) { if (curState == state) { return; } curState = state; if (curState == manipState.none) { mat.SetColor("_TintColor", normalColor); } else if (curState == manipState.selected) { mat.SetColor("_TintColor", selectColor); } else if (curState == manipState.grabbed) { mat.SetColor("_TintColor", grabColor); ToggleVideo(!tipOn); } }
public override void setState(manipState state) { if (curState == state) { return; } curState = state; if (curState == manipState.none) { if (_interface.playing) { controlQuad.SetActive(false); } controlRends[0].material.SetFloat("_EmissionGain", _interface.playing ? 0f : .3f); for (int i = 1; i < controlRends.Length; i++) { controlRends[i].material.SetFloat("_EmissionGain", .3f); } } if (curState == manipState.selected) { controlQuad.SetActive(true); for (int i = 0; i < controlRends.Length; i++) { controlRends[i].material.SetFloat("_EmissionGain", .45f); } } if (curState == manipState.grabbed) { controlQuad.SetActive(true); triggerEvent(); } updateControlQuad(); }
public override void setState(manipState state) { curState = state; if (curState == manipState.none) { posIndicator.SetActive(false); } else if (curState == manipState.selected) { posIndicator.SetActive(true); if (selectObj != null) { updatePosIndicator(selectObj.position); } } else if (curState == manipState.grabbed) { posIndicator.SetActive(true); if (manipulatorObj != null) { updatePosIndicator(manipulatorObj.position); } } }
public override void setState(manipState state) { if (curState == manipState.grabbed && state != curState) { } curState = state; if (curState == manipState.none) { mod = 0; transform.localScale = Vector3.one * .005f; } else if (curState == manipState.selected) { mod = 0; transform.localScale = Vector3.one * .007f; } else if (curState == manipState.grabbed) { startRot = transform.parent.localRotation; startPos = masterObj.InverseTransformPoint(manipulatorObj.position); startPos.x = 0; mod = .5f; } }