feat(技能槽UI): 调整技能槽布局并更新预制件样式
清理了无用的导入语句,调整了MissSkillsComp中的技能槽坐标位置,更新了sbox预制件的图标、文本样式与节点配置,优化界面显示效果。
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -35,19 +35,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 50
|
"__id__": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 56
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": true,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 56
|
"__id__": 62
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__id__": 58
|
"__id__": 64
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 60
|
"__id__": 66
|
||||||
},
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
@@ -87,7 +90,7 @@
|
|||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 3
|
"__id__": 3
|
||||||
@@ -266,7 +269,7 @@
|
|||||||
"__id__": 11
|
"__id__": 11
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 17
|
"__id__": 17
|
||||||
@@ -608,7 +611,7 @@
|
|||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 27
|
"__id__": 27
|
||||||
@@ -783,7 +786,7 @@
|
|||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 35
|
"__id__": 35
|
||||||
@@ -958,7 +961,7 @@
|
|||||||
"__id__": 1
|
"__id__": 1
|
||||||
},
|
},
|
||||||
"_children": [],
|
"_children": [],
|
||||||
"_active": true,
|
"_active": false,
|
||||||
"_components": [
|
"_components": [
|
||||||
{
|
{
|
||||||
"__id__": 43
|
"__id__": 43
|
||||||
@@ -1126,7 +1129,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"__type__": "cc.Node",
|
"__type__": "cc.Node",
|
||||||
"_name": "Label",
|
"_name": "icon",
|
||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"_parent": {
|
"_parent": {
|
||||||
@@ -1145,6 +1148,145 @@
|
|||||||
"_prefab": {
|
"_prefab": {
|
||||||
"__id__": 55
|
"__id__": 55
|
||||||
},
|
},
|
||||||
|
"_lpos": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 35,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_lrot": {
|
||||||
|
"__type__": "cc.Quat",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0,
|
||||||
|
"w": 1
|
||||||
|
},
|
||||||
|
"_lscale": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0.9,
|
||||||
|
"y": 0.9,
|
||||||
|
"z": 1
|
||||||
|
},
|
||||||
|
"_mobility": 0,
|
||||||
|
"_layer": 1073741824,
|
||||||
|
"_euler": {
|
||||||
|
"__type__": "cc.Vec3",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.UITransform",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 50
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 52
|
||||||
|
},
|
||||||
|
"_contentSize": {
|
||||||
|
"__type__": "cc.Size",
|
||||||
|
"width": 78,
|
||||||
|
"height": 78
|
||||||
|
},
|
||||||
|
"_anchorPoint": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "0elb3r0slJwbY2BNC1zTKn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Sprite",
|
||||||
|
"_name": "",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"node": {
|
||||||
|
"__id__": 50
|
||||||
|
},
|
||||||
|
"_enabled": true,
|
||||||
|
"__prefab": {
|
||||||
|
"__id__": 54
|
||||||
|
},
|
||||||
|
"_customMaterial": null,
|
||||||
|
"_srcBlendFactor": 2,
|
||||||
|
"_dstBlendFactor": 4,
|
||||||
|
"_color": {
|
||||||
|
"__type__": "cc.Color",
|
||||||
|
"r": 255,
|
||||||
|
"g": 255,
|
||||||
|
"b": 255,
|
||||||
|
"a": 255
|
||||||
|
},
|
||||||
|
"_spriteFrame": {
|
||||||
|
"__uuid__": "031877cb-0f3d-4e92-bc5d-e492a0d95a08@d17da",
|
||||||
|
"__expectedType__": "cc.SpriteFrame"
|
||||||
|
},
|
||||||
|
"_type": 0,
|
||||||
|
"_fillType": 0,
|
||||||
|
"_sizeMode": 0,
|
||||||
|
"_fillCenter": {
|
||||||
|
"__type__": "cc.Vec2",
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"_fillStart": 0,
|
||||||
|
"_fillRange": 0,
|
||||||
|
"_isTrimmedMode": true,
|
||||||
|
"_useGrayscale": false,
|
||||||
|
"_atlas": {
|
||||||
|
"__uuid__": "031877cb-0f3d-4e92-bc5d-e492a0d95a08",
|
||||||
|
"__expectedType__": "cc.SpriteAtlas"
|
||||||
|
},
|
||||||
|
"_id": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.CompPrefabInfo",
|
||||||
|
"fileId": "075wC9BqZNpKBHWkkHGa0w"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.PrefabInfo",
|
||||||
|
"root": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"asset": {
|
||||||
|
"__id__": 0
|
||||||
|
},
|
||||||
|
"fileId": "a33ReyWcpAoZY5ieotS6Ir",
|
||||||
|
"instance": null,
|
||||||
|
"targetOverrides": null,
|
||||||
|
"nestedPrefabInstanceRoots": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__type__": "cc.Node",
|
||||||
|
"_name": "Label",
|
||||||
|
"_objFlags": 0,
|
||||||
|
"__editorExtras__": {},
|
||||||
|
"_parent": {
|
||||||
|
"__id__": 1
|
||||||
|
},
|
||||||
|
"_children": [],
|
||||||
|
"_active": true,
|
||||||
|
"_components": [
|
||||||
|
{
|
||||||
|
"__id__": 57
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__id__": 59
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"_prefab": {
|
||||||
|
"__id__": 61
|
||||||
|
},
|
||||||
"_lpos": {
|
"_lpos": {
|
||||||
"__type__": "cc.Vec3",
|
"__type__": "cc.Vec3",
|
||||||
"x": 0,
|
"x": 0,
|
||||||
@@ -1180,16 +1322,16 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 50
|
"__id__": 56
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 52
|
"__id__": 58
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
"width": 21.90380859375,
|
"width": 15.123046875,
|
||||||
"height": 58.4
|
"height": 54.4
|
||||||
},
|
},
|
||||||
"_anchorPoint": {
|
"_anchorPoint": {
|
||||||
"__type__": "cc.Vec2",
|
"__type__": "cc.Vec2",
|
||||||
@@ -1208,11 +1350,11 @@
|
|||||||
"_objFlags": 0,
|
"_objFlags": 0,
|
||||||
"__editorExtras__": {},
|
"__editorExtras__": {},
|
||||||
"node": {
|
"node": {
|
||||||
"__id__": 50
|
"__id__": 56
|
||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 54
|
"__id__": 60
|
||||||
},
|
},
|
||||||
"_customMaterial": null,
|
"_customMaterial": null,
|
||||||
"_srcBlendFactor": 2,
|
"_srcBlendFactor": 2,
|
||||||
@@ -1227,8 +1369,8 @@
|
|||||||
"_string": "9",
|
"_string": "9",
|
||||||
"_horizontalAlign": 1,
|
"_horizontalAlign": 1,
|
||||||
"_verticalAlign": 1,
|
"_verticalAlign": 1,
|
||||||
"_actualFontSize": 25,
|
"_actualFontSize": 20,
|
||||||
"_fontSize": 25,
|
"_fontSize": 20,
|
||||||
"_fontFamily": "Arial",
|
"_fontFamily": "Arial",
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_overflow": 0,
|
"_overflow": 0,
|
||||||
@@ -1237,7 +1379,7 @@
|
|||||||
"_isSystemFontUsed": true,
|
"_isSystemFontUsed": true,
|
||||||
"_spacingX": 0,
|
"_spacingX": 0,
|
||||||
"_isItalic": false,
|
"_isItalic": false,
|
||||||
"_isBold": true,
|
"_isBold": false,
|
||||||
"_isUnderline": false,
|
"_isUnderline": false,
|
||||||
"_underlineHeight": 2,
|
"_underlineHeight": 2,
|
||||||
"_cacheMode": 0,
|
"_cacheMode": 0,
|
||||||
@@ -1249,7 +1391,7 @@
|
|||||||
"b": 0,
|
"b": 0,
|
||||||
"a": 255
|
"a": 255
|
||||||
},
|
},
|
||||||
"_outlineWidth": 4,
|
"_outlineWidth": 2,
|
||||||
"_enableShadow": false,
|
"_enableShadow": false,
|
||||||
"_shadowColor": {
|
"_shadowColor": {
|
||||||
"__type__": "cc.Color",
|
"__type__": "cc.Color",
|
||||||
@@ -1293,7 +1435,7 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 57
|
"__id__": 63
|
||||||
},
|
},
|
||||||
"_contentSize": {
|
"_contentSize": {
|
||||||
"__type__": "cc.Size",
|
"__type__": "cc.Size",
|
||||||
@@ -1321,13 +1463,13 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"__prefab": {
|
"__prefab": {
|
||||||
"__id__": 59
|
"__id__": 65
|
||||||
},
|
},
|
||||||
"icon_node": {
|
"icon_node": {
|
||||||
"__id__": 11
|
"__id__": 50
|
||||||
},
|
},
|
||||||
"info_label": {
|
"info_label": {
|
||||||
"__id__": 53
|
"__id__": 59
|
||||||
},
|
},
|
||||||
"_id": ""
|
"_id": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -24,11 +24,9 @@ import { mLogger } from "../common/Logger";
|
|||||||
import { _decorator, Node, Prefab, instantiate, Vec3 } from "cc";
|
import { _decorator, Node, Prefab, instantiate, Vec3 } from "cc";
|
||||||
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
import { ecs } from "../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
|
||||||
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
import { CCComp } from "../../../../extensions/oops-plugin-framework/assets/module/common/CCComp";
|
||||||
import { SkillBoxComp } from "./SkillBoxComp";
|
|
||||||
import { SBox } from "./SBox";
|
import { SBox } from "./SBox";
|
||||||
import { oops } from "db://oops-framework/core/Oops";
|
import { oops } from "db://oops-framework/core/Oops";
|
||||||
import { GameEvent } from "../common/config/GameEvent";
|
import { GameEvent } from "../common/config/GameEvent";
|
||||||
import { smc } from "../common/SingletonModuleComp";
|
|
||||||
const { ccclass, property } = _decorator;
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
/** 技能槽位数据结构 */
|
/** 技能槽位数据结构 */
|
||||||
@@ -65,16 +63,16 @@ export class MissSkillsComp extends CCComp {
|
|||||||
* 第 2 行 y=320:x = -320, -240, -160, -80, 0
|
* 第 2 行 y=320:x = -320, -240, -160, -80, 0
|
||||||
*/
|
*/
|
||||||
private slots: SkillBoxSlot[] = [
|
private slots: SkillBoxSlot[] = [
|
||||||
{ x: -320, y: 240, used: false, node: null },
|
{ x: -320, y: 340, used: false, node: null },
|
||||||
{ x: -240, y: 240, used: false, node: null },
|
{ x: -240, y: 340, used: false, node: null },
|
||||||
{ x: -160, y: 240, used: false, node: null },
|
{ x: -160, y: 340, used: false, node: null },
|
||||||
{ x: -80, y: 240, used: false, node: null },
|
{ x: -80, y: 340, used: false, node: null },
|
||||||
{ x: 0, y: 240, used: false, node: null },
|
{ x: 0, y: 340, used: false, node: null },
|
||||||
{ x: -320, y: 320, used: false, node: null },
|
{ x: -320, y: 420, used: false, node: null },
|
||||||
{ x: -240, y: 320, used: false, node: null },
|
{ x: -240, y: 420, used: false, node: null },
|
||||||
{ x: -160, y: 320, used: false, node: null },
|
{ x: -160, y: 420, used: false, node: null },
|
||||||
{ x: -80, y: 320, used: false, node: null },
|
{ x: -80, y: 420, used: false, node: null },
|
||||||
{ x: 0, y: 320, used: false, node: null },
|
{ x: 0, y: 420, used: false, node: null },
|
||||||
];
|
];
|
||||||
|
|
||||||
/** 注册事件监听 */
|
/** 注册事件监听 */
|
||||||
|
|||||||
Reference in New Issue
Block a user