This commit is contained in:
2026-09-06 19:49:25 +08:00
parent 0887d61c5e
commit c2279de46b
13 changed files with 643 additions and 121 deletions
@@ -137,6 +137,11 @@ PrefabInstance:
propertyPath: m_SceneBindings.Array.size
value: 52
objectReference: {fileID: 0}
- target: {fileID: 2040033999707865087, guid: 8d993a4fd5a4fb046b40dbad536b7a58,
type: 3}
propertyPath: m_CameraType
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7135117531682520789, guid: 8d993a4fd5a4fb046b40dbad536b7a58,
type: 3}
propertyPath: m_Name
@@ -145,7 +150,11 @@ PrefabInstance:
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 652263818100002058, guid: 8d993a4fd5a4fb046b40dbad536b7a58,
type: 3}
insertIndex: -1
addedObject: {fileID: 7848859019251403422}
m_SourcePrefab: {fileID: 100100000, guid: 8d993a4fd5a4fb046b40dbad536b7a58, type: 3}
--- !u!4 &8545704189735390681 stripped
Transform:
@@ -153,3 +162,22 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 8569392900590368777}
m_PrefabAsset: {fileID: 0}
--- !u!1 &9214882760689300739 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 652263818100002058, guid: 8d993a4fd5a4fb046b40dbad536b7a58,
type: 3}
m_PrefabInstance: {fileID: 8569392900590368777}
m_PrefabAsset: {fileID: 0}
--- !u!114 &7848859019251403422
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9214882760689300739}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5e9b2b25f1e632c4599192fca059c35a, type: 3}
m_Name:
m_EditorClassIdentifier:
subCamera: {fileID: 0}
@@ -10,6 +10,8 @@ public class ZhanShenTurretData : TurretData
public GameObject JGStartFXPrefab;
[Tooltip("激光命中特效预制体:三发+锁定激活时克隆到每条激光终点(锁定目标身上),跟随目标移动;为空不生成")]
public GameObject JGHitFXPrefab;
[Tooltip("锁定后激光及特效的兜底等待秒数。⭐ 推荐:给 Animator 的 loop 状态加 ZhanShenLaserLoopSMB(或剪辑事件 ZhanShenLaserLoopBegin)→ loop 动画一开始立即显示,此值=事件超时兜底(忘配事件时到期强制显示);没配通知 → 锁定后等此秒数;0=锁定立即显示")]
public float laserFXDelay = 0f;
[Tooltip("主激光起点偏移:turretRotate 的本地偏移(子对象语义),⭐ 跟随炮台旋转(炮口转向时起点绕炮台中心转)。编辑器运行时用 Gizmo 可视化")]
public Vector2 selfOffsetJGStart;
[Tooltip("下方座位战神初始旋转(欧拉角,直接设置,覆盖该战神预制体原始旋转)。全0=保持默认朝向")]
@@ -506,6 +506,126 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &1237163540679585098
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 30234731632467565}
- component: {fileID: 5618320976082588385}
- component: {fileID: 5108668366163147272}
- component: {fileID: 7445390460839006588}
m_Layer: 0
m_Name: "\u706B\u7BAD\u70AE (1)"
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &30234731632467565
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237163540679585098}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3418187487958222709}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 146, y: 41.00003}
m_SizeDelta: {x: 56, y: 65}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5618320976082588385
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237163540679585098}
m_CullTransparentMesh: 1
--- !u!114 &5108668366163147272
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237163540679585098}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 638fc00fa614e5b45adc9bba44e51fc2, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &7445390460839006588
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1237163540679585098}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 5108668366163147272}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &1415106569199334770
GameObject:
m_ObjectHideFlags: 0
@@ -1125,7 +1245,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &966918329599162766
RectTransform:
m_ObjectHideFlags: 0
@@ -1600,6 +1720,7 @@ GameObject:
- component: {fileID: 3242771395849007486}
- component: {fileID: 8399734338619163169}
- component: {fileID: 4411364332433567204}
- component: {fileID: 8189852858653772438}
m_Layer: 0
m_Name: BY_PlaneInfoPanel2_2
m_TagString: Untagged
@@ -1620,11 +1741,11 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2861674384811660399}
m_Father: {fileID: 7527726093839587972}
m_Father: {fileID: 3418187487958222709}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 37.5, y: -37.5}
m_AnchoredPosition: {x: 226.50006, y: 31.50003}
m_SizeDelta: {x: 59, y: 59}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8399734338619163169
@@ -1665,6 +1786,50 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &8189852858653772438
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2729206130735486637}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 0}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &2747839016857675671
GameObject:
m_ObjectHideFlags: 0
@@ -1818,7 +1983,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &4872858186932663876
RectTransform:
m_ObjectHideFlags: 0
@@ -2201,6 +2366,8 @@ RectTransform:
m_Children:
- {fileID: 6179904624558036843}
- {fileID: 8411145987696489567}
- {fileID: 3418187487958222709}
- {fileID: 7527726093839587972}
m_Father: {fileID: 3138140027130194899}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
@@ -2529,7 +2696,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1658599604891707822
RectTransform:
m_ObjectHideFlags: 0
@@ -3225,6 +3392,43 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3962798868576300119
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3418187487958222709}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &3418187487958222709
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3962798868576300119}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 30234731632467565}
- {fileID: 3242771395849007486}
m_Father: {fileID: 4157707394587686599}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5104914153855343163
GameObject:
m_ObjectHideFlags: 0
@@ -3828,7 +4032,6 @@ RectTransform:
- {fileID: 2545608454910311989}
- {fileID: 497596414762155880}
- {fileID: 1879494577659713210}
- {fileID: 7527726093839587972}
- {fileID: 3433352529253515539}
- {fileID: 5816384311464088319}
- {fileID: 1896414540329859800}
@@ -3872,13 +4075,14 @@ MonoBehaviour:
btn_QuXiao: {fileID: 4864175864556557908}
sceneName: FLZY
gameType: 1
propConfigData: {fileID: 11400000, guid: 2d8fe2d5eb5e28e4daa6dda98ef29515, type: 2}
btn_Prop: {fileID: 5439518459077839740}
obj_PropItemParent: {fileID: 0}
obj_PropItemParent: {fileID: 8403587544304210148}
obj_PropPanel: {fileID: 8403587544304210148}
tmp_PropItem: {fileID: 0}
tmp_PropTwoItemParent: {fileID: 0}
tmp_PropTwoPanel: {fileID: 0}
tmp_PropTwoItem: {fileID: 0}
tmp_PropItem: {fileID: 1237163540679585098}
tmp_PropTwoItemParent: {fileID: 8165664294677491038}
tmp_PropTwoPanel: {fileID: 8165664294677491038}
tmp_PropTwoItem: {fileID: 2729206130735486637}
dalaba: {fileID: 0}
zhanhuanka: {fileID: 0}
huojianpao: {fileID: 0}
@@ -4082,7 +4286,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &252166164923714290
RectTransform:
m_ObjectHideFlags: 0
@@ -6108,13 +6312,12 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3242771395849007486}
m_Father: {fileID: 8080891624328096898}
m_Children: []
m_Father: {fileID: 4157707394587686599}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 213.00006, y: 25.5}
m_AnchoredPosition: {x: 161.00006, y: 81.50003}
m_SizeDelta: {x: 75, y: 75}
m_Pivot: {x: -0.00000016950071, y: 0.5}
--- !u!222 &5669242854715313024
@@ -86,6 +86,7 @@ using Assets.MyGame.Scripts.Net.API;
using Assets.MyGame.Scripts.Net.API.UserData_SubClass;
using Assets.MyGame.Scripts.Net.APIResponses.Enum;
using Assets.MyGame.Scripts.Net.WebResponses;
using Assets.Framework.Tool;
using DG.Tweening;
using Newtonsoft.Json;
using Spine.Unity;
@@ -326,6 +327,9 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
item.btn_TurretAdd.gameObject.SetActive(false);
if (item.btn_TurretMinus != null)
item.btn_TurretMinus.gameObject.SetActive(false);
// ⭐ 自动攻击开关与加减倍按钮一样:非本地座位隐藏
if (item.toggle_AutoAttack != null)
item.toggle_AutoAttack.gameObject.SetActive(false);
}
}
@@ -1496,9 +1500,6 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
_propListBuilt = true;
if (propConfigData == null || tmp_PropItem == null || obj_PropItemParent == null) return;
// ⭐ 模板是场景内对象时先隐藏(引用指向预制体资产时 scene 无效,不能 SetActive 以免改资产)
if (tmp_PropItem.scene.IsValid()) tmp_PropItem.SetActive(false);
for (int i = 0; i < propConfigData.props.Count; i++)
{
var cfg = propConfigData.props[i];
@@ -1513,7 +1514,8 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
}
/// <summary>
/// 点击一级道具:在 tmp_PropTwoPanel 内按配置展开二级子道具列表
/// 点击一级道具:清空后按配置的 propType 读取后端已拥有道具(user.props),
/// 动态展开到二级 tmp_PropTwoPanel(每次点击都重建,保证数量/种类最新)
/// </summary>
private void ShowPropTwo(PropItemData cfg)
{
@@ -1527,42 +1529,108 @@ public class GameMainPanel_FishBase : GameMainPanel_Base
Destroy(child);
}
// ⚠ 注意:这里判断的是 tmp_PropTwoItem(不是 tmp_PropItem)
if (tmp_PropTwoItem.scene.IsValid()) tmp_PropTwoItem.SetActive(false);
foreach (var sub in cfg.subProps)
// ⭐ 读取后端道具:按一级道具配置的类型过滤(none = 显示全部),只显示 count > 0 的
var matched = new List<BaseProductCount>();
var props = GameManager.Instance.user?.props;
if (props != null)
{
foreach (var p in props)
{
if (p == null || p.count <= 0) continue;
if (cfg.propType != PropEnum.none && p.type != (int)cfg.propType) continue;
matched.Add(p);
}
}
// ⭐ 只有 1 个时不用弹二层,直接触发该道具的使用效果
if (matched.Count == 1)
{
UsePropEffect(matched[0]);
return;
}
foreach (var p in matched)
{
if (sub == null) continue;
var item = Instantiate(tmp_PropTwoItem, tmp_PropTwoItemParent.transform);
SetPropItemText(item, sub.name);
SetPropItemIcon(item, sub.icon);
var data = sub;
SetPropItemText(item, $"{p.name} x{p.count}");
SetPropItemIconUrl(item, p.imageUrl);
var data = p; // 闭包捕获当前项
var btn = GetPropItemButton(item);
if (btn != null) btn.onClick.AddListener(() => UsePropEffect(data));
}
// 该类型下没有已拥有道具时给出占位提示
if (matched.Count == 0)
{
var empty = Instantiate(tmp_PropTwoItem, tmp_PropTwoItemParent.transform);
SetPropItemText(empty, "暂无道具");
}
tmp_PropTwoPanel.SetActive(true);
}
/// <summary>
/// 点击二级子道具:按枚举 effectType 分发效果(未接入的类型统一提示)
/// 点击二级子道具:按后端道具类型(PropEnum)触发使用效果
/// (刮刮卡/大喇叭/召唤卡/VIP经验 有实际流程,装备与碎片类不支持在游戏内使用,给予提示)
/// </summary>
private void UsePropEffect(SubPropData sub)
private void UsePropEffect(BaseProductCount p)
{
if (sub == null) return;
switch (sub.effectType)
if (p == null) return;
switch ((PropEnum)p.type)
{
case PropEffectType.大喇叭:
case PropEnum.大喇叭:
if (obj_DaLaBaPanel != null) obj_DaLaBaPanel.SetActive(true);
break;
case PropEffectType.召唤卡:
case PropEnum.召唤卡:
OnClickZhanHuanKa();
break;
case PropEnum.刮刮卡:
// 与 btn_GuaGuaKa 同流程:打开刮刮卡面板
subUIManager.ShowAsync(UIPanel.GuaGuaKa);
break;
case PropEnum.VIP经验:
// 游戏内简化为一次使用1个(背包里支持滑条选数量)
var typeName = string.IsNullOrEmpty(p.name) ? PropEnum.VIP经验.ToString() : p.name;
UIManager.Instance.ShowTiShi($"确定使用1个{typeName}吗?", () =>
{
APIRequestList.UseVipExp(1, (result) =>
{
UIManager.Instance.ShowBoardError(string.IsNullOrEmpty(result) ? "使用成功" : result);
// 刷新用户数据,同步道具数量与VIP经验
APIRequestList.GetUser((user) =>
{
if (user != null)
GameManager.Instance.UpdataUserData(user);
});
});
});
break;
case PropEnum.改名卡:
UIManager.Instance.ShowBoardError("改名卡请到主界面背包中使用");
break;
default:
UIManager.Instance.ShowBoardError($"[{sub.effectType}] 效果暂未接入");
// 装备/碎片等道具没有游戏内使用流程
UIManager.Instance.ShowBoardError($"[{(PropEnum)p.type}] 暂不支持在游戏内使用");
break;
}
}
/// <summary>克隆项图标:按后端 imageUrl 下载(与背包面板同惯例,回调时判空防已销毁)</summary>
private void SetPropItemIconUrl(GameObject item, string imageUrl)
{
if (string.IsNullOrEmpty(imageUrl)) return;
var img = item.transform.childCount > 0 ? item.transform.GetChild(0).GetComponent<Image>() : null;
if (img == null) img = item.GetComponent<Image>();
if (img == null) img = item.GetComponentInChildren<Image>();
if (img == null) return;
WebTool.DownImage(APIManager.baseURL + imageUrl, (texture) =>
{
if (item == null || img == null) return;
if (texture != null)
img.sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector2.one * 0.5f);
});
}
/// <summary>克隆项文本:优先取 child0 的 TMP,再退回自身/子级查找(与表情列表同惯例)</summary>
private void SetPropItemText(GameObject item, string text)
{
@@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7af095737098abf4a82d9f3aec2acd56, type: 3}
m_Name: LeftPropConfigData
m_EditorClassIdentifier:
props:
- name: "\u522E\u522E\u5361"
icon: {fileID: 21300000, guid: 22d1d87308197904daf37acd8018b57a, type: 3}
desc:
propType: 7
- name: "\u53EC\u5524\u5361"
icon: {fileID: 21300000, guid: 51e6fb12f3138424b8ed70848955769d, type: 3}
desc:
propType: 11
- name: "\u5927\u5587\u53ED"
icon: {fileID: 21300000, guid: 36cce6bf8fda6624fba6241dfdade24e, type: 3}
desc:
propType: 9
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2d8fe2d5eb5e28e4daa6dda98ef29515
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
+8 -45
View File
@@ -3,24 +3,9 @@ using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 道具效果类型(一级/二级道具共用,配置时下拉选择),
/// 具体效果在 GameMainPanel_FishBase.UsePropEffect 按枚举分发。
/// 一级道具条目(左侧道具菜单主列表,ScriptableObject 手动配置)。
/// 点击一级道具时,按 propType 读取后端已拥有道具(user.props)动态展开到第二层。
/// </summary>
public enum PropEffectType
{
无 = 0,
火箭炮 = 1,
激光炮 = 2,
冰冻 = 3,
锁定 = 4,
闪电 = 5,
护盾 = 6,
速射 = 7,
召唤卡 = 8,
大喇叭 = 9,
}
/// <summary>一级道具条目(左侧道具菜单主列表)</summary>
[Serializable]
public class PropItemData
{
@@ -33,41 +18,19 @@ public class PropItemData
[Tooltip("描述(备用字段)")]
[TextArea] public string desc;
[Tooltip("效果类型(枚举选择)")]
public PropEffectType effectType = PropEffectType.无;
[Tooltip("二级子道具(点击一级道具后展开的细节列表)")]
public List<SubPropData> subProps = new List<SubPropData>();
}
/// <summary>二级子道具条目(细节)</summary>
[Serializable]
public class SubPropData
{
[Tooltip("子道具名")]
public string name;
[Tooltip("图标(可不填)")]
public Sprite icon;
[Tooltip("描述(备用字段)")]
[TextArea] public string desc;
[Tooltip("效果类型(枚举选择,点击子道具时按此分发效果)")]
public PropEffectType effectType = PropEffectType.无;
[Tooltip("效果参数(次数/时长/倍率等,按效果自定义含义)")]
public int param;
[Tooltip("对应后端道具类型(none = 不过滤,展开显示全部已拥有道具)")]
public PropEnum propType = PropEnum.none;
}
/// <summary>
/// 左侧道具菜单配置资产(ScriptableObject),手动配置:
/// 左侧道具菜单配置资产(ScriptableObject),只手动配置第一层:
/// Assets 右键 → Create → MyGame → 左侧道具配置 生成 .asset,
/// 填好一级道具与二级子道具后,拖到 GameMainPanel_FishBase 的 propConfigData 字段。
/// 填好一级道具(枚举选后端道具类型)后,拖到 GameMainPanel_FishBase 的 propConfigData 字段。
/// 第二层子道具由后端道具数据动态展开,无需配置。
/// </summary>
[CreateAssetMenu(fileName = "PropConfigData", menuName = "MyGame/左侧道具配置", order = 0)]
public class PropConfigData : ScriptableObject
{
[Header("一级道具列表(顺序 = 菜单显示顺序)")]
[Header("一级道具列表(顺序 = 菜单显示顺序,第二层读后端道具动态展开)")]
public List<PropItemData> props = new List<PropItemData>();
}
+148 -28
View File
@@ -6324,7 +6324,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &9060029959765500742
RectTransform:
m_ObjectHideFlags: 0
@@ -6597,7 +6597,7 @@ GameObject:
m_Component:
- component: {fileID: 7260207937314948868}
- component: {fileID: 1313386240513734262}
- component: {fileID: 5881680565191952735}
- component: {fileID: 8139260103101390892}
m_Layer: 0
m_Name: "\u51FA\u6218"
m_TagString: Untagged
@@ -6632,7 +6632,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5875793647059852209}
m_CullTransparentMesh: 1
--- !u!114 &5881680565191952735
--- !u!114 &8139260103101390892
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -6641,7 +6641,7 @@ MonoBehaviour:
m_GameObject: {fileID: 5875793647059852209}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
@@ -6652,16 +6652,76 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 892bb04876732ec4fb32653cc36d15ab, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
m_text: "\u5378\u4E0B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5d4a713fdd931db4c9ce49f068b54e0a, type: 2}
m_sharedMaterial: {fileID: 3593458263369068374, guid: 5d4a713fdd931db4c9ce49f068b54e0a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294141916
m_fontColor: {r: 0.86274517, g: 0.4039216, b: 0.95294124, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 49.01
m_fontSizeBase: 49.01
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5943681652745722606
GameObject:
m_ObjectHideFlags: 0
@@ -9159,7 +9219,7 @@ GameObject:
m_Component:
- component: {fileID: 1020133433211123557}
- component: {fileID: 4838742201677919474}
- component: {fileID: 377281964869597039}
- component: {fileID: 2119704952807942442}
m_Layer: 0
m_Name: "\u51FA\u6218"
m_TagString: Untagged
@@ -9194,7 +9254,7 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7979940040961748334}
m_CullTransparentMesh: 1
--- !u!114 &377281964869597039
--- !u!114 &2119704952807942442
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -9203,7 +9263,7 @@ MonoBehaviour:
m_GameObject: {fileID: 7979940040961748334}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
@@ -9214,16 +9274,76 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1f307c0630c440b46a5aa0333fe8b9a5, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
m_text: "\u5378\u4E0B"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 5d4a713fdd931db4c9ce49f068b54e0a, type: 2}
m_sharedMaterial: {fileID: 3593458263369068374, guid: 5d4a713fdd931db4c9ce49f068b54e0a,
type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4292537607
m_fontColor: {r: 0.027450982, g: 0.9294118, b: 0.854902, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 45.1
m_fontSizeBase: 45.1
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8001734406839140849
GameObject:
m_ObjectHideFlags: 0
@@ -9424,7 +9544,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 9}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &4511948263627284475
MonoBehaviour: