public override void OnUpdate(float deltaTime)
        {
            if (m_StateMachine.IsRunning)
            {
                float fire_CountDown = m_CfgEternityProxy.GetGamingConfig(1).Value.Sound.Value.CountDown.Value.Fire;
                m_ISpacecraftSkillProperty.SetFireCountdown(fire_CountDown);

                m_StateMachine.DoUpdate(deltaTime);
            }

            //Trigger
            if (m_TriggerSkillId <= 0 || !IsTrigger || !m_ISpacecraftSkillProperty.GetSkillBttonIsDown())
            {
                return;
            }
            if (!CanReleaseSkill(m_TriggerSkillId))
            {
                return;
            }
            if (m_TriggerStartTime + m_TriggerLogicTime > Time.time)
            {
                return;
            }
            m_TriggerStartTime = Time.time;


            Leyoutech.Utility.DebugUtility.LogWarning("IsTrigger技能", string.Format("m_TriggerSkillId = {0}", m_TriggerSkillId));
            if (m_ISpacecraftSkillProperty.IsMain()) //主角
            {
                ReleaseSkill(m_TriggerSkillId);
                C2S_ButtonDown();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 填充邮件数据
 /// </summary>
 private void RenderMailList()
 {
     if (GetTransform() == null)
     {
         return;
     }
     if (OwnerView.State.GetPageIndex() == 0)
     {
         MailDataVO[] mailDataVOs = m_MailProxy.GetMails().Values.ToArray();
         int          totalCount  = (int)m_CfgEternityProxy.GetGamingConfig(1).Value.Mail.Value.MaxNum;
         OwnerView.State.SetPageLabel(0, string.Format("{0}/{1}", mailDataVOs.Length, totalCount));
         Array.Sort(mailDataVOs, (MailDataVO x, MailDataVO y) =>
         {
             if (x.SendTime.CompareTo(y.SendTime) != 0)
             {
                 return(x.SendTime.CompareTo(y.SendTime) * -1);
             }
             else
             {
                 return(0);
             }
         });
         ClearData();
         AddDatas(null, mailDataVOs);
     }
 }
Ejemplo n.º 3
0
    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();
    }
 /// <summary>
 /// 添加隐身特效
 /// </summary>
 private void AddHideEffect()
 {
     /// TODO.读表
     if (m_HideFxInstance == null)
     {
         m_HideFxInstance = EffectManager.GetInstance().CreateEffect(m_EternityProxy.GetGamingConfig(1).Value.Treasure.Value.Effect.Value.InvisibleEffect, EffectManager.GetEffectGroupNameInSpace(m_Property.IsMain()));
         m_HideFxInstance.transform.SetParent(m_Property.GetSkinRootTransform(), false);
         m_HideFxInstance.SetCreateForMainPlayer(m_Property.IsMain());
     }
     else
     {
         m_HideFxInstance.PlayFX();
     }
 }
Ejemplo n.º 5
0
    public override void OnInitialize(IChangeMaterialProperty property)
    {
        m_Property = property;
        Npc npcVO = m_Property.GetNPCTemplateVO();

        /// npcVO.TriggerRange
        m_CfgEternityProxy  = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        m_TreasureHuntProxy = GameFacade.Instance.RetrieveProxy(ProxyName.TreasureHuntProxy) as TreasureHuntProxy;
        m_GameplayProxy     = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
        m_MainEntity        = m_GameplayProxy.GetMainPlayer();

        GamingConfigTreasure      gamingConfigTreasure = m_CfgEternityProxy.GetGamingConfig(1).Value.Treasure.Value;
        GamingConfigTreasureColor colour = gamingConfigTreasure.Colour.Value;

        m_Colors[DistanceType.discovery] = colour.DiscoveryDistance;
        m_Colors[DistanceType.strong]    = colour.StrongSignalDistance;
        m_Colors[DistanceType.medium]    = colour.MediumSignalDistance;
        m_Colors[DistanceType.weak]      = colour.WeakSignalDistance;

        GamingConfigTreasureFrequency frequency = gamingConfigTreasure.Frequency.Value;

        m_Frequencys[DistanceType.discovery] = frequency.DiscoveryDistance;
        m_Frequencys[DistanceType.strong]    = frequency.StrongSignalDistance;
        m_Frequencys[DistanceType.medium]    = frequency.MediumSignalDistance;
        m_Frequencys[DistanceType.weak]      = frequency.WeakSignalDistance;

        GamingConfigTreasureSound sound = gamingConfigTreasure.Sound.Value;

        m_Sounds[DistanceType.none]   = (int)sound.NoSignalDetector;
        m_Sounds[DistanceType.strong] = (int)sound.StrongSignalDetector;
        m_Sounds[DistanceType.medium] = (int)sound.MediumSignalDetector;
        m_Sounds[DistanceType.weak]   = (int)sound.WeakSignalDetector;
    }
Ejemplo n.º 6
0
 public MSAIBossProxy() : base(ProxyName.MSAIBossProxy)
 {
     m_CfgEternityProxy  = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
     m_GameplayProxy     = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
     m_JujubeBattlefield = m_CfgEternityProxy.GetGamingConfig(1).Value.JujubeBattlefield.Value;
     m_NearbyVoices[0]   = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNest;
     m_NearbyVoices[1]   = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNestII;
     m_NearbyVoices[2]   = (int)m_JujubeBattlefield.SystemVoice.Value.NearStrangeNestIII;
 }
    public override void Initialize()
    {
        m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

        m_ShowTime = m_CfgEternityProxy.GetGamingConfig(1).Value.Dungeon.Value.BaoLuanZhiDi.Value.BossHudTime;

        m_BossPanel = FindComponent <Transform>("BossTip").gameObject;
        m_BossPanel.SetActive(false);
    }
Ejemplo n.º 8
0
    /// <summary>
    /// 视图打开时调用
    /// </summary>
    /// <param name="owner">父视图</param>
    public override void OnShow(object msg)
    {
        base.OnShow(msg);
        m_FoundryProxy     = GameFacade.Instance.RetrieveProxy(ProxyName.FoundryProxy) as FoundryProxy;
        m_PackageProxy     = GameFacade.Instance.RetrieveProxy(ProxyName.PackageProxy) as PackageProxy;
        m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
        m_ServerListProxy  = GameFacade.Instance.RetrieveProxy(ProxyName.ServerListProxy) as ServerListProxy;
        m_ShipProxy        = GameFacade.Instance.RetrieveProxy(ProxyName.ShipProxy) as ShipProxy;
        HOLD_TIME          = State.GetAction(UIAction.Product_Accelerate).StateList[0].Time;
        m_ExpendNumber     = m_CfgEternityProxy.GetGamingConfig(1).Value.Produce.Value.FinishExpenseRate;
        m_ProduceView      = OwnerView as ProduceView;
        m_FoundryProxy.GetAllDataByTable();
        m_PartProduceList = m_FoundryProxy.GetDataByMainType(BlueprintL1.Material);//零件
        NetworkManager.Instance.GetFoundryController().SendGetFoundryInfo();
        MsgOpenProduce msgOpenProduce = (MsgOpenProduce)msg;

        m_CurrentType = msgOpenProduce.CurrentProduceType;
        m_Grad        = (int)msgOpenProduce.MProduceDialogType;
        m_GradOld     = m_Grad;

        State.OnSelectionChanged -= OnSelectionDataChanged;
        State.OnSelectionChanged += OnSelectionDataChanged;
        State.GetAction(UIAction.Product_Accelerate).Callback        += OnProduce;
        State.GetAction(UIAction.Product_Cancel).Callback            += OnCanelProduce;
        State.GetAction(UIAction.Product_ProduceAndCollect).Callback += OnRevecie;
        State.GetAction(UIAction.Product_Accelerate).Visible          = false;
        switch (m_CurrentType)
        {
        case ProduceType.HeavyWeapon:
            m_CurrentBlueprintType = BlueprintL1.Weapon;
            break;

        case ProduceType.Reformer:
            m_CurrentBlueprintType = BlueprintL1.Reformer;
            break;

        case ProduceType.Chip:
            m_CurrentBlueprintType = BlueprintL1.EquipmentMod;
            break;

        case ProduceType.Device:
            m_CurrentBlueprintType = BlueprintL1.Equipment;
            break;

        case ProduceType.Ship:
            m_CurrentBlueprintType = BlueprintL1.Warship;
            m_FoundryProxy.InitShipPackage();
            break;

        default:
            break;
        }
    }
Ejemplo n.º 9
0
    public override void OnInitialize(ISpacecraftSoundProperty property)
    {
        m_SpacecraftSoundProperty = property;

        m_Cgeternityproxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

        if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htMonster)
        {
            /// TODO 怪物后续走表
            m_MusicComboID = 1001;
        }
        else if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htPlayer)
        {
            m_MusicComboID = m_Cgeternityproxy.GetItemByKey(property.GetItemID()).ItemUnion <Warship>().Value.MusicComboID;
        }

        if (!m_SpacecraftSoundProperty.IsMain())
        {
            m_WwiseMusicPalce = WwiseMusicPalce.Palce_3st;
        }

        /// TODO.
        /// 处理探查掉落音效,先在newhero中处理跑通流程,后续根据状态协议处理
        KHeroType heroType = m_SpacecraftSoundProperty.GetHeroType();

        if (heroType == KHeroType.htNormalChest)
        {
            PlayVideoSound((int)m_Cgeternityproxy.GetGamingConfig(1).Value.Treasure.Value.Sound.Value.OrdinaryChestRefresh);
        }
        else if ((heroType == KHeroType.htRareChestGuard || heroType == KHeroType.htNormalChestGuard) && m_SpacecraftSoundProperty.IsSeal())
        {
            PlaySystemSound(WwiseMusicSpecialType.SpecialType_Voice_treasure_event2, (object obj) =>
            {
                PlayVideoSound((int)m_Cgeternityproxy.GetGamingConfig(1).Value.Treasure.Value.Sound.Value.JammerRefresh);
            });
        }
    }
Ejemplo n.º 10
0
    public override void Initialize()
    {
        m_ServerListProxy  = (ServerListProxy)Facade.RetrieveProxy(ProxyName.ServerListProxy);
        m_CfgEternityProxy = (CfgEternityProxy)Facade.RetrieveProxy(ProxyName.CfgEternityProxy);
        HOLD_TIME          = m_CfgEternityProxy.GetGamingConfig(1).Value.Reading.Value.TimeGeneral;

        m_TopToggles            = FindComponentsInChildren <Toggle>("Content/ToggleTitle");
        m_GenderToggleRoot      = FindComponent <Transform>("Content/SexList/Viewport/Content");
        m_SkinToggleRoot        = FindComponent <Transform>("Content/SkinList/Viewport/Content");
        m_GenderRoot            = FindComponent <Transform>("Content/SexList");
        m_SkinRoot              = FindComponent <Transform>("Content/SkinList");
        m_HotKeyRootQ           = FindComponent <Transform>("Content/ToggleTitle/Hotkey");
        m_HotKeyRootE           = FindComponent <Transform>("Content/ToggleTitle/Hotkey2");
        m_GroupScrollerViewSex  = FindComponent <GroupScrollerView>("Content/SexList");
        m_GroupScrollerViewSkin = FindComponent <GroupScrollerView>("Content/SkinList");
        m_HotKeyRootQ.GetComponent <CanvasGroup>().ignoreParentGroups = true;
        m_HotKeyRootQ.GetComponent <CanvasGroup>().blocksRaycasts     = true;
        m_HotKeyRootE.GetComponent <CanvasGroup>().ignoreParentGroups = true;
        m_HotKeyRootE.GetComponent <CanvasGroup>().blocksRaycasts     = true;
        m_NameTransform   = FindComponent <Transform>("Name");
        m_LimitingText    = FindComponent <TMP_Text>("Name/Content/Name/Label_Des");
        m_WarningNameText = FindComponent <TMP_Text>("Name/Content/Waring/Label_Des");
        m_NamePanelInput  = FindComponent <TMP_InputField>("Name/Content/NameInput");
        m_HotKeyRoot      = FindComponent <Transform>("Control/GameViewFooter/List");
        m_HotKeyRootName  = m_NameTransform.Find("Control/List");
        m_GenderRoot.gameObject.SetActive(true);
        m_LimitingText.text = TableUtil.GetLanguageString("character_text_1006");
        m_SexLanguage       = new string[] { "character_title_1009", "character_title_1008" };
        m_SkinLanguage      = new string[] { "character_text_1018", "character_text_1017", "character_text_1016" };
        m_MaleIcons         = new int [] { 33004, 33003 };
        UIManager.Instance.GetUIElement(ROLESKINELEMENTASSET_ADDRESS, (GameObject prefab) =>
        {
            m_ToggleItem = prefab;
            m_ToggleItem.CreatePool(1, ROLESKINELEMENTASSET_ADDRESS);
        });
        m_GroupScrollerViewSkin.RenderItem   = OnItemRendererSkin;
        m_GroupScrollerViewSkin.ItemTemplate = m_ToggleItem.GetComponent <RectTransform>();
        m_GroupScrollerViewSex.RenderItem    = OnItemRendererSex;
        m_GroupScrollerViewSex.ItemTemplate  = m_ToggleItem.GetComponent <RectTransform>();
        m_GroupScrollerViewSkin.ColumnCount  = 1;
        m_GroupScrollerViewSkin.CellSize     = new Vector2(336, 88);
        m_GroupScrollerViewSkin.CellSpace    = new Vector2(0, 20);
        m_GroupScrollerViewSex.ColumnCount   = 1;
        m_GroupScrollerViewSex.CellSize      = new Vector2(336, 88);
        m_GroupScrollerViewSex.CellSpace     = new Vector2(0, 20);
        LoadSexToggle(true);
        LoadSkinToggle(true);
    }
