コード例 #1
0
    /// <summary>
    /// 清空AI信息
    /// </summary>
    private void Destroy(ulong aiuid)
    {
        if (m_AIBossState.ContainsKey(aiuid))
        {
            DestroySoundBox(aiuid);
            m_AIBossState.Remove(aiuid);
        }

        if (m_AICallMonsterDic.ContainsKey(aiuid))
        {
            m_AICallMonsterDic.Remove(aiuid);
        }
        if (m_NeedShowFound.ContainsKey(aiuid))
        {
            m_NeedShowFound.Remove(aiuid);
        }
        if (m_NearbyAIVoicTimeDic.ContainsKey(aiuid))
        {
            m_NearbyAIVoicTimeDic.Remove(aiuid);
        }

        if (m_CurrentAIUid == aiuid)
        {
            m_CurrentAIUid = 0;
            if (IsInAIArea() && !m_IsPlayIngAIEnd)
            {
                WwiseUtil.PlaySound((int)SoundID.AIAreaEnd, false, null);
                m_IsPlayIngAIEnd = true;
            }
        }
    }
コード例 #2
0
 /// <summary>
 /// 播放音效
 /// </summary>
 /// <param name="soundID">音效ID</param>
 protected void PlaySound(int soundID)
 {
     if (soundID != 0)
     {
         WwiseUtil.PlaySound(soundID, false, null);
     }
 }
コード例 #3
0
ファイル: MissionProxy.cs プロジェクト: mengtest/RewriteFrame
    /// <summary>
    /// 收到任务
    /// </summary>
    /// <param name="tid"></param>
    /// <param name="uid"></param>
    public void OnReciveMissionList(uint tid, ulong uid)
    {
        if (AllMissionList.ContainsKey(uid))
        {
            return;
        }

        MissionData mission = GetCfgMissionProxy().GetMissionByKey(tid);

        if (m_CanAcceptMissions.TryGetValue(tid, out MissionVO missionVO))
        {
            //从可接可借列表移除
            m_CanAcceptMissions.Remove(tid);
        }
        else        //如果不在可接列表的 (比如进入fb的时候 发来一个任务)
        {
            //创建任务
            missionVO = CreateMission(tid);
        }
        missionVO.Uid          = uid;
        missionVO.MissionState = MissionState.Going;
        AllMissionList.Add(uid, missionVO);
        AllMissionDic[(MissionType)mission.Type].Add(uid, missionVO);


        #region 音效
        ////HACK gaoyu
        //这是一个最终需求么? by 张子华
        if (missionVO.MissionMainConfig.HasValue && missionVO.MissionMainConfig.Value.StartBGM > 0)
        {
            WwiseUtil.PlaySound(missionVO.MissionMainConfig.Value.StartBGM, false, null);
        }
        #endregion
    }
コード例 #4
0
    /// <summary>
    /// 显示设备死亡特效
    /// </summary>
    /// <param name="componentEvent"></param>
    //   private void OnShowDeviceDeadFX(IComponentEvent componentEvent)
    //{
    //	if (m_Presentation.DeathFXAddressList.Count == 0)
    //		return;

    //	EffectController deathFX = EffectManager.GetInstance().CreateEffect(m_Presentation.DeathFXAddressList[0], EffectManager.GetEffectGroupNameInSpace(false));
    //	deathFX.transform.SetParent(m_Property.GetSkinRootTransform(), false);
    //	deathFX.SetCreateForMainPlayer(false);
    //}

    /// <summary>
    /// 战斗状态提示音效.
    /// 提示音的英语不会写-_-
    /// </summary>
    /// <param name="audioID"></param>
    private void PlayBattleStateAudio(WwiseMusicSpecialType SpecialType)
    {
        if (m_Property.IsMain() && !m_Property.IsDead())
        {
            WwiseUtil.PlaySound(WwiseManager.voiceComboID, SpecialType, WwiseMusicPalce.Palce_1st, false, null);
        }
    }
コード例 #5
0
 private void OnDisable()
 {
     if (Application.isPlaying && isOblique)
     {
         WwiseUtil.PlaySound(SoundStopID, false, null);
     }
 }
