Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interactiveGames_Level
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuxing@jiuaoedu.com
interactiveGames_Level
Commits
58110863
Commit
58110863
authored
Feb 10, 2022
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好几个游戏加了一个成功过渡
parent
ed99c6cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
AdjacentArrayCtr.ts
...ceneBundle/games/adjacentArray/script/AdjacentArrayCtr.ts
+18
-12
LatticeBlockadeCtr.ts
...Bundle/games/latticeBlockade/script/LatticeBlockadeCtr.ts
+10
-4
SudokuCtr.ts
assets/sceneBundle/games/sudoku/script/SudokuCtr.ts
+10
-4
No files found.
assets/sceneBundle/games/adjacentArray/script/AdjacentArrayCtr.ts
View file @
58110863
...
...
@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM
import
{
BeginCountdownView
}
from
'../../commonView/script/BeginCountdownView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
GameDescView
}
from
'../../commonView/script/GameDescView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
adjacentArrayLV_1
,
adjacentArrayLV_2
}
from
'./AdjacentArrayCfg'
;
import
{
AdjacentArrayItemCtr
}
from
'./AdjacentArrayItemCtr'
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -148,10 +149,15 @@ export class AdjacentArrayCtr extends Component {
gameEnd
(
isWin
:
boolean
)
{
this
.
gameState
=
GAME_STATE
.
END
;
if
(
isWin
)
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
AudioMgr
.
playEffect
(
succMus
);
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
AudioMgr
.
playEffect
(
succMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchOkView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchOkView
)
!
.
endCb
=
()
=>
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
};
node
.
getComponent
(
SwitchOkView
)?.
init
(
1.5
);
});
}
else
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeFailView
,
(
node
)
=>
{
...
...
@@ -204,7 +210,7 @@ export class AdjacentArrayCtr extends Component {
creAllItem
()
{
let
numArr
:
number
[]
=
[];
for
(
let
i
=
0
;
i
<
this
.
levelData
.
length
;
++
i
)
{
for
(
let
i
=
0
;
i
<
this
.
levelData
.
length
;
++
i
)
{
numArr
=
numArr
.
concat
(
this
.
levelData
[
i
]);
}
this
.
itemPosIfoArr
=
this
.
getSqPosIfoArr
(
this
.
row
,
this
.
column
,
this
.
itemWidth
,
this
.
itemHeight
,
this
.
itemSpaceX
,
this
.
itemSpaceY
);
...
...
@@ -217,15 +223,15 @@ export class AdjacentArrayCtr extends Component {
}
}
onResetBtnClick
(){
onResetBtnClick
()
{
if
(
this
.
gameState
==
GAME_STATE
.
READY
||
this
.
gameState
==
GAME_STATE
.
END
||
this
.
gameState
==
GAME_STATE
.
PAUSE
)
{
return
;
}
for
(
let
i
=
0
;
i
<
this
.
gridIfoArr
.
length
;
++
i
)
{
this
.
gridIfoArr
[
i
].
active
=
false
;
this
.
gridIfoArr
[
i
].
gridItem
.
active
=
false
;
this
.
gridIfoArr
[
i
].
pairItem
[
0
].
target
.
getComponent
(
AdjacentArrayItemCtr
)?.
setBgSprToNor
();
this
.
gridIfoArr
[
i
].
pairItem
[
1
].
target
.
getComponent
(
AdjacentArrayItemCtr
)?.
setBgSprToNor
();
for
(
let
i
=
0
;
i
<
this
.
gridIfoArr
.
length
;
++
i
)
{
this
.
gridIfoArr
[
i
].
active
=
false
;
this
.
gridIfoArr
[
i
].
gridItem
.
active
=
false
;
this
.
gridIfoArr
[
i
].
pairItem
[
0
].
target
.
getComponent
(
AdjacentArrayItemCtr
)?.
setBgSprToNor
();
this
.
gridIfoArr
[
i
].
pairItem
[
1
].
target
.
getComponent
(
AdjacentArrayItemCtr
)?.
setBgSprToNor
();
}
}
...
...
@@ -405,7 +411,7 @@ export class AdjacentArrayCtr extends Component {
this
.
countdownLab
.
string
=
Utils
.
formatTime
(
Math
.
floor
((
this
.
totalTime
-
this
.
costTime
)
*
1000
));
}
update
(
deltaTime
:
number
)
{
update
(
deltaTime
:
number
)
{
// [4]
this
.
countdownTime
(
deltaTime
);
}
...
...
assets/sceneBundle/games/latticeBlockade/script/LatticeBlockadeCtr.ts
View file @
58110863
...
...
@@ -8,6 +8,7 @@ import { viewMgr, VIEW_INDEX } from '../../../../startFolder/script/common/ViewM
import
{
BeginCountdownView
}
from
'../../commonView/script/BeginCountdownView'
;
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
LatticeBlockadeIfo
,
LB_LV_1
,
LB_LV_2
}
from
'./LatticeBlockadeCfg'
;
import
{
LatticeBlockadeItem
}
from
'./LatticeBlockadeItem'
;
import
{
LatticeBlockadeLine
}
from
'./LatticeBlockadeLine'
;
...
...
@@ -340,10 +341,15 @@ export class LatticeBlockadeCtr extends Component {
gameEnd
(
isWin
:
boolean
)
{
this
.
gameState
=
GAME_STATE
.
END
;
if
(
isWin
)
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
AudioMgr
.
playEffect
(
succMus
);
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
AudioMgr
.
playEffect
(
succMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchOkView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchOkView
)
!
.
endCb
=
()
=>
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
};
node
.
getComponent
(
SwitchOkView
)?.
init
(
1.5
);
});
}
else
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeFailView
,
(
node
)
=>
{
...
...
assets/sceneBundle/games/sudoku/script/SudokuCtr.ts
View file @
58110863
...
...
@@ -9,6 +9,7 @@ import { BeginCountdownView } from '../../commonView/script/BeginCountdownView';
import
{
ChallengeFailView
}
from
'../../commonView/script/ChallengeFailView'
;
import
{
ChallengeSuccView
}
from
'../../commonView/script/ChallengeSuccView'
;
import
{
GameDescView
}
from
'../../commonView/script/GameDescView'
;
import
{
SwitchOkView
}
from
'../../commonView/script/SwitchOkView'
;
import
{
SK_LV_1
,
SK_LV_2
,
SK_LV_3
,
SK_LV_4
}
from
'./SudokuCfg'
;
import
{
SudokuItemCtr
}
from
'./SudokuItemCtr'
;
import
{
SudokuLevelViewCtr
}
from
'./SudokuLevelCtr'
;
...
...
@@ -164,10 +165,15 @@ export class SudokuCtr extends Component {
gameEnd
(
isWin
:
boolean
)
{
this
.
gameState
=
GAME_STATE
.
END
;
if
(
isWin
)
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
AudioMgr
.
playEffect
(
succMus
);
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
AudioMgr
.
playEffect
(
succMus
);
viewMgr
.
openView
(
VIEW_DEF
.
SwitchOkView
,
(
node
)
=>
{
node
.
getComponent
(
SwitchOkView
)
!
.
endCb
=
()
=>
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeSuccView
,
(
node
)
=>
{
node
?.
getComponent
(
ChallengeSuccView
)?.
init
();
},
VIEW_INDEX
.
TOP
);
};
node
.
getComponent
(
SwitchOkView
)?.
init
(
1.5
);
});
}
else
{
viewMgr
.
openView
(
VIEW_DEF
.
ChallengeFailView
,
(
node
)
=>
{
...
...
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