public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as CameraShakeEvent; slider = new EditorSlider("幅度:"); slider.setRank(0.1f, 10.0f, 0.1f); slider.value = ev.factor; slider1 = new EditorSlider("周期:"); slider1.setRank(0.1f, 10.0f, 1); slider1.value = ev.period; formItem = new EditorVector3("偏移:"); formItem.value = ev.shaderVector; formItem.addEventListener(EventX.CHANGE, formHandle); slider.addEventListener(EventX.CHANGE, changeHandle); slider1.addEventListener(EventX.CHANGE, changeHandle1); p.addChild(slider); p.addChild(slider1); p.addChild(formItem); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as GhostEffectEvent; durationSlider = new EditorSlider("duration:"); durationSlider.min = 0.1f; durationSlider.max = 5.0f; durationSlider.value = ev.duration; durationSlider.addEventListener(EventX.CHANGE, durationSliderHandle); intervalSlider = new EditorSlider("interval"); intervalSlider.min = 0.1f; intervalSlider.max = 5.0f; intervalSlider.value = ev.interval; intervalSlider.addEventListener(EventX.CHANGE, intervalSliderHandle); radio = new EditorRadio("onPositionChange:"); radio.selected = ev.onPositionChange; radio.addEventListener(EventX.CHANGE, radioHandle); p.addChild(durationSlider); p.addChild(intervalSlider); p.addChild(radio); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as TimeScaleEvent; slider = new EditorSlider(); slider.min = 0.1f; slider.max = 1.0f; slider.value = ev.timeScale; slider.addEventListener(EventX.CHANGE, timeChangeHandle); p.addChild(slider); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as PlayAnimEvent; formItem = new EditorFormItem("动画:"); formItem.searckKey = DataSource.ANIMATION; formItem.value = ev.aniName; formItem.addEventListener(EventX.CHANGE, aniHandle); isForceRidio = new EditorRadio("是否强制切换:"); isForceRidio.selected = ev.isForce; isForceRidio.addEventListener(EventX.CHANGE, isForceRidioHandle); offsetSlider = new EditorSlider("偏移:"); offsetSlider.setRank(0f, 1.0f, ev.offsetAvg); offsetSlider.value = ev.offsetAvg; offsetSlider.addEventListener(EventX.CHANGE, sliderHandle); p.addChild(formItem); p.addChild(isForceRidio); p.addChild(offsetSlider); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as EffectCreateEvent; effectFormItem = new EditorFormItem("特效:"); effectFormItem.value = ev.effectPath; effectFormItem.addEventListener(EventX.CHANGE, effectHandle); effectFormItem.searckKey = DataSource.EFFECT; p.addChild(effectFormItem); skeletonToggle = new EditorRadio("绑定身体:"); skeletonToggle.selected = ev.isBindSkeleton; skeletonToggle.addEventListener(EventX.CHANGE, skeletonToggleHandle); bindOnceToggle = new EditorRadio("一次性对位而已:"); bindOnceToggle.selected = ev.isBindOnce; bindOnceToggle.addEventListener(EventX.CHANGE, bindOnceToggleHandle); bindOnceToggle.visible = ev.isBindSkeleton; skeletonFormItem = new EditorFormItem("骨骼:"); skeletonFormItem.value = ev.skeletonName; skeletonFormItem.addEventListener(EventX.CHANGE, skeletonNameHandle); skeletonFormItem.searckKey = DataSource.BONE; skeletonFormItem.visible = ev.isBindSkeleton; skeletonFormItem.visible = skeletonToggle.selected; offsetFromItem = new EditorVector3("坐标偏移:"); offsetFromItem.addEventListener(EventX.CHANGE, offsetHandle); offsetFromItem.value = ev.offset; rotationFromItem = new EditorVector3("坐标旋转:"); rotationFromItem.addEventListener(EventX.CHANGE, rotationHandle); rotationFromItem.value = ev.offRotation; useTargetToggle = new EditorRadio("useTarget:"); useTargetToggle.selected = ev.useTarget; useTargetToggle.addEventListener(EventX.CHANGE, useTargetToggleHandle); isColliderToggle = new EditorRadio("isCollider:"); isColliderToggle.selected = ev.isCollider; isColliderToggle.addEventListener(EventX.CHANGE, isColliderToggleHandle); isUseTargetLayerToggle = new EditorRadio("useTargetLayer:"); isUseTargetLayerToggle.selected = ev.useTargetLayer; isUseTargetLayerToggle.addEventListener(EventX.CHANGE, isUseTargetLayerHandle); particlePlaybackSpeedSlider = new EditorSlider("SpeedScale:"); particlePlaybackSpeedSlider.min = 0.1f; particlePlaybackSpeedSlider.max = 5.0f; particlePlaybackSpeedSlider.value = ev.particlePlaybackSpeed; particlePlaybackSpeedSlider.addEventListener(EventX.CHANGE, particlePlaybackSpeedHandle); p.addChild(skeletonToggle); p.addChild(bindOnceToggle); p.addChild(skeletonFormItem); p.addChild(offsetFromItem); p.addChild(rotationFromItem); p.addChild(useTargetToggle); p.addChild(isColliderToggle); p.addChild(isUseTargetLayerToggle); p.addChild(particlePlaybackSpeedSlider); }
public TimeWindow() { this.styleString = "PreBackground"; EditorBox box = new EditorBox(false); box.styleString = "box"; EditorButton newButton = new EditorButton("创建"); newButton.styleString = "ButtonLeft"; newButton.expandWidth = false; newButton.addEventListener(EventX.ITEM_CLICK, newHandle); box.addChild(newButton); EditorButton button = new EditorButton("加载"); button.styleString = "ButtonMid"; button.expandWidth = false; button.addEventListener(EventX.ITEM_CLICK, loadHandle); box.addChild(button); button = new EditorButton("保存"); button.styleString = "ButtonMid"; button.expandWidth = false; button.addEventListener(EventX.ITEM_CLICK, saveHandle); box.addChild(button); button = new EditorButton("另存"); button.styleString = "ButtonMid"; button.expandWidth = false; button.addEventListener(EventX.ITEM_CLICK, toSaveHandle); box.addChild(button); playButton = new EditorButton("播放"); playButton.styleString = "ButtonRight"; playButton.expandWidth = false; playButton.addEventListener(EventX.ITEM_CLICK, toggleHandle); box.addChild(playButton); EditorPlayControlBar cb = new EditorPlayControlBar(); box.addChild(cb); box.addChild(new EditorSpace()); fileNameButton = new EditorButton(); fileNameButton.expandWidth = false; fileNameButton.addEventListener(EventX.ITEM_CLICK, openPathHandle); box.addChild(fileNameButton); fileNameButton.visible = false; commitButton = new EditorButton("提交"); commitButton.expandWidth = false; commitButton.addEventListener(EventX.ITEM_CLICK, commitPathHandle); box.addChild(commitButton); commitButton.visible = false; timeScaleSlider = new EditorSlider("时间缩放"); timeScaleSlider.setRank(0.1f, 2f, 1.0f); timeScaleSlider.widthOption = GUILayout.Width(200); timeScaleSlider.addEventListener(EventX.CHANGE, timeScaleHandle); box.addChild(timeScaleSlider); this.addChild(box); EditorButton resetButton = new EditorButton("reset"); resetButton.expandWidth = false; resetButton.addEventListener(EventX.ITEM_CLICK, resetTimeHandle); box.addChild(resetButton); EditorLabel label = new EditorLabel("fps:" + (int)(1000 / frameTime) + "帧/s"); box.addChild(label); timeLine = new TimeLine(); timeLine.genericMenuEditorCallBack = genericMenuEditorCallBack; timeLine.addMenuEditorCallBack = addMenuEditorCallBack; timeLine.addEventListener(EventX.SELECT, innerDirectDispatchEvent); skillListBox = new EditorBox(true); this.addChild(timeLine); this.addChild(skillListBox); }