Ejemplo n.º 11
0
    public override void OnInitialize(ISpacecraftInputProperty property)
    {
        m_SpacecraftInputProperty = property;
        m_PlayerSkillProxy        = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy;
        m_GamePlayProxy           = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
        m_EternityProxy           = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

        Vector3 rotation = property.GetRigidbody() ? property.GetRigidbody().rotation.eulerAngles : Vector3.zero;

        m_Rotation.x = rotation.x;
        m_Rotation.y = rotation.y;
        ClampRotation();
        Quaternion quaternion = Quaternion.Euler(m_Rotation);

        m_RotateAxis = (quaternion * Vector3.forward).normalized;

        m_SixDofCursorRange = m_EternityProxy.GetGamingConfig(1).Value.CmCharacter.Value.SixDofCursorRange;
    }
Ejemplo n.º 12
0
    /// <summary>
    /// 获取加速需要多少钱
    /// </summary>
    /// <param name="id"></param>
    /// <returns></returns>
    public long GetNeedGlod(int id)
    {
        long          needCout      = 0;
        ProduceInfoVO foundryMember = m_FoundryProxy.GetFoundryMemberByTID(id);
        float         factorValue   = m_CfgEternityProxy.GetGamingConfig(1).Value.Produce.Value.FinishExpenseRate;
        float         maxTime       = foundryMember.EndTime - foundryMember.StartTime;
        float         needtime      = foundryMember.EndTime - foundryMember.StartTime - foundryMember.SpendTime;

        if ((needtime - HOLD_TIME) > SECOND)
        {
            needCout = (needtime - HOLD_TIME) % SECOND == 0 ? (long)((needtime - HOLD_TIME) / SECOND) : (long)((needtime - HOLD_TIME) / SECOND + 1);
            needCout = (long)(needCout * m_ExpendNumber);
        }
        else
        {
            needCout = (long)m_ExpendNumber;
        }
        return(needCout);
    }
