private void OnEffectBindNameSelected(int index, string title) { // && !string.IsNullOrEmpty(effectInfo.EffectName) && effectInfo.EffectName != BindTypes.NONE if (effectInfo != null) { string ty = BoneTypes.KeyToValue(title); effectInfo.BindName = ty; } }
public static ObservableList <string> GetEffectBindNameList() { if (effectBindnList.Count == 0) { foreach (string key in BoneTypes.Types()) { effectBindnList.Add(key); } } return(effectBindnList); }
public void Show(string title, EffectInfo eInfo, bool isNew, Action <EffectInfo> onEditorCompleteHandler) { if (container != null) { container.SetActive(true); } titleText.text = title; effectInfo = eInfo; isNewCreate = isNew; oldEffectInfo = effectInfo.Clone(); OnEditorCompleteHandler = onEditorCompleteHandler; flySpeed.SetValue(effectInfo.FlySpeed, DataManager.FlySpeedMax); speedText.text = effectInfo.FlySpeed.ToString(); int index = DataManager.GetEffectIndex(effectInfo.EffectName); effectNameSet.ListView.Select(index); int eType = effectInfo.EffectType; string ety = EffectTypes.GetValue(eType); index = DataManager.GetEffectTypeIndex(ety); effectTypeSet.ListView.Select(index); index = DataManager.GetSoundIndex(effectInfo.SoundName); soundNameSet.ListView.Select(index); soundDelayText.text = effectInfo.SoundPlayDelayTime.ToString(); soundPlayPointSet.SetValue(effectInfo.SoundPlayDelayTime, DataManager.ActionSoundDelayMax); isLoop.isOn = effectInfo.IsLoop; string by = BindTypes.GetKey(effectInfo.BindType); index = DataManager.GetEffectBindIndex(by); effectBindTypeSet.ListView.Select(index); by = BoneTypes.ValueToKey(effectInfo.BindName); index = DataManager.GetEffectBindnIndex(by); effectBindNameSet.ListView.Select(index); }