コード例 #6
0
 /// <summary>
 /// 播放面板关闭音效
 /// </summary>
 public void PlayPanelCloseSound()
 {
     if (PanelCloseSoundID > 0)
     {
         WwiseUtil.PlaySound(PanelCloseSoundID, false, null);
     }
 }
コード例 #7
0
 /// <summary>
 /// 播放音效。
 /// </summary>
 private void PlayAudio()
 {
     if (IsBattling())
     {
         WwiseUtil.PlaySound((int)WwiseMusic.Music_Hud_SkillKey_Switch, false, null);
     }
 }
コード例 #8
0
    public override void OnShow(object msg)
    {
        base.OnShow(msg);

        //背景音乐切换
        WwiseUtil.PlaySound((int)WwiseMusic.Music_BGM_LoginGame, false, null);
    }
コード例 #9
0
    private void OnShowDeadExplosionFx(IComponentEvent obj)
    {
        Model model = m_Cgeternityproxy.GetItemModelByKey(m_SpacecraftSoundProperty.GetItemID());

        if (model.DieSound > 0)
        {
            PlaySound((int)model.DieSound, m_SpacecraftSoundProperty.GetRootTransform());
        }
        //else
        //{
        /// TODO 系统语音
        //	if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htPlayer)
        //	{
        //		WwiseUtil.PlaySound(m_MusicComboID, WwiseMusicSpecialType.SpecialType_Die_End, m_WwiseMusicPalce, false, m_SpacecraftSoundProperty.GetRootTransform());
        //	}
        //	/// TODO.死亡爆炸音效先写死
        //	else if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htMonster
        //		|| m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htDisturbor
        //		|| m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htNormalChestGuard
        //		|| m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htRareChestGuard)
        //	{
        //		WwiseUtil.PlaySound((int)WwiseMusic.Music_Npc_Dead_End, false, m_SpacecraftSoundProperty.GetRootTransform());
        //	}
        //}

        //语音
        if (m_SpacecraftSoundProperty.IsMain())
        {
            WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_Ship_Destroyed, WwiseMusicPalce.Palce_1st, false, null);
        }
    }
コード例 #10
0
    public void AddEffect(bool isStay = false)
    {
        if (!m_PackageBoxAttr.HasValue || m_DropItemState == DropItemState.None)
        {
            return;
        }

        if (m_DropItemState == DropItemState.Born)
        {
            EffectController bornFxInstance = EffectManager.GetInstance().CreateEffect(m_PackageBoxAttr.Value.RefreshGfx, EffectManager.GetEffectGroupNameInSpace(false));
            bornFxInstance.transform.position = gameObject.transform.position;
            WwiseUtil.PlaySound((int)WwiseMusic.DropItem_Bron, false, bornFxInstance.transform.position);
            bornFxInstance.SetCreateForMainPlayer(false);

            m_StayFxInstance = EffectManager.GetInstance().CreateEffect(m_PackageBoxAttr.Value.ContinuousGfx, EffectManager.GetEffectGroupNameInSpace(false));
            m_StayFxInstance.transform.SetParent(gameObject.transform, false);
            m_StayFxInstance.SetCreateForMainPlayer(false);
        }
        else if (m_DropItemState == DropItemState.Stay && isStay)
        {
            m_StayFxInstance = EffectManager.GetInstance().CreateEffect(m_PackageBoxAttr.Value.ContinuousGfx, EffectManager.GetEffectGroupNameInSpace(false));
            m_StayFxInstance.transform.SetParent(gameObject.transform, false);
            m_StayFxInstance.SetCreateForMainPlayer(false);
        }
        else if (m_DropItemState == DropItemState.Gather)
        {
            RemoveStayFx();

            m_GatherFxInstance = EffectManager.GetInstance().CreateEffect(m_PackageBoxAttr.Value.PickUpGfx, EffectManager.GetEffectGroupNameInSpace(false));
            m_GatherFxInstance.transform.position = gameObject.transform.position;
            m_GatherFxInstance.SetCreateForMainPlayer(false);
        }
    }
