void InitRemoveEffects() { if (null != m_Data.re_BuffRemove) { PEAE_Buff buff = new PEAE_Buff(); buff.entity = m_Entity.skEntity; buff.buffList = m_Data.re_BuffRemove; buff.addBuff = false; m_RemoveEffs.Add(buff); } if (null != m_Data.re_BuffAdd) { PEAE_Buff buff = new PEAE_Buff(); buff.entity = m_Entity.skEntity; buff.buffList = m_Data.re_BuffAdd; buff.addBuff = true; m_RemoveEffs.Add(buff); } if (null != m_Data.re_AbnormalAdd) { PEAE_Abnormal abnormal = new PEAE_Abnormal(); abnormal.abnormalType = m_Data.re_AbnormalAdd; abnormal.addAbnormal = true; abnormal.abnormalCmpt = m_AbnormalCmpt; m_RemoveEffs.Add(abnormal); } if (null != m_Data.re_Anim && "0" != m_Data.re_Anim) { PEAE_Anim anim = new PEAE_Anim(); string[] subStr = m_Data.eff_Anim.Split(','); anim.effAnim = subStr[0]; anim.actionType = subStr.Length > 1 ? Convert.ToInt32(subStr[1]) : 1; anim.entity = m_Entity; m_RemoveEffs.Add(anim); } if (null != m_Data.re_Camera) { PEAE_CameraEffect cameraEffect = new PEAE_CameraEffect(); cameraEffect.effCamera = m_Data.re_Camera; cameraEffect.entity = m_Entity; m_AbnormalCmpt.evtAbnormalAttack += cameraEffect.OnAbnormalAttack; m_RemoveEffs.Add(cameraEffect); } if (null != m_Data.re_Particles) { PEAE_ParticleEffect particle = new PEAE_ParticleEffect(); particle.effectID = m_Data.re_Particles; particle.entity = m_Entity; m_RemoveEffs.Add(particle); } }
void InitEffects() { if (null != m_Data.eff_BuffAddList) { PEAE_Buff buff = new PEAE_Buff(); buff.buffList = m_Data.eff_BuffAddList; AddSaveBuffs(buff.buffList); buff.addBuff = true; buff.entity = m_Entity.skEntity; m_Effs.Add(buff); } if (null != m_Data.eff_Anim && "0" != m_Data.eff_Anim) { PEAE_Anim anim = new PEAE_Anim(); string[] subStr = m_Data.eff_Anim.Split(','); anim.effAnim = subStr[0]; anim.actionType = subStr.Length > 1 ? Convert.ToInt32(subStr[1]) : 1; anim.entity = m_Entity; m_Effs.Add(anim); } if (null != m_Data.eff_Camera) { PEAE_CameraEffect cameraEffect = new PEAE_CameraEffect(); cameraEffect.effCamera = m_Data.eff_Camera; cameraEffect.entity = m_Entity; m_AbnormalCmpt.evtAbnormalAttack += cameraEffect.OnAbnormalAttack; m_Effs.Add(cameraEffect); } if (null != m_Data.eff_AbnormalRemove) { PEAE_Abnormal abnormal = new PEAE_Abnormal(); abnormal.abnormalCmpt = m_AbnormalCmpt; abnormal.abnormalType = m_Data.eff_AbnormalRemove; abnormal.addAbnormal = false; m_Effs.Add(abnormal); } if (null != m_Data.eff_Particles) { PEAE_ParticleEffect particle = new PEAE_ParticleEffect(); particle.effectID = m_Data.eff_Particles; particle.entity = m_Entity; m_Effs.Add(particle); } if (Color.black != m_Data.eff_SkinColor) { PEAE_SkinColor skinColor = new PEAE_SkinColor(); skinColor.avatar = m_Entity.biologyViewCmpt as AvatarCmpt; skinColor.color = m_Data.eff_SkinColor; m_Effs.Add(skinColor); } if (null != m_Data.eff_BodyWeight) { PEAE_BodyWeight bodyWeight = new PEAE_BodyWeight(); bodyWeight.avatar = m_Entity.biologyViewCmpt as AvatarCmpt; bodyWeight.datas = m_Data.eff_BodyWeight; m_Effs.Add(bodyWeight); } }