public override void OnInitialize(ISkillRefactorProperty property) { m_Property = property; m_State = SkillState.Idle; m_Property.SetCurrentSkillState(m_State); m_IDToSkill = new Dictionary <int, SkillBase>(); m_RemoveSkillList = new List <int>(); m_ReleasedSkillDuringPress = new Dictionary <int, bool>(); m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_CfgLanguageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgLanguageProxy) as CfgLanguageProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_WeakSoundCD = m_CfgEternityProxy.GetGamingConfig(1).Value.Mine.Value.Sound.Value.WeaknessSoundCd; m_WeakSoundTmpCD = m_WeakSoundCD; m_WeakSoundProbability = m_CfgEternityProxy.GetGamingConfig(1).Value.Mine.Value.Sound.Value.WeaknessSoundRate; SkillBase.s_CfgSkillProxy = m_CfgSkillProxy; SkillBase.s_SkillProxy = m_SkillProxy; SkillBase.s_CfgLanguageProxy = m_CfgLanguageProxy; SkillBase.s_GameplayProxy = m_GameplayProxy; SkillBase.s_CfgEternityProxy = m_CfgEternityProxy; SetPreditionForAllSkillType(); // UNDONE, 声音 PreloadSkill(); }
public Buff(BuffVO vo, IBuffProperty property) { VO = vo; BuffProperty = property; // Cache m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; Leyoutech.Utility.DebugUtility.LogWarning("Buff", string.Format("创建一个Buff ---> 归属entity = {0} , Buff ID = {1}", BuffProperty.EntityId(), VO.ID)); SkillBuff configVO = m_SkillProxy.GetBuff((int)VO.ID); if (configVO.ByteBuffer != null) { BuffEffect = BuffEffectBase.GetBuffEffectByType((BuffEffectType)configVO.BuffEffectId, this); Transform selfTf = BuffProperty.GetRootTransform(); SpacecraftEntity otherEntity = m_GameplayProxy.GetEntityById <SpacecraftEntity>(VO.Link_id) as SpacecraftEntity; Transform otherTf = null; if (otherEntity != null && !otherEntity.IsDead()) { otherTf = otherEntity.GetRootTransform(); } BuffEffect.Init(selfTf, otherTf); } else { BuffEffect = new BuffEffectBase(this); } }
/// <summary> /// 创建开始,循环阶段特效 /// </summary> private void CreateStartFXAndLoopFX() { if (VO.Link_id > 0 && !VO.Is_master) { //连线 buff, 被链接方,不播特效 return; } SkillBuff buffConfig = m_SkillProxy.GetBuff((int)VO.ID); CfgSkillSystemProxy skillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; if (Leyoutech.Utility.EffectUtility.IsEffectNameValid(buffConfig.StartFx)) { EffectController StartFX = EffectManager.GetInstance().CreateEffect(buffConfig.StartFx, EffectManager.GetEffectGroupNameInSpace(BuffProperty.IsMain())); //StartFX.transform.SetParent(BuffEffect.m_SelfTransform, false); BuffEffect.SetStartEffectController(StartFX); StartFX.SetCreateForMainPlayer(BuffProperty.IsMain()); } if (Leyoutech.Utility.EffectUtility.IsEffectNameValid(buffConfig.LoopFx)) { EffectController LoopFX = EffectManager.GetInstance().CreateEffect(buffConfig.LoopFx, EffectManager.GetEffectGroupNameInSpace(BuffProperty.IsMain()), OnCreateStartAndLoopFX, this); //LoopFX.transform.SetParent(BuffEffect.m_SelfTransform, false); BuffEffect.SetLoopEffectController(LoopFX); LoopFX.SetCreateForMainPlayer(BuffProperty.IsMain()); } }
public override void OnInitialize(IBattleWeaponProperty property) { m_Property = property; m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy; m_CfgLanguageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgLanguageProxy) as CfgLanguageProxy; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; }
public void CheckBuffPlaySound(uint buffId, bool isOpen) { CfgSkillSystemProxy skillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; SkillBuff configVO = skillProxy.GetBuff((int)buffId); if (isOpen && configVO.SoundAppearance > 0) { WwiseUtil.PlaySound(configVO.SoundAppearance, false, null); } else if (!isOpen && configVO.SoundEnd > 0) { WwiseUtil.PlaySound(configVO.SoundEnd, false, null); } }
public override void Initialize() { m_SkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_TeamProxy = Facade.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as TeamProxy; m_RaycastProxy = Facade.RetrieveProxy(ProxyName.RaycastProxy) as RaycastProxy; m_GameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_Root = FindComponent <RectTransform>("Content"); m_Camera = m_Root.GetComponentInParent <Canvas>().worldCamera; m_EnemyTemplate = FindComponent <RectTransform>("Templates/Slider_enemy"); m_UAVTemplate = FindComponent <RectTransform>("Templates/Slider_UAV"); m_BossTemplate = FindComponent <RectTransform>("Templates/Slider_enemyBoss"); m_FriendTemplate = FindComponent <RectTransform>("Templates/Slider_friend"); m_NpcTemplate = FindComponent <RectTransform>("Templates/Slider_npc"); m_MineralTemplate = FindComponent <RectTransform>("Templates/Slider_mineral"); m_DetectorTemplate = FindComponent <RectTransform>("Templates/Slider_npc1"); m_EscortTemplate = FindComponent <RectTransform>("Templates/Slider_escort"); }
public PlayerSkillProxy() : base(ProxyName.PlayerSkillProxy) { m_CurrentWeaponIndex = 0; m_SkillTypeToGlobalCDEndTime = new Dictionary <SkillType, float>(); m_SkillTypeToGlobalCDEndTime[SkillType.ShipSkill] = Time.time; m_SkillTypeToGlobalCDEndTime[SkillType.WeaponSkill] = Time.time; m_SkillTypeToGlobalCDEndTime[SkillType.UNKNOWN] = 0; m_GameplayProxy = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy; m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; m_ShipProxy = GameFacade.Instance.RetrieveProxy(ProxyName.ShipProxy) as ShipProxy; m_PackageProxy = Facade.RetrieveProxy(ProxyName.PackageProxy) as PackageProxy; shipCDVO = new PlayerSkillCDVO(CdType.Ship); }
// FIXME 技能. 预计SkillVO这里做一个池子. 消除GC //static PlayerSkillVO s_SkillVOTemplate; static public PlayerSkillVO CreateSkillVO(int skillID) { CfgSkillSystemProxy cfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; SkillSystemGrow skillGrow = cfgSkillProxy.GetSkillGrow(skillID); if (skillGrow.ByteBuffer == null) { Debug.LogErrorFormat("找不到SkillGrow. SkillID: {0}", skillID); return(null); } SkillSystemPath skillPath = cfgSkillProxy.GetSkillPath(skillGrow.PathID); if (skillPath.ByteBuffer == null) { Debug.LogErrorFormat("找不到SkillPath. PathID: {0}", skillGrow.PathID); return(null); } List <SkillSystemFx> skillFxList = cfgSkillProxy.GetSkillFxList(skillGrow.PathID); for (int iEffect = 0; iEffect < skillFxList.Count; iEffect++) { if (skillFxList[iEffect].ByteBuffer == null) { Debug.LogErrorFormat("找不到skillFxList. PathID: {0}", skillGrow.PathID); return(null); } } List <SkillSystemEffect> skillEffectList = cfgSkillProxy.GetSkillEffectList(skillID); for (int iEffect = 0; iEffect < skillFxList.Count; iEffect++) { if (skillEffectList[iEffect].ByteBuffer == null) { Debug.LogErrorFormat("找不到skillEffectList. skillID: {0}", skillID); return(null); } } return(new PlayerSkillVO(skillID)); }
private PlayerSkillVO(int id) { m_CfgSkillProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgSkillSystemProxy) as CfgSkillSystemProxy; m_TemplateID = id; skillGrow = m_CfgSkillProxy.GetSkillGrow(m_TemplateID); if (skillGrow.ByteBuffer != null) { m_SkillPath = m_CfgSkillProxy.GetSkillPath(skillGrow.PathID); m_SkillFxList = m_CfgSkillProxy.GetSkillFxList(skillGrow.PathID); m_SkillEffectList = m_CfgSkillProxy.GetSkillEffectList(m_TemplateID); m_CDEndTime = Time.time; m_TriggerCDEndTime = Time.time; m_IsValid = true; } else { m_IsValid = false; Debug.LogErrorFormat("技能不存在, 请查Skill_system_grow表. ID: {0}", id); } }