コード例 #11
0
    public void PlayComboSound(EnumSoundComboType type, string key)
    {
        int comboID = GetModelComboID();

        if (comboID == 0)
        {
            BehaviorManager.Instance.LogFormat(m_Agent, $"PlayComboSound comboID:{comboID} not have comboID in model.csv");
            return;
        }
        int            soundID = (int)type;
        SoundComboData data    = m_CfgEternityProxy.GetSoundComboDataByKeyAndType(comboID, soundID);
        bool           canPlay = (data.Place == 1 && m_Property.IsMain()) || data.Place == 3;

        if (canPlay)
        {
            Sound?     sound      = m_CfgEternityProxy.GetSoundByKey((uint)data.MusicId);
            SoundEvent soundEvent = m_CfgEternityProxy.GetSoundEvent((uint)sound.Value.EventId);
            WwiseUtil.PlaySound(comboID, (WwiseMusicSpecialType)soundID, m_Property.IsMain() ? WwiseMusicPalce.Palce_1st : WwiseMusicPalce.Palce_3st, false, soundEvent.Type ? m_Property.GetRootTransform() : null,
                                (object obj) =>
            {
                if (!string.IsNullOrEmpty(key) && m_Index.ContainsKey(key))
                {
                    m_Index[key]++;
                }
            });
        }
        BehaviorManager.Instance.LogFormat(m_Agent, $"PlayComboSound comboID:{comboID} type:{type} canPlay:{canPlay}");
    }
コード例 #12
0
    /// <summary>
    /// 处理删除角色热键回调
    /// </summary>
    /// <param name="callbackContext"></param>
    private void OnDeleteHotkeyCallback(HotkeyCallback callbackContext)
    {
        if (callbackContext.performed)
        {
            WwiseUtil.PlaySound((int)WwiseMusic.Music_deleteRole_Over, false, null);
            OpenParameter openParameter = new OpenParameter();
            openParameter.Title   = TableUtil.GetLanguageString("common_text_id_1018");
            openParameter.Content = string.Format(TableUtil.GetLanguageString("common_text_id_1017"),
                                                  m_ServerListProxy.GetCurrentCharacterVO().Name, m_ServerListProxy.GetCurrentCharacterVO().Level);
            openParameter.backgroundColor = BackgroundColor.Error;

            HotKeyButton HotKeyQuit = new HotKeyButton();
            HotKeyQuit.actionName = HotKeyID.FuncX;
            HotKeyQuit.showText   = TableUtil.GetLanguageString("common_hotkey_id_1001");
            HotKeyQuit.onEvent    = OnSubmitDeleteCharacter;

            HotKeyButton HotKeyCancel = new HotKeyButton();
            HotKeyCancel.actionName = HotKeyID.FuncB;
            HotKeyCancel.showText   = TableUtil.GetLanguageString("common_hotkey_id_1002");
            HotKeyCancel.onEvent    = OnCancelDeleteCharacter;

            openParameter.HotkeyArray = new HotKeyButton[] { HotKeyQuit, HotKeyCancel };
            UIManager.Instance.OpenPanel(UIPanel.ConfirmPanel, openParameter);
            WwiseUtil.PlaySound((int)WwiseMusic.Music_Panel_PopupPanel_Open, false, null);
        }
    }
コード例 #13
0
    /// <summary>
    /// 播放预警音效
    /// </summary>
    private void PlayForeWarnVoice(bool isplay)
    {
        if (!CanPalyNormalBattle())
        {
            return;
        }

        if (isplay && !m_AreadyPlayForeWarn)
        {
            m_AreadyPlayForeWarn = true;
            if (IsInAIArea())
            {
                WwiseUtil.PlaySound((int)SoundID.CombatWranEnd, false, null);
                WwiseUtil.PlaySound((int)SoundID.CombatEnd, false, null);
                WwiseUtil.PlaySound((int)SoundID.AIAreaWran, false, null);
            }
            else
            {
                WwiseUtil.PlaySound((int)SoundID.CombatWranOpen, false, null);
            }
        }
        else if (!isplay && m_AreadyPlayForeWarn)         // && !m_PlayerInBattle? 预警未必代表加入仇恨
        {
            if (IsInAIArea())
            {
                WwiseUtil.PlaySound((int)SoundID.AIAreaEnd, false, null);
            }
            else
            {
                m_AreadyPlayForeWarn = false;
                WwiseUtil.PlaySound((int)SoundID.CombatWranEnd, false, null);
            }
        }
    }
