Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
T
tuseGameColor
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shujianhe
tuseGameColor
Commits
bf849fc1
Commit
bf849fc1
authored
Aug 22, 2023
by
lijin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解析图片逻辑更新
parent
aa0acd55
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
GameEditor.cs
Assets/Editor/GameEditor.cs
+18
-3
gameUserInfos.cs
Assets/scripts/Views/gameScene/gameUserInfos.cs
+1
-1
No files found.
Assets/Editor/GameEditor.cs
View file @
bf849fc1
...
@@ -82,9 +82,17 @@ public class GameEditor
...
@@ -82,9 +82,17 @@ public class GameEditor
}
}
public
static
void
FunDo
(
short
[]
l
,
Texture2D
png
,
RoomDatas
rd
)
public
static
void
FunDo
(
short
[]
l
,
Texture2D
png
,
RoomDatas
rd
)
{
{
V2
v
2
=
new
V2
(
rd
.
px
,
rd
.
py
);
V2
v
=
new
V2
(
rd
.
px
,
rd
.
py
);
Stack
<
V2
>
stackVector2
=
new
Stack
<
V2
>();
Stack
<
V2
>
stackVector2
=
new
Stack
<
V2
>();
stackVector2
.
Push
(
v2
);
if
(
v
.
x
>=
0
&&
v
.
x
<
png
.
width
&&
v
.
y
>=
0
&&
v
.
y
<
png
.
height
&&
png
.
GetPixel
(
v
.
x
,
v
.
y
).
a
<=
0.35f
)
{
stackVector2
.
Push
(
v
);
}
else
{
Debug
.
LogError
(
"配置像素点进不了堆栈:"
+
rd
.
id
);
}
V2
[]
d
=
new
V2
[
8
]
{
new
V2
(
0
,
-
1
),
new
V2
(
0
,
1
),
new
V2
(-
1
,
0
),
new
V2
(
1
,
0
),
new
V2
(-
1
,
-
1
),
new
V2
(-
1
,
1
),
new
V2
(
1
,
-
1
),
new
V2
(
1
,
1
)
};
V2
[]
d
=
new
V2
[
8
]
{
new
V2
(
0
,
-
1
),
new
V2
(
0
,
1
),
new
V2
(-
1
,
0
),
new
V2
(
1
,
0
),
new
V2
(-
1
,
-
1
),
new
V2
(-
1
,
1
),
new
V2
(
1
,
-
1
),
new
V2
(
1
,
1
)
};
V2
v_1
;
V2
v_1
;
...
@@ -112,7 +120,14 @@ public class GameEditor
...
@@ -112,7 +120,14 @@ public class GameEditor
break
;
break
;
}
}
}
}
if
(
count
==
1
)
{
Debug
.
LogError
(
"循环次数:"
+
count
+
" rd.id:"
+
rd
.
id
);
}
else
{
Debug
.
Log
(
"循环次数:"
+
count
);
Debug
.
Log
(
"循环次数:"
+
count
);
}
png
.
Apply
();
png
.
Apply
();
}
}
...
...
Assets/scripts/Views/gameScene/gameUserInfos.cs
View file @
bf849fc1
...
@@ -29,7 +29,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
...
@@ -29,7 +29,7 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
if
(
utilsTools
.
ContainsKeyGDataByKey
(
EventName
.
DataName
.
Data_NativeGameData
)
==
false
)
if
(
utilsTools
.
ContainsKeyGDataByKey
(
EventName
.
DataName
.
Data_NativeGameData
)
==
false
)
{
{
string
json
=
"{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}"
;
string
json
=
"{\"append\":\"\",\"classId\":\"1,8,10,14\",\"displayDate\":\"20221102\",\"enterType\":\"0\",\"extraJson\":\"{\\\"cut_height\\\": 0, \\\"refer_drawer\\\": \\\"DoMyzu\\\"}\",\"extraType\":0,\"file\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H.zip\",\"highImg\":\"https://d21z6ifg4bbv2v.cloudfront.net/tspng/cc--EDgRpc_nHQru7H.png\",\"hybridType\":64,\"id\":\"cc--EDgRpc_nHQru7H\",\"originalJson\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsjson/cc--EDgRpc_nHQru7H.json\",\"picAssets\":\"{\\\"pictureBin\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/zsD2ySwS4pJ25frj.p\\\", \\\"pictureThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/V8ZvUuDlOEB7mifd.png\\\", \\\"pictureColorThn4\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc400\\\", \\\"pictureWallThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/oWqHjCo5mQvXIVP_.png\\\", \\\"pictureWallColorThn8\\\": \\\"ccv1/production-pic/20221027/cc--EDgRpc_nHQru7H/IDdMO8yT0fPPhUtU.jpg?x-oss-process\\u003dstyle/cc800\\\"}\",\"pictureBin\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureBin.p\",\"pictureColorThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureColorThn4.jpg\",\"pictureThn4\":\"https://d21z6ifg4bbv2v.cloudfront.net/tsgame/cc--EDgRpc_nHQru7H_pictureThn4.png\",\"schedule\":0,\"seriesName\":\"\",\"sid\":2967,\"sort\":80,\"type\":6}"
;
json
=
json
.
Replace
(
"cc--EDgRpc_nHQru7H"
,
"cc
2D9Z2w9k0evqUiCQ
"
);
json
=
json
.
Replace
(
"cc--EDgRpc_nHQru7H"
,
"cc
gCTqoiwmXnQ1RGBb
"
);
utilsTools
.
setGDataByKey
(
EventName
.
DataName
.
Data_NativeGameData
,
JsonUtility
.
FromJson
<
netLableImageItem
>(
json
));
utilsTools
.
setGDataByKey
(
EventName
.
DataName
.
Data_NativeGameData
,
JsonUtility
.
FromJson
<
netLableImageItem
>(
json
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment