private void StartEffect(PerformVo perform) { if (perform == null) { return; } Vector3 zero = Vector3.zero; Transform parent; this.GetBone(perform.data.config.effect_anchor, out parent, out zero); GameObject gameObject = ResourceManager.Load <GameObject>(perform.data.config.effect_id, true, true, null, 0, false); Transform transform = UnityEngine.Object.Instantiate(gameObject.transform) as Transform; transform.parent = parent; transform.gameObject.AddComponent <RenderQueue>(); if (perform.data.effect_pos_offset == null) { transform.localPosition = zero; } else { transform.localPosition = new Vector3(perform.data.effect_pos_offset[0], perform.data.effect_pos_offset[1], perform.data.effect_pos_offset[2]) + zero; } if (perform.data.effect_rotation_offset == null) { transform.localRotation = Quaternion.identity; } else { transform.localRotation = Quaternion.Euler(new Vector3(perform.data.effect_rotation_offset[0], perform.data.effect_rotation_offset[1], perform.data.effect_rotation_offset[2])); } base.StopCoroutine(this.ShowEffect(transform)); base.StartCoroutine(this.ShowEffect(transform)); }
protected PerformVo(string perform_id, Units casterUnit) { this.perform_id = perform_id; this.data = Singleton <PerformDataManager> .Instance.GetVo(perform_id); this.casterUnit = casterUnit; this.effect_id = this.data.config.effect_id; if (StringUtils.CheckValid(this.data.endPerformId)) { this.endPerform = PerformVo.Create(this.data.endPerformId, casterUnit); } }
private void InitEffects() { SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.heroId); if (heroMainData == null) { return; } string effect_id = heroMainData.effect_id; if (effect_id == null) { return; } if (StringUtils.CheckValid(effect_id)) { this.character_effects.Clear(); string[] stringValue = StringUtils.GetStringValue(effect_id, ','); for (int i = 0; i < stringValue.Length; i++) { if (StringUtils.CheckValid(stringValue[i])) { string[] stringValue2 = StringUtils.GetStringValue(stringValue[i], '|'); if (stringValue2 != null) { int key = int.Parse(stringValue2[0]); string text = stringValue2[1]; if (StringUtils.CheckValid(text)) { if (!this.character_effects.ContainsKey(key)) { this.character_effects.Add(key, new List <PerformVo>()); } this.character_effects[key].Add(PerformVo.Create(text, null)); } } } } } }