コード例 #14
0
 /// <summary>
 /// 播放撤退语音2  在撤退语音1播放完
 /// </summary>
 private void DelayToPlayRetreat2()
 {
     if (m_AIBossState[m_CurrentAIUid].m_AIPlotState == AIPlotState.MonsterRetreat)
     {
         WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_GetTheTask, WwiseMusicPalce.Palce_1st, false, null);
     }
 }
コード例 #15
0
 /// <summary>
 /// 取消删除角色
 /// </summary>
 /// <param name="callbackContext"></param>
 private void OnCancelDeleteCharacter(HotkeyCallback callbackContext)
 {
     if (callbackContext.performed)
     {
         WwiseUtil.PlaySound((int)WwiseMusic.Music_Panel_PopupPanel_Close, false, null);
         UIManager.Instance.ClosePanel((ConfirmPanel)Facade.RetrieveMediator(UIPanel.ConfirmPanel));
     }
 }
コード例 #16
0
 public void PlaySound(int soundId)
 {
     if (GetSoundList() != null && GetSoundList().Contains(soundId))
     {
         //Debug.LogError("-------PlaySound----->id = " + soundId);
         WwiseUtil.PlaySound(soundId, false, transform);
     }
 }
コード例 #17
0
    public override void OnShow(object msg)
    {
        base.OnShow(msg);
        StopUpdate();
        MSG_TimeInfo timeInfo = msg as MSG_TimeInfo;

        if (timeInfo != null && timeInfo.time > 0)
        {
            m_TimerText.gameObject.SetActive(true);
            m_CallBackAction = timeInfo.CallbackAction;
            uint   time = timeInfo.time / 1000;
            uint   min  = time / 60;
            uint   sec  = time - 60 * min;
            uint   ssec = timeInfo.time - 60 * min * 1000 - sec * 1000;
            string ms   = min.ToString();
            string ss   = sec.ToString();

            if (min > 0)
            {
                if (sec < 10)
                {
                    ss = 0 + ss;
                }
                m_TimerText.text = ms + ":" + ss;
                if (m_MsTimeGameObject)
                {
                    m_MsTimeGameObject.SetActive(min <= 0 && sec < 10);
                }
            }
            else if (min <= 0)
            {
                if (sec < 10)
                {
                    m_IsPlaySMusic = true;
                    WwiseUtil.PlaySound(51, false, m_TimerText.transform);
                    m_TimerText.text   = ss;
                    m_MsTimerText.text = "." + ssec;
                }
                else
                {
                    m_TimerText.text = ss;
                }
            }

            m_ForeFrameTime = ServerTimeUtil.Instance.GetNowTimeMSEL();
            m_SecondTime    = m_ForeFrameTime;
            m_Timer         = (int)timeInfo.time;
            StartUpdate();
        }
        else
        {
            WwiseUtil.PlaySound(53, false, m_TimerText.transform);
            m_IsPlaySMusic = false;
            m_TimerText.gameObject.SetActive(false);

            m_MsTimeGameObject.SetActive(false);
        }
    }
コード例 #18
0
 private void StopAIActionEffect(EffectController vFX)
 {
     if (vFX != null && vFX == m_AIActionEffect)
     {
         vFX.StopAndRecycleFX();
         WwiseUtil.PlaySound(10008, false, null);
         m_AIActionEffect = null;
     }
 }
コード例 #19
0
 public override void OnHide(object msg)
 {
     base.OnHide(msg);
     if (m_IsPlaySMusic)
     {
         WwiseUtil.PlaySound(53, false, m_TimerText.transform);
         m_IsPlaySMusic = false;
     }
 }
コード例 #20
0
    private void OnRelive(IComponentEvent obj)
    {
        WwiseUtil.PlaySound(m_MusicComboID, WwiseMusicSpecialType.SpecialType_Rebirth, m_WwiseMusicPalce, false, m_SpacecraftSoundProperty.GetRootTransform());

        //语音
        if (m_SpacecraftSoundProperty.IsMain())
        {
            WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_Ship_Reborn, WwiseMusicPalce.Palce_1st, false, null);
        }
    }
