From 61f490c4b4e1f6add8368393a64db7004922d0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A3=AE2003?= <2384017988@qq.com> Date: Wed, 29 Jul 2026 17:17:14 +0800 Subject: [PATCH] 1 --- .../Scripts/Manager/CreateFishManager.cs | 3 + Assets/MyGame/Scripts/Manager/GameManager.cs | 45 +++ Assets/MyGame/Scripts/Net/APIManager.cs | 4 +- Assets/MyGame/Scripts/Net/WebSocketManager.cs | 4 +- .../Scripts/Net/WebSocketReponseList.cs | 21 ++ Assets/MyGame/Scripts/Turret/SitPosData.cs | 3 + .../TeShuBJ/BaoJiangTSSmallFish.cs | 4 +- .../aa/Game/HHWK/MonsterTSY/DieEffect_TSY.cs | 7 +- .../Game/HHWK/MonsterTSY/EffectZuanTouDie.cs | 316 +++++++++--------- .../HHWK/MonsterTSY/ZDX/HHWK_ZDX_DieEvent.cs | 2 +- .../MonsterTSY/ZDX/UI_baojiang Variant.prefab | 120 +++++++ .../ZDX/UI_baojiang Variant.prefab.meta | 7 + .../MonsterTSY/ZDX/fish_4014 Variant.prefab | 14 + .../aa/UI/Game/GameMainPanel_FishBase.cs | 3 + 14 files changed, 384 insertions(+), 169 deletions(-) create mode 100644 Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab create mode 100644 Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab.meta diff --git a/Assets/MyGame/Scripts/Manager/CreateFishManager.cs b/Assets/MyGame/Scripts/Manager/CreateFishManager.cs index ec220d7b5..9284b7f27 100644 --- a/Assets/MyGame/Scripts/Manager/CreateFishManager.cs +++ b/Assets/MyGame/Scripts/Manager/CreateFishManager.cs @@ -1483,9 +1483,12 @@ public class CreateFishManager : MonoSingleton string fishId = killFish.fishId; // 如果需要的话 Action onScoreAdd = (audioID) => { + long oldGold = sitData.goldNum; // 记录加金币前的值 sitData.goldNum += goldToAdd; // 使用副本,不再依赖 killFish 对象 sitData.tMP_GoldNum.text = sitData.goldNum.ToString(); AudioManager.Instance.PlayerFX(audioID); + // ⭐ 记录金币流水:杀鱼获得金币 + GameManager.LogGoldFlow("KillFish", $"击中鱼原有金币={oldGold} 增加金币=+{goldToAdd} 剩余金币={sitData.goldNum} 鱼ID={fishId} 座位={sitData.posID} 房间={GameManager.Instance.gameData?.roomInfo?.roomId}"); }; //// 加分回调(在金币/加分面板飞完后执行) //Action onScoreAdd = (audioID) => diff --git a/Assets/MyGame/Scripts/Manager/GameManager.cs b/Assets/MyGame/Scripts/Manager/GameManager.cs index d3d3b70ac..edf632c71 100644 --- a/Assets/MyGame/Scripts/Manager/GameManager.cs +++ b/Assets/MyGame/Scripts/Manager/GameManager.cs @@ -256,6 +256,9 @@ public class GameManager : MonoSingleton _logFileWriter = new StreamWriter(logPath, true) { AutoFlush = true }; Application.logMessageReceived += OnLogMessageReceived; Debug.Log($"[GameManager] 日志文件已创建: {logPath}"); + + // 同时初始化金币流水日志文件 + InitGoldFlowWriter(logDir); } catch (Exception e) { @@ -263,6 +266,43 @@ public class GameManager : MonoSingleton } } + // ⭐ 金币流水日志写入器:单独写入"金币流水"文件,格式对齐后端日志 + private StreamWriter _goldFlowWriter; + private void InitGoldFlowWriter(string logDir) + { + try + { + string goldLogPath = Path.Combine(logDir, "金币流水_" + DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss") + ".log"); + _goldFlowWriter = new StreamWriter(goldLogPath, true) { AutoFlush = true }; + _goldFlowWriter.WriteLine($"# 金币流水日志 - 启动于 {DateTime.Now:yyyy-MM-dd HH:mm:ss}"); + _goldFlowWriter.WriteLine($"# 格式: 时间|service=client|INFO|GoldFlow|[金币流水] 玩家=名称(ID) 事件=xxx {描述}"); + _goldFlowWriter.WriteLine(new string('-', 80)); + Debug.Log($"[GameManager] 金币流水日志文件已创建: {goldLogPath}"); + } + catch (Exception e) + { + Debug.LogError($"[GameManager] 初始化金币流水日志失败: {e.Message}"); + } + } + + /// + /// 记录金币流水(供全项目调用) + /// 用法: GameManager.LogGoldFlow("KillFish", $"击中鱼原有金币={oldGold} 增加金币=+{addGold} 剩余金币={newGold} 房间={roomId}"); + /// + public static void LogGoldFlow(string eventName, string description) + { + var inst = Instance; + if (inst == null || inst._goldFlowWriter == null) return; + try + { + string userName = inst.user?.BaseInfo?.userName ?? "未知"; + string userId = inst.user?.id ?? "未知"; + string timeStr = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"); + inst._goldFlowWriter.WriteLine($"{timeStr}|service=client|INFO|GoldFlow|[金币流水] 玩家={userName}({userId}) 事件={eventName} {description}"); + } + catch { /* 写日志失败不影响游戏运行 */ } + } + private void OnLogMessageReceived(string condition, string stackTrace, LogType type) { if (_logFileWriter == null) return; @@ -294,6 +334,11 @@ public class GameManager : MonoSingleton try { _logFileWriter.Flush(); _logFileWriter.Close(); } catch { } _logFileWriter = null; } + if (_goldFlowWriter != null) + { + try { _goldFlowWriter.Flush(); _goldFlowWriter.Close(); } catch { } + _goldFlowWriter = null; + } } public async Task InItLoad() diff --git a/Assets/MyGame/Scripts/Net/APIManager.cs b/Assets/MyGame/Scripts/Net/APIManager.cs index b33132aed..b5250ece2 100644 --- a/Assets/MyGame/Scripts/Net/APIManager.cs +++ b/Assets/MyGame/Scripts/Net/APIManager.cs @@ -21,9 +21,9 @@ namespace Assets.MyGame.Scripts.Net public const string baseURL = "http://47.109.132.12"; #else - public const string baseURL = "http://47.109.132.12"; + //public const string baseURL = "http://47.109.132.12"; - //public const string baseURL = "http://47.109.34.50"; + public const string baseURL = "http://47.109.34.50"; #endif diff --git a/Assets/MyGame/Scripts/Net/WebSocketManager.cs b/Assets/MyGame/Scripts/Net/WebSocketManager.cs index b86414c65..43241002d 100644 --- a/Assets/MyGame/Scripts/Net/WebSocketManager.cs +++ b/Assets/MyGame/Scripts/Net/WebSocketManager.cs @@ -36,9 +36,9 @@ namespace Assets.MyGame.Scripts.Net private const string baseUrl = "ws://47.109.132.12"; #else - private const string baseUrl = "ws://47.109.132.12"; + //private const string baseUrl = "ws://47.109.132.12"; - //private const string baseUrl = "ws://47.109.34.50"; + private const string baseUrl = "ws://47.109.34.50"; #endif public bool isGame = false; diff --git a/Assets/MyGame/Scripts/Net/WebSocketReponseList.cs b/Assets/MyGame/Scripts/Net/WebSocketReponseList.cs index 549f7d24c..390f462f5 100644 --- a/Assets/MyGame/Scripts/Net/WebSocketReponseList.cs +++ b/Assets/MyGame/Scripts/Net/WebSocketReponseList.cs @@ -57,6 +57,14 @@ namespace Assets.MyGame.Scripts.Net /// public static void RoomJoinNotice(string msg) { + // ⭐ 记录金币流水:收到 RoomJoinNotice 推送 + try + { + var notice = JsonConvert.DeserializeObject>(msg).arguments[0]; + GameManager.LogGoldFlow("RoomJoinNotice", $"推送金币={notice.gold} 钻石={notice.diamond} 炮台消耗={notice.cannonMultiple} 座位={notice.position}"); + } + catch { } + string sceneName = ""; UIPanel uIPanel = UIPanel.None; switch (GameManager.Instance.gameData.currGameType) @@ -217,14 +225,25 @@ namespace Assets.MyGame.Scripts.Net { var panel = UIManager.Instance.Get(panelType); if (panel == null || panel.currSitData == null) return; + long oldGold = panel.currSitData.goldNum; panel.currSitData.goldNum = gold; if (panel.currSitData.tMP_GoldNum != null) panel.currSitData.tMP_GoldNum.text = gold.ToString(); + // ⭐ 记录金币流水:后端推送 SyncPlayerGold 修正 + GameManager.LogGoldFlow("SyncPlayerGold", $"推送金币={gold} 修正前金币={oldGold} 差值={gold - oldGold} 座位={panel.currSitData.posID}"); } public static void GetRoomInfoResult(string msg) { //GameManager.Instance.StartGame();RoomChangeResponse var roomData = JsonConvert.DeserializeObject>(msg).arguments[0]; + // ⭐ 记录金币流水:收到 RoomInfo 推送 + if (roomData?.players != null) + { + foreach (var p in roomData.players) + { + GameManager.LogGoldFlow("RoomInfo", $"推送金币={p.gold} 钻石={p.diamond} 炮台消耗={p.cannonMultiple} 座位={p.position} 房间={roomData.roomId}"); + } + } UIHome_BY_SelectRoomLevelPanel.StartGame(roomData); } public static void SyncGameDataResult(string msg) @@ -500,6 +519,8 @@ namespace Assets.MyGame.Scripts.Net { // 标记游戏已结束 WebSocketManager.Instance.isGame = false; + // ⭐ 记录金币流水:退出房间 + GameManager.LogGoldFlow("ExitRoom", $"退出房间 房间={GameManager.Instance.gameData?.currRoomData?.roomId}"); // 关闭游戏连接 WebSocketManager.Instance.Close(SocketType.game); // 拉取最新用户数据,触发 UI 同步更新(金币/钻石/等级/VIP等) diff --git a/Assets/MyGame/Scripts/Turret/SitPosData.cs b/Assets/MyGame/Scripts/Turret/SitPosData.cs index 130e4cde5..34fa9bcd5 100644 --- a/Assets/MyGame/Scripts/Turret/SitPosData.cs +++ b/Assets/MyGame/Scripts/Turret/SitPosData.cs @@ -598,8 +598,11 @@ public class SitPosData : MonoBehaviour { long temp = goldNum - consumeGoldNum * mul; if (temp < 0) return false; + long oldGold = goldNum; goldNum = temp; tMP_GoldNum.text = goldNum.ToString(); + // ⭐ 记录金币流水:开火消耗金币 + GameManager.LogGoldFlow("Fire", $"开火消耗 原有金币={oldGold} 消耗金币=-{consumeGoldNum * mul} 剩余金币={goldNum} 座位={posID} 房间={GameManager.Instance.gameData?.roomInfo?.roomId}"); return true; } diff --git a/Assets/MyGame/aa/Game/DefaultDieEffect/TeShuBJ/BaoJiangTSSmallFish.cs b/Assets/MyGame/aa/Game/DefaultDieEffect/TeShuBJ/BaoJiangTSSmallFish.cs index 693c34231..4b0b68c1b 100644 --- a/Assets/MyGame/aa/Game/DefaultDieEffect/TeShuBJ/BaoJiangTSSmallFish.cs +++ b/Assets/MyGame/aa/Game/DefaultDieEffect/TeShuBJ/BaoJiangTSSmallFish.cs @@ -35,7 +35,7 @@ public class BaoJiangTSSmallFish : MonoBehaviour private Dictionary originalPositions = new Dictionary(); private Dictionary originalScales = new Dictionary(); - public Action JiaFen; + public Action JiaFen; private void Start() { // 保存所有特效的原始位置和缩放 @@ -221,7 +221,7 @@ public class BaoJiangTSSmallFish : MonoBehaviour // 销毁GameObject //Destroy(target.gameObject); - JiaFen?.Invoke(0); + JiaFen?.Invoke(); Destroy(gameObject); } diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/DieEffect_TSY.cs b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/DieEffect_TSY.cs index 64694adad..87e43e393 100644 --- a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/DieEffect_TSY.cs +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/DieEffect_TSY.cs @@ -3,11 +3,10 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public class DieEffect_TSY : BJBase +public class DieEffect_TSY : BJEventBase { public int radius; public int count; - public int paoBei; public float time = 0.5f; [Header("爆奖特效")] @@ -23,7 +22,7 @@ public class DieEffect_TSY : BJBase paoBei = (int)CreateFishManager.Instance.currGameType.currSitData.consumeGoldNum; } - public override void SetCoinCount() + public void SetCoinCount() { StartCoroutine(enumerator()); } @@ -73,7 +72,7 @@ public class DieEffect_TSY : BJBase if (baoJiang != null) { // 计算总奖金 - long totalReward = coinCount; // 可以根据需要修改 + long totalReward = count; // 可以根据需要修改 // 根据枚举类型调用不同的方法 if (effectType == TSBJ.转盘) diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/EffectZuanTouDie.cs b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/EffectZuanTouDie.cs index 412877965..baabf13ed 100644 --- a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/EffectZuanTouDie.cs +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/EffectZuanTouDie.cs @@ -6,195 +6,195 @@ using UnityEngine; public class EffectZuanTouDie : DieEffect_TSY { - public float moveSpeed = 5; - public float desTime = 10f; - Vector3 vector3_startPosition; - public bool isTriggerFirst = true; - MonsterContral target; - public string bulletID; - // Start is called before the first frame update - void Awake() - { - Init(); - //Destroy(gameObject, desTime); - } - /// - /// 对象池用 - /// - public void Init() - { - vector3_startPosition = transform.position; - } - //子弹同步分为两种一种是锁定目标一种是不锁定目标 - // Update is called once per frame - void Update() - { - if (!ismove) - { - return; - } - //方便帧同步 - //currShowTime += Time.deltaTime; - Vector3 targetPoint = transform.up.normalized * moveSpeed * Time.deltaTime; - transform.position +=targetPoint; + //public float moveSpeed = 5; + //public float desTime = 10f; + //Vector3 vector3_startPosition; + //public bool isTriggerFirst = true; + //MonsterContral target; + //public string bulletID; + //// Start is called before the first frame update + //void Awake() + //{ + // Init(); + // //Destroy(gameObject, desTime); + //} + ///// + ///// 对象池用 + ///// + //public void Init() + //{ + // vector3_startPosition = transform.position; + //} + ////子弹同步分为两种一种是锁定目标一种是不锁定目标 + //// Update is called once per frame + //void Update() + //{ + // if (!ismove) + // { + // return; + // } + // //方便帧同步 + // //currShowTime += Time.deltaTime; + // Vector3 targetPoint = transform.up.normalized * moveSpeed * Time.deltaTime; + // transform.position +=targetPoint; - } - public static Quaternion RotationFromVector2(Vector2 dir) - { - float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; - return Quaternion.Euler(0, 0, angle); - } - // 计算反射角度 - Vector2 GetReflectionAngle(Vector2 velocity, Vector2 normal) - { - // 反射向量 - return Vector2.Reflect(velocity.normalized, normal.normalized); + //} + //public static Quaternion RotationFromVector2(Vector2 dir) + //{ + // float angle = Mathf.Atan2(dir.y, dir.x) * Mathf.Rad2Deg; + // return Quaternion.Euler(0, 0, angle); + //} + //// 计算反射角度 + //Vector2 GetReflectionAngle(Vector2 velocity, Vector2 normal) + //{ + // // 反射向量 + // return Vector2.Reflect(velocity.normalized, normal.normalized); - } - public int peng = 7; - public void OnTriggerEnter2D(Collider2D collision) - { + //} + //public int peng = 7; + //public void OnTriggerEnter2D(Collider2D collision) + //{ - if (collision.tag == "Fish") - { + // if (collision.tag == "Fish") + // { - isTriggerFirst = false; - var monster = collision.transform.GetComponentInParent(); - if (peng<=0) - { - StartCoroutine(enumerator()); - } - if (monster.fishenum == FishTypeEnum.普通鱼) - { - CreateFishManager.Instance.Id_DieFish_FX(monster.guid, new RedPacketRecord { Amount = paoBei * monster.monsterData.fishTypeConfig.fishScore }, CreateFishManager.Instance.currGameType.currSitData.transform.position, isLocal: isLocalCoin); - } + // isTriggerFirst = false; + // var monster = collision.transform.GetComponentInParent(); + // if (peng<=0) + // { + // StartCoroutine(enumerator()); + // } + // if (monster.fishenum == FishTypeEnum.普通鱼) + // { + // CreateFishManager.Instance.Id_DieFish_FX(monster.guid, new RedPacketRecord { Amount = paoBei * monster.monsterData.fishTypeConfig.fishScore }, CreateFishManager.Instance.currGameType.currSitData.transform.position, isLocal: isLocalCoin); + // } - } - else if (collision.tag == "Wall") - { - Vector3 v3 = transform.eulerAngles; - peng--; - switch (collision.name) - { - case "up": - v3.z = -v3.z + 180; - break; - case "down": - v3.z = -v3.z + 180; - break; - case "left": - v3.z = -v3.z; - break; - case "right": - v3.z = -v3.z; - break; - default: + // } + // else if (collision.tag == "Wall") + // { + // Vector3 v3 = transform.eulerAngles; + // peng--; + // switch (collision.name) + // { + // case "up": + // v3.z = -v3.z + 180; + // break; + // case "down": + // v3.z = -v3.z + 180; + // break; + // case "left": + // v3.z = -v3.z; + // break; + // case "right": + // v3.z = -v3.z; + // break; + // default: - break; - } + // break; + // } - transform.eulerAngles = v3; + // transform.eulerAngles = v3; - } + // } - } + //} - private void Start() - { - paoBei = (int)CreateFishManager.Instance.currGameType.currSitData.consumeGoldNum; - } + //private void Start() + //{ + // paoBei = (int)CreateFishManager.Instance.currGameType.currSitData.consumeGoldNum; + //} - public override void SetCoinCount() - { - transform.position =CreateFishManager.Instance.currGameType.currSitData.GetBulletStartPos(); - transform.eulerAngles =Vector3.forward* CreateFishManager.Instance.currGameType.currSitData.currentAngle; + //public void SetCoinCount() + //{ + // transform.position =CreateFishManager.Instance.currGameType.currSitData.GetBulletStartPos(); + // transform.eulerAngles =Vector3.forward* CreateFishManager.Instance.currGameType.currSitData.currentAngle; - //StartCoroutine(enumerator()); - } - public GameObject BZ; - bool ismove = true; - public override IEnumerator enumerator() - { - ismove = false; - CreateBaoJiangEffect(); + // //StartCoroutine(enumerator()); + //} + //public GameObject BZ; + //bool ismove = true; + //public override IEnumerator enumerator() + //{ + // ismove = false; + // CreateBaoJiangEffect(); - foreach (Transform item in transform) - { - item.gameObject.SetActive(false); - } - // 在销毁前创建爆奖特效 - BZ.SetActive(true); - yield return new WaitForSeconds(time); + // foreach (Transform item in transform) + // { + // item.gameObject.SetActive(false); + // } + // // 在销毁前创建爆奖特效 + // BZ.SetActive(true); + // yield return new WaitForSeconds(time); - Destroy(gameObject); - } + // Destroy(gameObject); + //} - public void BZOnTriggerEnter2D(Collider2D collision) - { - if (collision.tag == "Fish") - { - var control = collision.transform.GetComponentInParent(); - if (control.fishenum == FishTypeEnum.普通鱼) - { - CreateFishManager.Instance.Id_DieFish_FX(control.guid, new RedPacketRecord { Amount = paoBei * control.monsterData.fishTypeConfig.fishScore }, CreateFishManager.Instance.currGameType.currSitData.transform.position, isLocal: isLocalCoin); - } - } - } + //public void BZOnTriggerEnter2D(Collider2D collision) + //{ + // if (collision.tag == "Fish") + // { + // var control = collision.transform.GetComponentInParent(); + // if (control.fishenum == FishTypeEnum.普通鱼) + // { + // CreateFishManager.Instance.Id_DieFish_FX(control.guid, new RedPacketRecord { Amount = paoBei * control.monsterData.fishTypeConfig.fishScore }, CreateFishManager.Instance.currGameType.currSitData.transform.position, isLocal: isLocalCoin); + // } + // } + //} - private void CreateBaoJiangEffect() - { - if (baoJiangEffectPrefab == null) - { - Debug.LogWarning("爆奖特效预制体未设置!"); - return; - } + //private void CreateBaoJiangEffect() + //{ + // if (baoJiangEffectPrefab == null) + // { + // Debug.LogWarning("爆奖特效预制体未设置!"); + // return; + // } - // 确定父对象:优先用 Inspector 指定的 parentTransform → 否则用统一爆奖父节点 bjEffectRoot - Transform parent = parentTransform != null ? parentTransform : CreateFishManager.Instance.bjEffectRoot; + // // 确定父对象:优先用 Inspector 指定的 parentTransform → 否则用统一爆奖父节点 bjEffectRoot + // Transform parent = parentTransform != null ? parentTransform : CreateFishManager.Instance.bjEffectRoot; - // 获取源对象的世界坐标 - Vector3 sourcePosition = CreateFishManager.Instance.currGameType.currSitData.transform.position; + // // 获取源对象的世界坐标 + // Vector3 sourcePosition = CreateFishManager.Instance.currGameType.currSitData.transform.position; - // 计算生成位置(世界坐标 + 偏移量) - Vector3 spawnPosition = sourcePosition + offsetPosition; + // // 计算生成位置(世界坐标 + 偏移量) + // Vector3 spawnPosition = sourcePosition + offsetPosition; - // 实例化爆奖特效,设置父对象 - GameObject effectObj = Instantiate(baoJiangEffectPrefab, parent); + // // 实例化爆奖特效,设置父对象 + // GameObject effectObj = Instantiate(baoJiangEffectPrefab, parent); - // 设置位置(世界坐标) - effectObj.transform.position = spawnPosition; + // // 设置位置(世界坐标) + // effectObj.transform.position = spawnPosition; - // 重置缩放(避免父对象缩放影响) - effectObj.transform.localScale = Vector3.one; + // // 重置缩放(避免父对象缩放影响) + // effectObj.transform.localScale = Vector3.one; - // 获取BaoJiangTSSmallFish组件 - BaoJiangTSSmallFish baoJiang = effectObj.GetComponent(); - baoJiang.JiaFen = JiaFen; + // // 获取BaoJiangTSSmallFish组件 + // BaoJiangTSSmallFish baoJiang = effectObj.GetComponent(); + // baoJiang.JiaFen = JiaFen; - if (baoJiang != null) - { - // 计算总奖金 - long totalReward = coinCount; // 可以根据需要修改 + // if (baoJiang != null) + // { + // // 计算总奖金 + // long totalReward = coinCount; // 可以根据需要修改 - // 根据枚举类型调用不同的方法 - if (effectType == TSBJ.转盘) - { - // 调用转盘特效(不带图片) - baoJiang.ZP(totalReward, true, null, true); - } - else - { - // 调用爆奖特效 - baoJiang.BJ(totalReward, effectType, true, true); - } - } - } + // // 根据枚举类型调用不同的方法 + // if (effectType == TSBJ.转盘) + // { + // // 调用转盘特效(不带图片) + // baoJiang.ZP(totalReward, true, null, true); + // } + // else + // { + // // 调用爆奖特效 + // baoJiang.BJ(totalReward, effectType, true, true); + // } + // } + //} } \ No newline at end of file diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/HHWK_ZDX_DieEvent.cs b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/HHWK_ZDX_DieEvent.cs index d70ce30bf..1d08a66f8 100644 --- a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/HHWK_ZDX_DieEvent.cs +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/HHWK_ZDX_DieEvent.cs @@ -26,7 +26,7 @@ public class HHWK_ZDX_DieEvent : DieEffect_TSY if (fishLayer == 0) fishLayer = LayerMask.GetMask("Fish"); } - public override void SetCoinCount() + public void SetCoinCount() { StartCoroutine(BombRoutine()); } diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab new file mode 100644 index 000000000..fcff9b547 --- /dev/null +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab @@ -0,0 +1,120 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &5411344393109950423 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 236781439713602893, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_Name + value: UI_baojiang Variant + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_SizeDelta.x + value: 266.4422 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_SizeDelta.y + value: 128.3306 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchoredPosition.x + value: -365.77893 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_AnchoredPosition.y + value: -143.83472 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 685976588209175045, guid: a96966a1d55149a4f83724f224013303, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: a96966a1d55149a4f83724f224013303, type: 3} diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab.meta b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab.meta new file mode 100644 index 000000000..a00876a30 --- /dev/null +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/UI_baojiang Variant.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9ee39999eb28a2a46a9852d14689ac34 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/fish_4014 Variant.prefab b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/fish_4014 Variant.prefab index 42a18f801..99b030043 100644 --- a/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/fish_4014 Variant.prefab +++ b/Assets/MyGame/aa/Game/HHWK/MonsterTSY/ZDX/fish_4014 Variant.prefab @@ -958,16 +958,28 @@ MonoBehaviour: m_EditorClassIdentifier: beilv: 0 guid: + lastMoveLineId: monsterData: die_Score: 0 isDie: 0 fishTypeConfig: fishNumber: fishName: + fishBrief: fishType: 0 fishScore: 0 killWeight: 0 pathList: + fishImage: + fishMultipleDesc: + moveLine: + bezierCurveData: + name: + start: {x: 0, y: 0} + controlPoints: [] + end: {x: 0, y: 0} + moveTime: 0 + moveSpeed: 0 skeleton: {fileID: 0} isSpine: 1 fishTypeID: 13026 @@ -987,7 +999,9 @@ MonoBehaviour: colliderList: [] lockPoint: {fileID: 0} bingDongEffect: {fileID: 0} + createVideoClip: {fileID: 0} rotationPY: 60 + baseMmove: 0 isRotate: 1 isNot1: 0 ischild0: 1 diff --git a/Assets/MyGame/aa/UI/Game/GameMainPanel_FishBase.cs b/Assets/MyGame/aa/UI/Game/GameMainPanel_FishBase.cs index 968937a60..cd6933a4a 100644 --- a/Assets/MyGame/aa/UI/Game/GameMainPanel_FishBase.cs +++ b/Assets/MyGame/aa/UI/Game/GameMainPanel_FishBase.cs @@ -2388,6 +2388,9 @@ public class GameMainPanel_FishBase : GameMainPanel_Base sit.user = user ?? GameManager.Instance.user.id; sit.goldNum = goldNum; sit.consumeGoldNum = consumeGold; + + // ⭐ 记录金币流水:进房初始金币 + GameManager.LogGoldFlow("JoinGame", $"座位={sitNum} 初始金币={goldNum} 钻石={diamondNum} 炮台消耗={consumeGold} 房间={GameManager.Instance.gameData?.currRoomData?.roomId}"); // ⭐ 同步 indexConsume 到后端下发的 cannonMultiple 对应档位,避免加减炮倍时从 0 档跳变 sit.SyncIndexByConsume(consumeGold);