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
cd01177b
Commit
cd01177b
authored
Aug 22, 2023
by
JiangWanZhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加载文件的时候不再是读取固定的值了
parent
bf849fc1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
mainGameView.cs
Assets/scripts/common/mainGameView.cs
+13
-13
No files found.
Assets/scripts/common/mainGameView.cs
View file @
cd01177b
...
@@ -1773,13 +1773,13 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
...
@@ -1773,13 +1773,13 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
StartCoroutine
(
LoadPic
(
path
,
$"
{
CurPicName
}
"
,
item
));
StartCoroutine
(
LoadPic
(
path
,
$"
{
CurPicName
}
"
,
item
));
}
}
IEnumerator
LoadPic
(
string
dirpath
,
string
name
,
GameMgr
item
)
IEnumerator
LoadPic
(
string
dirpath
,
string
key
,
GameMgr
item
)
{
{
Texture2D
png
=
null
;
Texture2D
png
=
null
;
Sprite
jpg
=
null
;
Sprite
jpg
=
null
;
Texture2D
jpg_texture
=
null
;
Texture2D
jpg_texture
=
null
;
string
pngpath
=
dirpath
+
$"
{
name
}
_png.png"
;
string
pngpath
=
dirpath
+
$"
{
key
}
_png.png"
;
string
jpgpath
=
dirpath
+
$"
{
name
}
_jpg.jpg"
;
string
jpgpath
=
dirpath
+
$"
{
key
}
_jpg.jpg"
;
string
loadpath
=
""
;
string
loadpath
=
""
;
bool
localflag
=
false
;
bool
localflag
=
false
;
...
@@ -1832,7 +1832,7 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
...
@@ -1832,7 +1832,7 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
jpg_texture
=
www
.
texture
;
jpg_texture
=
www
.
texture
;
}
}
string
binlocalpath
=
Application
.
persistentDataPath
+
$"/MyPic/
{
name
}
/
{
name
}
_json.bin"
;
string
binlocalpath
=
Application
.
persistentDataPath
+
$"/MyPic/
{
key
}
/
{
key
}
_json.bin"
;
ResJsonData
jsondata
=
null
;
ResJsonData
jsondata
=
null
;
if
(!
File
.
Exists
(
binlocalpath
))
if
(!
File
.
Exists
(
binlocalpath
))
{
{
...
@@ -1848,10 +1848,10 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
...
@@ -1848,10 +1848,10 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
}
}
else
else
{
{
jsondata
=
getdata
(
"cc2D9Z2w9k0evqUiCQ"
);
jsondata
=
getdata
(
key
);
}
}
string
bindynamiclocalpath
=
Application
.
persistentDataPath
+
$"/MyPic/
{
name
}
/
{
name
}
_dynamic.bin"
;
string
bindynamiclocalpath
=
Application
.
persistentDataPath
+
$"/MyPic/
{
key
}
/
{
key
}
_dynamic.bin"
;
DynamicData
dynamic
=
null
;
DynamicData
dynamic
=
null
;
if
(!
File
.
Exists
(
bindynamiclocalpath
))
if
(!
File
.
Exists
(
bindynamiclocalpath
))
{
{
...
@@ -1867,19 +1867,19 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
...
@@ -1867,19 +1867,19 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
}
}
else
else
{
{
dynamic
=
getdynamicdata
(
"cc2D9Z2w9k0evqUiCQ"
);
dynamic
=
getdynamicdata
(
key
);
}
}
if
(
localflag
)
//加载本地的到这里就回去了,下面是加载工程;里面的后续跑的
if
(
localflag
)
//加载本地的到这里就回去了,下面是加载工程;里面的后续跑的
{
{
item
.
Init
(
"cc2D9Z2w9k0evqUiCQ"
,
png
,
jpg
,
jsondata
,
dynamic
);
item
.
Init
(
key
,
png
,
jpg
,
jsondata
,
dynamic
);
yield
break
;
yield
break
;
}
}
SaveManager
.
Instance
.
SaveRes
(
"cc2D9Z2w9k0evqUiCQ"
,
dynamic
,
png
);
SaveManager
.
Instance
.
SaveRes
(
key
,
dynamic
,
png
);
SaveManager
.
Instance
.
SaveJPG
(
"cc2D9Z2w9k0evqUiCQ"
,
jpg_texture
);
SaveManager
.
Instance
.
SaveJPG
(
key
,
jpg_texture
);
SaveManager
.
Instance
.
SaveJson
(
"cc2D9Z2w9k0evqUiCQ"
,
jsondata
);
SaveManager
.
Instance
.
SaveJson
(
key
,
jsondata
);
while
(!
SaveManager
.
Instance
.
IsSaveOver
)
while
(!
SaveManager
.
Instance
.
IsSaveOver
)
{
{
...
@@ -1910,8 +1910,8 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
...
@@ -1910,8 +1910,8 @@ public class mainGameView : MonoBehaviour //大图的处理、具体的玩法
jpg_texture
=
www_jpg
.
texture
;
jpg_texture
=
www_jpg
.
texture
;
jpg
=
Sprite
.
Create
(
jpg_texture
,
new
Rect
(
0
,
0
,
jpg_texture
.
width
,
jpg_texture
.
height
),
new
Vector2
(
0.5f
,
0.5f
));
jpg
=
Sprite
.
Create
(
jpg_texture
,
new
Rect
(
0
,
0
,
jpg_texture
.
width
,
jpg_texture
.
height
),
new
Vector2
(
0.5f
,
0.5f
));
}
}
jsondata
=
getdata
(
"cc2D9Z2w9k0evqUiCQ"
);
jsondata
=
getdata
(
key
);
item
.
Init
(
"cc2D9Z2w9k0evqUiCQ"
,
png
,
jpg
,
jsondata
,
dynamic
);
item
.
Init
(
name
,
png
,
jpg
,
jsondata
,
dynamic
);
}
}
...
...
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