コード例 #21
0
 /// <summary>
 /// 显示开锁宝箱提示
 /// </summary>
 public void ShowChestHint()
 {
     if (!IsDead() && !IsLeaping() && !IsWatchOrUIInputMode())
     {
         List <SpacecraftEntity> lockChestList = m_GameplayProxy.GetEntities <SpacecraftEntity>(KHeroType.htLockChest);
         if (lockChestList.Count <= 0)
         {
             if (!m_IsHideChest)
             {
                 Facade.SendNotification(NotificationName.MSG_INTERACTIVE_HIDETIP, HudNpcInteractiveFlagPanel.InteractiveTipType.LockChest);
             }
             m_IsShowChest = false;
             m_IsHideChest = true;
         }
         for (int i = 0; i < lockChestList.Count; i++)
         {
             Npc lockChest = m_CfgEternityProxy.GetNpcByKey(lockChestList[i].GetTemplateID());
             if (Vector3.Distance(lockChestList[i].transform.position, m_MainEntity.transform.position) > lockChest.TriggerRange)
             {
                 m_IsPlaySound = false;
                 m_IsShowChest = false;
                 Facade.SendNotification(NotificationName.MSG_INTERACTIVE_HIDETIP, HudNpcInteractiveFlagPanel.InteractiveTipType.LockChest);
             }
             else if (lockChestList[i].GetIsActive())
             {
                 if (!m_IsPlaySound)
                 {
                     if (IsBattling())
                     {
                         m_IsPlaySound = true;
                         WwiseUtil.PlaySound(WwiseManager.voiceComboID, WwiseMusicSpecialType.SpecialType_Voice_treasure_event4, WwiseMusicPalce.Palce_1st, false, null);
                     }
                 }
                 if (IsBattling())
                 {
                     if (!m_IsShowChest)
                     {
                         Facade.SendNotification(NotificationName.MSG_INTERACTIVE_SHOWTIP, HudNpcInteractiveFlagPanel.InteractiveTipType.LockChest);
                     }
                     m_IsShowChest = true;
                     m_IsHideChest = false;
                 }
                 else
                 {
                     if (!m_IsHideChest)
                     {
                         Facade.SendNotification(NotificationName.MSG_INTERACTIVE_HIDETIP, HudNpcInteractiveFlagPanel.InteractiveTipType.LockChest);
                     }
                     m_IsShowChest = false;
                     m_IsHideChest = true;
                 }
             }
         }
     }
 }
コード例 #22
0
    public override void OnHide(object msg)
    {
        UIManager.Instance.ClosePanel(UIPanel.CharacterModelPanel);
        UIManager.Instance.ClosePanel(UIPanel.CharacterRolePanel);
        UIManager.Instance.ClosePanel(UIPanel.CreateRolePanel);

        base.OnHide(msg);
        WwiseUtil.PlaySound((int)SoundID.LoadEnd, false, null);
        //背景音乐切换
        WwiseUtil.PlaySound((int)WwiseMusic.Music_BGM_ToEnterGame, false, null);
    }
コード例 #23
0
ファイル: WwiseManager.cs プロジェクト: mengtest/RewriteFrame
    /// <summary>
    /// 加载检查
    /// </summary>
    private void FirstBankListLoadOverDetector()
    {
        FirstBankLoadOverCout++;

        if (FirstBankLoadOverCout == WWISE_FirstBankList.Count)
        {
            Debug.Log(" 最先加载bank 列表全部OK ! ");
            //播放主背景音乐
            WwiseUtil.PlaySound((int)WwiseMusic.Music_MainBackgroundMusic, false, null);
        }
    }
コード例 #24
0
 public void SetPlayerIsInBattle(bool playerInBattle)
 {
     /// TODO
     /// 切场景收不到服务端移除仇恨
     /// 客户端强行处理一下
     if (m_PlayerInBattle && !playerInBattle && !IsInAIArea())
     {
         WwiseUtil.PlaySound((int)SoundID.CombatEnd, false, null);
     }
     m_PlayerInBattle = playerInBattle;
 }
