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); }
private void buildView() { removeAllChildren(); foreach (string item in _items) { EditorRadio radio = new EditorRadio(item); radio.addEventListener(EventX.ITEM_CLICK, selectedHandle); this.addChild(radio); } }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as MoveEvent; formItem = new EditorVector3("偏移:"); formItem.value = ev.position; formItem.addEventListener(EventX.CHANGE, aniHandle); ridioGroup = new EditorEnumPopUp(); ridioGroup.addEventListener(EventX.CHANGE, ridioGroupHandle); ridioGroup.selectedIndex = ev.type; isInterpolationRidio = new EditorRadio("是否插值"); isInterpolationRidio.selected = ev.isInterpolation; isInterpolationRidio.addEventListener(EventX.CHANGE, isInterpolationHandle); easeType = new EditorEnum("Ease"); //easeType.value = ev.easeType; easeType.addEventListener(EventX.CHANGE, easeTypeHandle); isSpeedRidio = new EditorRadio("是否只按此速度"); isSpeedRidio.visible = isInterpolationRidio.selected; isSpeedRidio.selected = ev.isSpeed; isSpeedRidio.addEventListener(EventX.CHANGE, isSpeedRidioHandle); checkCollideRidio = new EditorRadio("检查碰撞"); checkCollideRidio.selected = ev.checkCollider; checkCollideRidio.addEventListener(EventX.CHANGE, checkCollideRidioHandle); resetRidio = new EditorRadio("播完回复到原位置"); resetRidio.selected = ev.reback; resetRidio.addEventListener(EventX.CHANGE, ridioHandle); p.addChild(ridioGroup); p.addChild(formItem); p.addChild(isInterpolationRidio); p.addChild(easeType); p.addChild(isSpeedRidio); p.addChild(checkCollideRidio); if (isInterpolationRidio.selected == false) { easeType.visible = false; isSpeedRidio.visible = false; } p.addChild(resetRidio); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as PlaySoundEvent; heroRadio = new EditorRadio("仅主角"); heroRadio.addEventListener(EventX.CHANGE, radioHandle); heroRadio.selected = ev.isOnlyHero; onceRadio = new EditorRadio("once"); onceRadio.addEventListener(EventX.CHANGE, onceRadioHandle); onceRadio.selected = ev.isOnce; formItem1 = new EditorFormItem("声音1:"); formItem1.addEventListener(EventX.CHANGE, soundHandle1); formItem1.searckKey = DataSource.SOUND; formItem1.value = ev.m_sound1; formItem2 = new EditorFormItem("声音2:"); formItem2.addEventListener(EventX.CHANGE, soundHandle1); formItem2.searckKey = DataSource.SOUND; formItem2.value = ev.m_sound2; formItem3 = new EditorFormItem("声音3:"); formItem3.addEventListener(EventX.CHANGE, soundHandle1); formItem3.searckKey = DataSource.SOUND; formItem3.value = ev.m_sound3; formItem4 = new EditorFormItem("声音4:"); formItem4.addEventListener(EventX.CHANGE, soundHandle1); formItem4.searckKey = DataSource.SOUND; formItem4.value = ev.m_sound4; p.addChild(heroRadio); p.addChild(formItem1); p.addChild(formItem2); p.addChild(formItem3); p.addChild(formItem4); p.addChild(onceRadio); p.windowRepaint(); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as FlashShowEvent; showToggle = new EditorRadio("显示:"); showToggle.selected = ev.isShow; showToggle.addEventListener(EventX.CHANGE, skeletonToggleHandle); offsetFromItem = new EditorVector3("坐标偏移:"); offsetFromItem.addEventListener(EventX.CHANGE, offsetHandle); offsetFromItem.value = ev.offset; offsetFromItem.visible = showToggle.selected; useTargetToggle = new EditorRadio("useTarget:"); useTargetToggle.selected = ev.useTarget; useTargetToggle.addEventListener(EventX.CHANGE, useTargetToggleHandle); p.addChild(showToggle); p.addChild(offsetFromItem); p.addChild(useTargetToggle); }
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); ev = value as CameraMoveEvent; formItem = new EditorVector3("偏移:"); formItem.value = ev.position; formItem.addEventListener(EventX.CHANGE, formHandle); checkRadio = new EditorRadio("获取焦点"); checkRadio.selected = ev.focusGet; checkRadio.addEventListener(EventX.CHANGE, checkRadioHandle); if (checkRadio.selected) { forceRadio = new EditorRadio("强转"); forceRadio.selected = ev.forceChange; forceRadio.addEventListener(EventX.CHANGE, checkRadioHandle); } p.addChild(formItem); p.addChild(checkRadio); }
public override void createUI(ISkillEvent value, EditorUI p) { base.createUI(value, p); this.ev = value as SetAnimationBoolEvent; formItem = new EditorFormItem("参数:"); formItem.searckKey = DataSource.ANIMATION_PARMS; formItem.value = ev.key; formItem.addEventListener(EventX.CHANGE, aniHandle); valueRedio = new EditorRadio("值:"); valueRedio.selected = ev.value; valueRedio.addEventListener(EventX.CHANGE, valueHandle); isResetRidio = new EditorRadio("播完重置:"); isResetRidio.selected = ev.resetDefault; isResetRidio.addEventListener(EventX.CHANGE, resetHandle); p.addChild(formItem); p.addChild(valueRedio); p.addChild(isResetRidio); }
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); }