public void controlerUpdate(ControllerBehavior controller) { if (controller.confirmAnswer()) { StudyPlot.Instance.answer(optionSelected); } if (controller.isSelectingLeft()) { if (optionSelected != BarOption.Bar1) { selectOption(BarOption.Bar1); _audioSource.PlayOneShot(_tapSound); } else { controller.triggerHapticPulse(2); _audioSource.PlayOneShot(_denySound); } } if (controller.isSelectingRight()) { if (optionSelected != BarOption.Bar2) { selectOption(BarOption.Bar2); _audioSource.PlayOneShot(_tapSound); } else { controller.triggerHapticPulse(2); _audioSource.PlayOneShot(_denySound); } } }
// Update is called once per frame void Update() { if (life == 1 && flyUp == true) { if (t < 3) { t++; } else { t = 0; Instantiate(smoke, new Vector3(transform.position.x - 1.0f, transform.position.y, 0.0f), Quaternion.identity); } } else if (life == 1 && flyUp == false) { if (t < 10) { t++; } else { t = 0; Instantiate(smoke, new Vector3(transform.position.x - 1.0f, transform.position.y, 0.0f), Quaternion.identity); } } else if (life == 2) { if (t < 35) { t++; } else { t = 0; Instantiate(missileSmoke, new Vector3(transform.position.x - 1.0f, transform.position.y, 0.0f), Quaternion.identity); } if (Input.GetMouseButtonDown(0)) { life = 1; } } else if (life == 0) { if (first) { ControllerBehavior.SaveScores(); RunFire(); first = false; } } if (fireMissile && life == 1) { Instantiate(missile, new Vector3(transform.position.x, transform.position.y, 0.0f), Quaternion.identity); fireMissile = false; } }
public IcelandAuthController(Umbraco.Core.Logging.ILogger logger) { Log = logger; var log = new UmbracoLogger(Log, typeof(IcelandAuthService)); var icelandAuthService = new IcelandAuthService(log); AuthHandler = new ControllerBehavior(icelandAuthService); }
public IcelandAuthController() { Log = LogManager.GetLogger(typeof(IcelandAuthService)); var log = new Log4NetLogger(Log); var icelandAuthService = new IcelandAuthService(log); AuthHandler = new ControllerBehavior(icelandAuthService); }
public void controlerUpdate(ControllerBehavior controller) { if (controller.confirmAnswer()) { StudyPlot.Instance.answer(answerValue); resetState(); } if (controller.isIncreasingValueFaster() || controller.isIncreasingValue()) { if (answerValue < 100) { answerValue += 1; _audioSource.PlayOneShot(_tapSound); } else { controller.triggerHapticPulse(2); _audioSource.PlayOneShot(_denySound); } _changedLastTime = 1; } if (controller.isDecreasingValueFaster() || controller.isDecreasingValue()) { if (answerValue > 0) { answerValue -= 1; _audioSource.PlayOneShot(_tapSound); } else { controller.triggerHapticPulse(2); _audioSource.PlayOneShot(_denySound); } _changedLastTime = -1; } if (_changedLastTime != 0) { if (_changedLastTime > 0) { _upTextMesh.color = _activeTextColor; } else { _downTextMesh.color = _activeTextColor; } _changedLastTime = 0; } else { _upTextMesh.color = _defaultTextColor; _downTextMesh.color = _defaultTextColor; } }
// Use this for initialization void Start() { Instance = this; }
public void controlerUpdate(ControllerBehavior controller) { bool changed = false; if (controller.isIncreasingAngle()) { Debug.Log("Increase Angle"); if (_miterAngle < 90) { _miterAngle += 1; changed = true; } else { controller.triggerHapticPulse(2); } } if (controller.isDecreasingAngle()) { Debug.Log("Decrease Angle"); if (_miterAngle > 0) { _miterAngle -= 1; changed = true; } else { controller.triggerHapticPulse(2); } } //if (controller.isIncreasingHeight()) //{ // Debug.Log("Increase Height"); // _cameraBehavior._coneHeight += 0.01f; //} //if (controller.isDecreasingHeight()) //{ // Debug.Log("Decrease Height"); // _cameraBehavior._coneHeight -= 0.01f; //} if (controller.isIncreasingInnerCirle()) { Debug.Log("Increase Inner Circle"); if (_lowerFaceHeight < 1) { _lowerFaceHeight += 0.02f; changed = true; } else { controller.triggerHapticPulse(2); } } if (controller.isDecreasingInnerCircle()) { Debug.Log("Decrease Inner Circle"); if (_lowerFaceHeight > 0) { _lowerFaceHeight -= 0.02f; changed = true; } else { controller.triggerHapticPulse(2); } } if (changed) { OnValidate(); } }
public void controlerUpdate(ControllerBehavior controller) { }
protected virtual void SetupBehavior(ControllerBehavior behavior) { behavior.ControllerName = m_controllerName; behavior.ProxyBuilderType = m_proxyBuilderType; behavior.CallBuilderType = m_callBuilderType; }