コード例 #25
0
    /// <summary>
    /// 创建掉落物协议
    /// </summary>
    /// <param name="respond"></param>
    public void CreateDropItemByRespond(s2cSyncPersonalDrop respond)
    {
        if (respond.DropList.Count <= 0)
        {
            /// Debug.Log("CreateDropItemByRespond:the drop_list.Count <= 0");
            return;
        }

        if (respond.IsMapSync == false)
        {
            int index = Random.Range(0, 2);
            WwiseUtil.PlaySound(WwiseManager.voiceComboID, index == 0 ? WwiseMusicSpecialType.SpecialType_Voice_minera_event3 : WwiseMusicSpecialType.SpecialType_Voice_minera_event4, WwiseMusicPalce.Palce_1st, false, null);
        }

        ulong parentid = 0;

        foreach (var item in respond.DropList)
        {
            string key = item.MapId.ToString() + item.AreaUid.ToString() + item.ChestNpcUid.ToString();
            if (!m_GatherDropItemInfos.ContainsKey(key))
            {
                MineDropItemInfo mineDropItemInfo = new MineDropItemInfo();
                mineDropItemInfo.mapid     = item.MapId;
                mineDropItemInfo.areaid    = item.AreaUid;
                mineDropItemInfo.uid       = item.ChestNpcUid;
                mineDropItemInfo.tid       = item.ChestNpcTid;
                mineDropItemInfo.item_tid  = item.DropItemTid;
                mineDropItemInfo.ship_tlv  = item.ShipTlv;
                mineDropItemInfo.parentid  = item.FromHeroUid;
                mineDropItemInfo.positon_x = item.PositonX;
                mineDropItemInfo.positon_y = item.PositonY;
                mineDropItemInfo.positon_z = item.PositonZ;
                if (parentid == 0)
                {
                    parentid = mineDropItemInfo.parentid;
                }

                uint  mapId  = m_CfgEternityProxy.GetCurrentMapData().GamingmapId;
                ulong aredId = m_GameplayProxy.GetCurrentAreaUid();

                if (mapId == item.MapId && aredId == item.AreaUid)
                {
                    CreateDropItem(key, mineDropItemInfo, respond.IsMapSync == false);
                }
            }
        }

        /// 新掉落播音效
        if (respond.IsDieDrop == false && respond.IsMapSync == false && parentid != 0)
        {
            SpacecraftEntity spacecraftEntity = m_GameplayProxy.GetEntityById <SpacecraftEntity>((uint)parentid);
            spacecraftEntity.SendEvent(ComponentEventName.PlayDropSound, null);
        }
    }
コード例 #26
0
    /// <summary>
    /// 保存AI状态信息
    /// </summary>
    public void SaveAIState(S2C_CHANGE_PLOT_STATE msg)
    {
        ulong       npc_id     = msg.npc_id;
        byte        in_scene   = msg.in_scene;
        AIPlotState plot_state = (AIPlotState)msg.plot_state;

        if (m_CurrentAIUid > 0 && m_CurrentAIUid == npc_id && in_scene > 0)
        {
            m_LastAIUid = m_CurrentAIUid;
            OpenCountDownTimePanel(false);
            if (IsInAIArea() && !m_IsPlayIngAIEnd)
            {
                WwiseUtil.PlaySound((int)SoundID.AIAreaEnd, false, null);
                m_IsPlayIngAIEnd = true;
            }
        }

        /// TODO
        if (m_AIBossState.ContainsKey(m_CurrentAIUid) && m_AIBossState[m_CurrentAIUid].m_AIPlotState == AIPlotState.BeginBossTimeout)
        {
            StopAIActionEffect(m_AIActionEffect);
        }

        if (in_scene == 0 && m_CurrentAIUid == 0)               //==0 means in AI
        {
            m_CurrentAIUid   = npc_id;
            m_IsPlayIngEff   = false;
            m_IsPlayIngAIEnd = false;
        }

        if (m_AIBossState.ContainsKey(npc_id))
        {
            m_AIBossState[npc_id].m_AIPlotState = plot_state;
            m_AIBossState[npc_id].m_InScene     = in_scene;
        }
        else
        {
            AIPlotInfo aIPlotInfo = new AIPlotInfo();
            aIPlotInfo.m_AIPlotState = plot_state;
            aIPlotInfo.m_InScene     = in_scene;
            m_AIBossState.Add(npc_id, aIPlotInfo);
        }

        if (plot_state == AIPlotState.CallingBossSuccess && in_scene > 0)
        {
            m_HasCallBossSuccess = true;
        }

        if (in_scene == 0)
        {
            SendMSAIBossMsgNotify(npc_id, m_PlayerAIState);
        }
    }
