private void effectHandle(EventX e) { EditorFormItem eui = e.target as EditorFormItem; if (e.type == EventX.CHANGE) { ev.effectPath = eui.value; } }
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 TrigerEvent; grouGroup = new EditorEnumPopUp(); grouGroup.selectedIndex = ev.type; grouGroup.addEventListener(EventX.CHANGE, ridioGroupHandle); p.addChild(grouGroup); if (SkillEventType.DIY.CompareTo(grouGroup.selectedIndex) == 0) { formItem = new EditorFormItem("事件:"); formItem.value = ev.eventType; formItem.addEventListener(EventX.CHANGE, effectHandle); p.addChild(formItem); } }
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 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); }
protected override void initialization() { base.initialization(); BaseRigsterUtils.init(); this.titleContent = new GUIContent("技能"); EditorConfigUtils.load(); resourcePath = EditorConfigUtils.ProjectResource; resourcePath = resourcePath.Replace("\\", "/"); string basePrefabPath = ""; PathDefine.effectPath = "file:///" + basePrefabPath; PathDefine.avatarPath = "file:///" + basePrefabPath; PathDefine.scenePath = "file:///" + basePrefabPath; PathDefine.soundPath = "file:///" + basePrefabPath; EditorBox vbox = new EditorBox(); vbox.widthOption = GUILayout.Width(300); vbox.styleString = "box"; tabNav = new EditorTabNav(); tabNav.addEventListener(EventX.CHANGE, tabNavHandle); modelWindow = new ModelWindow(); modelWindow.addEventListener(EventX.SELECT, modelSelectHandle); tabNav.addItem("avatar", modelWindow); effectWindow = new ModelWindow(); effectWindow.addEventListener(EventX.SELECT, effectSelectHandle); tabNav.addItem("effect", effectWindow); soundWindow = new ModelWindow(); soundWindow.exNameArr = new[] { "*.mp3", "*.ogg", "*.wav" }; soundWindow.addEventListener(EventX.SELECT, soundSelectHandle); tabNav.addItem("sound", soundWindow); EditorBox box = new EditorBox(false); EditorButton btn; btn = new EditorButton("reload"); btn.addEventListener(EventX.ITEM_CLICK, reload); box.addChild(btn); btn = new EditorButton("updateSVN"); btn.addEventListener(EventX.ITEM_CLICK, updateSVN); box.addChild(btn); btn = new EditorButton("editor"); btn.addEventListener(EventX.ITEM_CLICK, editor); box.addChild(btn); autoMononType = new EditorFormItem("自动代码"); autoMononType.addEventListener(EventX.CHANGE, autoMononTypeHandle); autoMononType.value = autoMononTypeName; vbox.addChild(tabNav); vbox.addChild(new EditorFlexibleSpace()); vbox.addChild(autoMononType); vbox.addChild(box); btn = new EditorButton("打包Assetbundle"); btn.addEventListener(EventX.ITEM_CLICK, assetbundleClickHandle); vbox.addChild(btn); addChild(vbox); propertyWindow = new PropertyWindow(); propertyWindow.widthOption = GUILayout.Width(300); timeWindow = new TimeWindow(); timeWindow.addEventListener(EventX.SELECT, timeLineSelectHandle); timeWindow.init(resourcePath + "All/skill/", propertyWindow); addChild(timeWindow); addChild(propertyWindow); reload(null); tabNav.selectedIndex = tabSelectedIndex; modelWindow.selectedIndex = modelSelectedIndex; }
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); }
private void aniHandle(EventX e) { EditorFormItem eui = e.target as EditorFormItem; ev.key = eui.value; }