public PCIe6323(string deviceName, AIReadTriggerType aiReadTrigger) { AI = new AIType(deviceName); AO = new AOType(deviceName); DO = new DOType(deviceName); CO = new COType(deviceName); _deviceName = deviceName; AiReadTrigger = aiReadTrigger; }
protected override void OnStart(float startTime) { _start = startTime; _type = ParseEnum <DOType>(typeOptions[_typeSelect]); if (_actor == null || _transformTo == null) { return; } //if (_transformFrom == null || _transformTo == null) return; if (_transformFrom == null) { _transformFrom = _actor.transform; } easer = ParseEnum <Ease>(easingOptions[_easingMode]); loopType = ParseEnum <LoopType>(loopOptions[_loopType]); // SET TWEEN switch (_type) { case DOType.Move: _actor.transform.position = _transformFrom.position; if (_blendable) { tween = _actor.transform.DOBlendableMoveBy(_transformTo.position, _duration); } else { tween = _actor.transform.DOMove(_transformTo.position, _duration); } break; case DOType.Rotate: _actor.transform.rotation = _transformFrom.rotation; if (_blendable) { tween = _actor.transform.DORotate(_transformTo.rotation.eulerAngles, _duration, rotaMode); } else { tween = _actor.transform.DORotate(_transformTo.rotation.eulerAngles, _duration, rotaMode); } break; case DOType.Scale: _actor.transform.localScale = _transformFrom.localScale; if (_blendable) { tween = _actor.transform.DOBlendableScaleBy(_transformTo.localScale, _duration); } else { tween = _actor.transform.DOScale(_transformTo.localScale, _duration); } break; case DOType.Path: break; default: Debug.Log("Incorrect DOType in DOTransformAnimEvent: " + _description); break; } if (_easingMode > -1) { tween.SetEase(easer); } if (_loops != 1) { tween.SetLoops(_loops, loopType); //maybe assign? } if (_relative) { tween.SetRelative(); } }