コード例 #27
0
 private void OnShowDeadSlidingFx(IComponentEvent obj)
 {
     if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htPlayer)
     {
         WwiseUtil.PlaySound(m_MusicComboID, WwiseMusicSpecialType.SpecialType_Die_Begin, m_WwiseMusicPalce, false, m_SpacecraftSoundProperty.GetRootTransform());
     }
     else if (m_SpacecraftSoundProperty.GetHeroType() == KHeroType.htMonster)
     {
         WwiseUtil.PlaySound((int)WwiseMusic.Music_Npc_Dead_Begin, false, m_SpacecraftSoundProperty.GetRootTransform());
         Log("Music_Npc_Dead_Begin");
     }
 }
コード例 #28
0
 /// <summary>
 /// 播放音效
 /// </summary>
 /// <param name="sound">音效类型</param>
 private void PlaySound(WwiseMusicSpecialType sound)
 {
     //TaskVoiceInfo msg = new TaskVoiceInfo();
     //msg.audioID = (int)sound;
     //msg.isVoice = true;
     //msg.text = "";
     //msg.isReplaceOther = true;
     //msg.place = WwiseMusicPalce.Palce_1st;
     //Facade.SendNotification(NotificationName.Voice, msg);
     /// 超级电脑语音非语音助手
     WwiseUtil.PlaySound(WwiseManager.voiceComboID, sound, WwiseMusicPalce.Palce_1st, false, null);
 }
コード例 #29
0
    /// <summary>
    /// 播放音乐
    /// </summary>
    /// <param name="type">背包类型</param>
    /// <param name="subType">背包子类型</param>
    /// <param name="isAdd">是否添加</param>
    private void PlayerSound(bool isAdd, EquipmentL1 subType)
    {
        WwiseMusic WwiseMusic = 0;

        switch (m_Category)
        {
        case Category.Weapon:
            WwiseMusic = isAdd ? WwiseMusic.Music_WeaponParts_Setup : WwiseMusic.Music_WeaponParts_Disboard;
            break;

        case Category.Reformer:
            WwiseMusic = isAdd ? WwiseMusic.Music_reborner_Setup : WwiseMusic.Music_reborner_Disboard;
            break;

        case Category.Equipment:
            switch (subType)
            {
            case EquipmentL1.Processor:
                WwiseMusic = isAdd ? WwiseMusic.Music_processor_Setup : WwiseMusic.Music_processor_Disboard;
                break;

            case EquipmentL1.Armor:
                WwiseMusic = isAdd ? WwiseMusic.Music_ArmorCoating_Setup : WwiseMusic.Music_ArmorCoating_Disboard;
                break;

            case EquipmentL1.Reactor:
                WwiseMusic = isAdd ? WwiseMusic.Music_reactor_Setup : WwiseMusic.Music_reactor_Disboard;
                break;

            case EquipmentL1.AuxiliaryUnit:
                WwiseMusic = isAdd ? WwiseMusic.Music_auxiliary_Setup : WwiseMusic.Music_auxiliary_Disboard;
                break;

            case EquipmentL1.Nanobot:
                WwiseMusic = isAdd ? WwiseMusic.Music_robot_Setup : WwiseMusic.Music_robot_Disboard;
                break;

            case EquipmentL1.SignalGenerator:
                WwiseMusic = isAdd ? WwiseMusic.Music_amplifier_Setup : WwiseMusic.Music_amplifier_Disboard;
                break;
            }
            break;

        case Category.EquipmentMod:
            WwiseMusic = isAdd ? WwiseMusic.Music_chip_Setup : WwiseMusic.Music_chip_Disboard;
            break;
        }
        if (WwiseMusic != 0)
        {
            WwiseUtil.PlaySound((int)WwiseMusic, false, null);
        }
    }
コード例 #30
0
    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);
        }
    }