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
d7386eda
Commit
d7386eda
authored
Jul 24, 2023
by
shujianhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
8685dd91
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
gameSceneLogic.cs
Assets/scripts/Views/gameScene/gameSceneLogic.cs
+12
-0
gameUserInfos.cs
Assets/scripts/Views/gameScene/gameUserInfos.cs
+5
-5
mainGameView.cs
Assets/scripts/common/mainGameView.cs
+1
-0
No files found.
Assets/scripts/Views/gameScene/gameSceneLogic.cs
View file @
d7386eda
...
...
@@ -29,6 +29,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
private
int
rvalue
=
-
1
;
public
GameObject
fpsObj
=
null
;
private
DateTime
dtime
;
private
bool
autoSwitchGroup
=
true
;
private
bool
vibration
=
true
;
Dictionary
<
string
,
EventChildItemBack
>
childEventHandlers
=
new
Dictionary
<
string
,
EventChildItemBack
>();
void
onEvent
(
string
name
,
EventChildItemBack
func
)
{
...
...
@@ -60,6 +62,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
onEvent
(
"tipShowPosMaxScale"
,
onTipShowPosMaxScaleEvent
);
onEvent
(
"gamePlayerEndHandler"
,
onGamePlayerEndHandlerEvent
);
onEvent
(
"closeGameScene"
,
onCloseGameSceneEvent
);
transform
.
Find
(
"ingameLoad"
).
gameObject
.
SetActive
(
false
);
//gameScenUser
var
gridViewList
=
areaGroupList
.
GetComponent
<
gameSceneAreaGroupHandler
>();
gridViewList
.
gameObject
.
SetActive
(
false
);
...
...
@@ -268,6 +271,7 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
}
private
void
handlerLoadingPosition
(
Image
image
)
{
transform
.
Find
(
"ingameLoad"
).
gameObject
.
SetActive
(
true
);
utilsTools
.
setGDataByKey
(
"downGaoQingBack"
,
utilsTools
.
getTotalMillisecond
());
float
width
=
image
.
sprite
.
texture
.
width
;
float
height
=
image
.
sprite
.
texture
.
height
;
...
...
@@ -315,6 +319,8 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
Sprite
sprite
=
Sprite
.
Create
(
texture2d
,
new
Rect
(
0
,
0
,
texture2d
.
width
,
texture2d
.
height
),
new
Vector2
(
0.5f
,
0.5f
));
image
.
sprite
=
sprite
;
image
.
color
=
Color
.
white
;
autoSwitchGroup
=
Boolean
.
Parse
(
utilsTools
.
getGDataByKey
<
string
>(
"auto-switch"
,
autoSwitchGroup
.
ToString
()));
//vibration = Boolean.Parse(utilsTools.getGDataByKey<string>("vibration", autoSwitchGroup.ToString()))
gameShowView
.
GetComponent
<
mainGameView
>().
loadGameImgId
();
this
.
handlerLoadingPosition
(
image
);
}
...
...
@@ -511,8 +517,14 @@ public class gameSceneLogic : MonoBehaviour, IEventHandler
this
.
onUpdateGroupGridHandler
(
gobject
,
idx
,
lvbType
,
groupInfos
[
idx
]);
};
gridViewList
.
setDataNoGrid
(
groupInfos
.
Count
,
gradView
);
//震动
if
(
nowidx
>=
0
)
{
if
(
autoSwitchGroup
==
false
)
{
nowidx
=
-
1
;
return
;
}
var
maingameView
=
gameShowView
.
GetComponent
<
mainGameView
>();
maingameView
.
switchShowAreaGroup
((
short
)(
groupInfos
[
nowidx
].
gid
),
(
int
id
,
bool
isOk
)
=>
{
});
...
...
Assets/scripts/Views/gameScene/gameUserInfos.cs
View file @
d7386eda
...
...
@@ -21,8 +21,8 @@ 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
();
...
...
@@ -33,14 +33,14 @@ public class gameUserInfos : MonoBehaviour, IEventHandler
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;
//
},3);
}
...
...
Assets/scripts/common/mainGameView.cs
View file @
d7386eda
...
...
@@ -704,6 +704,7 @@ public class mainGameView : MonoBehaviour
if
(
false
==
gameUserInfo
.
createWorkDirectory
())
return
false
;
utilsTools
.
sendEventObjectParams
(
"inGameLoadingValue"
,
3f
,
false
);
fillAnimation
=
Boolean
.
Parse
(
utilsTools
.
getGDataByKey
<
String
>(
"fillanimation"
,
"false"
));
this
.
gameScenUseInfo
=
gameUserInfo
;
for
(
short
i
=
0
;
i
<
gameUserInfo
.
areaInfoUseData
.
Count
;
i
++)
{
...
...
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