/// <summary> /// 存储数据 /// </summary> /// <param name="height">高度</param> /// <param name="maxHeight">最大高度差</param> private void SetHeightTreasure(object obj) { MsgDetectorShow msgDetectorShow = (MsgDetectorShow)obj; m_HeightTreasure = msgDetectorShow.Height; m_DifferenceMax = msgDetectorShow.MaxHeight; if (m_DifferenceMax <= 0) { m_DifferenceMax = 20; } ShowContent(msgDetectorShow.Show); }
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); } }