Ejemplo n.º 13
0
    public override void OnInitialize(ISpacecraftHitWarningProperty property)
    {
        m_Property         = property;
        m_GameplayProxy    = GameFacade.Instance.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
        m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;

        GamingConfighitWarningCameraEffect effect = m_CfgEternityProxy.GetGamingConfig(1).Value.HitWarningCameraEffect.Value;

        m_WarningMap = new Dictionary <AttackWarningDirection, string>();
        m_WarningMap[AttackWarningDirection.Forward]   = effect.Forward;
        m_WarningMap[AttackWarningDirection.Backward]  = effect.Backward;
        m_WarningMap[AttackWarningDirection.Left]      = effect.Left;
        m_WarningMap[AttackWarningDirection.Right]     = effect.Right;
        m_WarningMap[AttackWarningDirection.Up]        = effect.Up;
        m_WarningMap[AttackWarningDirection.Down]      = effect.Down;
        m_WarningMap[AttackWarningDirection.UpLeft]    = effect.UpLeft;
        m_WarningMap[AttackWarningDirection.UpRight]   = effect.UpRight;
        m_WarningMap[AttackWarningDirection.DownLeft]  = effect.DownLeft;
        m_WarningMap[AttackWarningDirection.DownRight] = effect.DownRight;
    }
