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
b7c37095
Commit
b7c37095
authored
Jul 24, 2023
by
shujianhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a4fce68d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
+22
-16
gameSceneLogic.cs
Assets/scripts/Views/gameScene/gameSceneLogic.cs
+5
-5
gameUserInfos.cs
Assets/scripts/Views/gameScene/gameUserInfos.cs
+9
-10
utilsTools.cs
Assets/scripts/utils/utilsTools.cs
+8
-1
No files found.
Assets/scripts/Views/gameScene/gameSceneLogic.cs
View file @
b7c37095
...
...
@@ -62,7 +62,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
onEvent
(
"tipShowPosMaxScale"
,
onTipShowPosMaxScaleEvent
);
onEvent
(
"gamePlayerEndHandler"
,
onGamePlayerEndHandlerEvent
);
onEvent
(
"closeGameScene"
,
onCloseGameSceneEvent
);
transform
.
Find
(
"ingameLoad"
).
gameObject
.
SetActive
(
false
);
transform
.
Find
(
"ingameLoad
/loadImg
"
).
gameObject
.
SetActive
(
false
);
//gameScenUser
var
gridViewList
=
areaGroupList
.
GetComponent
<
gameSceneAreaGroupHandler
>();
gridViewList
.
gameObject
.
SetActive
(
false
);
...
...
@@ -271,7 +271,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
private
void
handlerLoadingPosition
(
Image
image
)
{
transform
.
Find
(
"ingameLoad"
).
gameObject
.
SetActive
(
true
);
Debug
.
Log
(
"handlerLoadingPosition hand endl"
);
transform
.
Find
(
"ingameLoad/loadImg"
).
gameObject
.
SetActive
(
true
);
utilsTools
.
setGDataByKey
(
"downGaoQingBack"
,
utilsTools
.
getTotalMillisecond
());
float
width
=
image
.
sprite
.
texture
.
width
;
float
height
=
image
.
sprite
.
texture
.
height
;
...
...
@@ -328,6 +329,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
void
onZipFileHandler
(
GameScenUserInfo
gameScenUser
)
{
Debug
.
Log
(
"handlerLoadingPosition hand begin"
);
string
zpath
=
utilsTools
.
getWritableByPath
(
"debugFiles/outzips/"
+
gameScenUser
.
id
+
".zip"
);
if
(
utilsTools
.
IsPhone
==
false
)
zpath
=
zpath
.
Replace
(
"/"
,
"\\"
);
...
...
@@ -340,7 +342,6 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
utilsTools
.
setGDataByKey
(
"beginUnZip"
,
utilsTools
.
getTotalMillisecond
());
ZipUtility
.
UnzipFile
(
zpath
,
outPath
,
"tuse"
+
gameScenUser
.
id
);
utilsTools
.
setGDataByKey
(
"endUnZip"
,
utilsTools
.
getTotalMillisecond
());
transform
.
Find
(
"ingameLoad"
).
gameObject
.
SetActive
(
true
);
utilsTools
.
setGDataByKey
(
"nowSelectUseData"
,
gameScenUser
);
Image
image
=
transform
.
Find
(
"ingameLoad/loadImg"
).
GetComponent
<
Image
>();
...
...
@@ -401,8 +402,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
{
if
(
isOk
)
{
utilsTools
.
addTimer_Update
(
gameObject
,
"unZipNext"
,
(
String
_
)
=>
{
utilsTools
.
addTimer_Update
(
gameObject
,
"unZipNext"
,
(
String
_
)
=>{
utilsTools
.
setGDataByKey
(
"downZipEnd"
,
utilsTools
.
getTotalMillisecond
());
onZipFileHandler
(
gameScenUser
);
return
false
;
...
...
Assets/scripts/Views/gameScene/gameUserInfos.cs
View file @
b7c37095
...
...
@@ -21,26 +21,25 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
onEvent
(
"showAreaEventOk"
,
onSelectAreaEvent
);
onEvent
(
"showAreaPalyerEnd"
,
onShowAreaPalyerEndEvent
);
onEvent
(
"inGameLoadingBarEnd"
,
onInGameLoadingBarEndEvent
);
//utilsTools.addTimer_Update(gameObject,
"first", (string name) =>
//
{
utilsTools
.
addTimer_Update
(
gameObject
,
"first"
,
(
string
name
)
=>
{
if
(
utilsTools
.
ContainsKeyGDataByKey
(
"NativeGameData"
)
==
false
)
{
loadTest
();
}
else
{
netLableImageItem
jsonData
=
utilsTools
.
getGDataByKey
<
netLableImageItem
>(
"NativeGameData"
,
null
);
if
(
jsonData
==
null
)
netLableImageItem
jsonData
=
utilsTools
.
getGDataByKey
<
netLableImageItem
>(
"NativeGameData"
,
null
);
if
(
jsonData
==
null
)
{
Debug
.
LogError
(
"no valid data"
);
//
return false;
return
false
;
}
utilsTools
.
setGameScenUserInfo
(
jsonData
.
id
,
jsonData
.
getLineUrl
(),
jsonData
.
getColorUrl
(),
jsonData
.
getJsonUrl
(),
jsonData
.
file
);
//string id = utilsTools.getGDataByKey<String>("nowUseGameId", "");
startId
(
jsonData
.
id
);
}
//
return false;
//},3
);
return
false
;
},
2
);
}
...
...
Assets/scripts/utils/utilsTools.cs
View file @
b7c37095
...
...
@@ -38,8 +38,15 @@ public class utilsTools
}
}
public
static
string
getGameSceneName
()
{
if
(
Boolean
.
Parse
(
getGDataByKey
<
string
>(
"showBackPlayer"
,
"false"
))
==
false
)
{
return
"Scenes/gameScene"
;
}
else
return
"Scenes/gameScen?"
;
}
public
static
bool
removeGDataByKey
(
string
key
)
{
...
...
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