Ejemplo n.º 14
0
    public void SyncDiscoverPrecious(S2C_SYNC_PLAYER_DISCOVER_PRECIOUS msg)
    {
        int type = msg.discover_type;

        /// 发现信号 0是飞出
        if (type == (int)PlayerDiscoverPreciousType.DiscoverSignal)
        {
            if (msg.is_in != 0)
            {
                SpacecraftEntity main = m_GameplayProxy.GetEntityById <SpacecraftEntity>(m_GameplayProxy.GetMainPlayerUID());
                m_Effect = EffectManager.GetInstance().CreateEffect(m_CfgEternityProxy.GetGamingConfig(1).Value.Treasure.Value.Effect.Value.DiscoverCameraEffect, EffectManager.GetEffectGroupNameInSpace(true));
                m_Effect.transform.SetParent(main.GetSkinRootTransform(), false);
                m_Effect.SetCreateForMainPlayer(true);

                WwiseUtil.PlaySound((int)WwiseMusic.InTreasure_FX_Sound, false, null);
                WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_treasure_event1, WwiseMusicPalce.Palce_1st, false, null);
                MsgDetectorShow msgDetectorShow = new MsgDetectorShow();
                msgDetectorShow.Show = true;
                GameplayProxy gameplayProxy = Facade.RetrieveProxy(ProxyName.GameplayProxy) as GameplayProxy;
                Vector3       pos           = gameplayProxy.ServerAreaOffsetToClientPosition(new Vector3(0, (float)msg.fY, 0));
                msgDetectorShow.Height    = pos.y;              //todo 宝藏的高度
                msgDetectorShow.MaxHeight = (float)msg.fR * 2f; //触发范围最大高度
                Facade.SendNotification(NotificationName.MSG_DETECTOR_SHOW, msgDetectorShow);
                Facade.SendNotification(NotificationName.MSG_INTERACTIVE_SHOWTIP, HudNpcInteractiveFlagPanel.InteractiveTipType.Precious);
            }
            else
            {
                MsgDetectorShow msgDetectorShow = new MsgDetectorShow();
                msgDetectorShow.Show = false;
                Facade.SendNotification(NotificationName.MSG_DETECTOR_SHOW, msgDetectorShow);
                Facade.SendNotification(NotificationName.MSG_INTERACTIVE_HIDETIP, HudNpcInteractiveFlagPanel.InteractiveTipType.Precious);
            }
        }
        /// 发现宝藏 0是飞出
        else if (msg.is_in != 0 && type == (int)PlayerDiscoverPreciousType.DiscoverPrecious)
        {
            MsgDetectorShow msgDetectorShow = new MsgDetectorShow();
            msgDetectorShow.Show = false;
            // WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_treasure_event2, WwiseMusicPalce.Palce_1st, false, null);
        }
    }
Ejemplo n.º 15
0
    /// <summary>
    /// 技能命中效果
    /// </summary>
    /// <param name="buf"></param>
    private void OnSkillEffect_ServerMessage(IComponentEvent componentEvent)
    {
        S2C_SKILL_EFFECT_Event respond = componentEvent as S2C_SKILL_EFFECT_Event;

        uint MainID = m_GameplayProxy.GetMainPlayerUID();

        SpacecraftEntity caster = m_GameplayProxy.GetEntityById <SpacecraftEntity>(respond.msg.wCasterID) as SpacecraftEntity;
        SpacecraftEntity target = m_GameplayProxy.GetEntityById <SpacecraftEntity>(respond.msg.wTargetHeroID) as SpacecraftEntity;

        if ((caster != null && caster.IsMain()) ||
            (target != null && target.IsMain()) ||
            (caster != null && caster.GetEntityFatherOwnerID() == MainID) ||
            (target != null && target.GetEntityFatherOwnerID() == MainID)
            )
        {
            SkillHurtInfo hurtInfo = MessageSingleton.Get <SkillHurtInfo>();
            hurtInfo.TargetID          = respond.msg.wTargetHeroID;
            hurtInfo.IsCrit            = respond.msg.crit_type != 0;
            hurtInfo.PenetrationDamage = (int)respond.msg.PenetrationDamage;
            hurtInfo.IsDodge           = respond.msg.isdoge != 0;
            hurtInfo.EffectID          = (int)(respond.msg.byAttackEvent == (byte)EffectType.TriggerAnomaly ? respond.msg.wTriggerID : 0);
            hurtInfo.IsWeak            = respond.msg.crit_type == 3;

            for (int iDamage = 0; iDamage < respond.msg.count; iDamage++)
            {
                hurtInfo.Damage = (int)(respond.msg.wDamage / respond.msg.count);
                GameFacade.Instance.SendNotification(NotificationName.SkillHurt, hurtInfo);
            }

            // 采矿的表现 (矿物碎裂)
            SpacecraftEntity currentTargetEntity = m_Property.GetTarget();
            if (currentTargetEntity != null && currentTargetEntity.GetHeroType() == KHeroType.htMine && caster.GetTargetCollider() != null)
            {
                MineDamage mineEvent = new MineDamage();
                mineEvent.HitCollider = caster.GetTargetCollider();
                mineEvent.Damage      = respond.msg.wDamage;
                currentTargetEntity.SendEvent(ComponentEventName.MineDamage, mineEvent);
            }
        }

        if (target && target.IsMain())
        {
            if (m_Property.GetUnderAttackWarningToneCountdown() == 0)
            {
                WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_Be_Attacked, WwiseMusicPalce.Palce_1st, false, null);
            }

            float countDown = m_CfgEternityProxy.GetGamingConfig(1).Value.Sound.Value.CountDown.Value.UnderAttackWarningTone;
            m_Property.SetUnderAttackWarningToneCountdown(countDown);
        }

        /// 播放弱点攻击声音提示
        /// TODO.crit_type暂时没有枚举
        if (caster && caster.IsMain())
        {
            if (m_WeakSoundTmpCD >= m_WeakSoundCD && respond.msg.crit_type == 3)
            {
                float val = Random.value;
                if (val <= m_WeakSoundProbability)
                {
                    SendEvent(ComponentEventName.PlayVideoSound, new PlayVideoSound()
                    {
                        GroupID = (int)m_CfgEternityProxy.GetGamingConfig(1).Value.Mine.Value.Sound.Value.WeaknessSoundVideo
                    });
                    m_WeakSoundTmpCD = 0;
                }
            }
        }
    }
Ejemplo n.º 16
0
 private void OnSealEnd(IComponentEvent componentEvent)
 {
     PlayVideoSound((int)m_Cgeternityproxy.GetGamingConfig(1).Value.Treasure.Value.Sound.Value.TreasureRefresh);
 }