Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbx_Pronunciation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
Sbx_Pronunciation
Commits
def498c0
Commit
def498c0
authored
Dec 18, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 视屏层级 导致异常黑屏
parent
a22be096
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10586 additions
and
12 deletions
+10586
-12
.DS_Store
.DS_Store
+0
-0
Sbx_Pronunciation.meta
assets/Sbx_Pronunciation.meta
+15
-1
Sbx_Pronunciation.fire
assets/Sbx_Pronunciation/scene/Sbx_Pronunciation.fire
+1
-1
Sbx_Pronunciation.js
assets/Sbx_Pronunciation/scene/Sbx_Pronunciation.js
+66
-8
util.js
assets/Sbx_Pronunciation/script/util.js
+14
-0
angular.json
form/angular.json
+5
-2
yarn.lock
form/yarn.lock
+9906
-0
yarn.lock
yarn.lock
+579
-0
No files found.
.DS_Store
View file @
def498c0
No preview for this file type
assets/Sbx_Pronunciation.meta
View file @
def498c0
{"ver":"1.1.2","uuid":"f6e31e97-ccb9-4c5f-a2fa-b4eed558e692","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
{
\ No newline at end of file
"ver": "1.1.2",
"uuid": "f6e31e97-ccb9-4c5f-a2fa-b4eed558e692",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
assets/Sbx_Pronunciation/scene/Sbx_Pronunciation.fire
View file @
def498c0
...
@@ -841,7 +841,7 @@
...
@@ -841,7 +841,7 @@
"_mute": false,
"_mute": false,
"_isFullscreen": false,
"_isFullscreen": false,
"_N$isFullscreen": false,
"_N$isFullscreen": false,
"_stayOnBottom":
tru
e,
"_stayOnBottom":
fals
e,
"videoPlayerEvent": [],
"videoPlayerEvent": [],
"_N$keepAspectRatio": true,
"_N$keepAspectRatio": true,
"_id": "e7ihO31y5FqJ0/0nd7CE1N"
"_id": "e7ihO31y5FqJ0/0nd7CE1N"
...
...
assets/Sbx_Pronunciation/scene/Sbx_Pronunciation.js
View file @
def498c0
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
// Learn life-cycle callbacks:
// Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import
GameLogic
from
"
../script/GameLogic
"
import
GameLogic
from
"
../script/GameLogic
"
import
{
delayCall
}
from
"
../script/util
"
;
// cc.game.onStart = function(){
// cc.game.onStart = function(){
// cc.director.runScene(new MyScene());
// cc.director.runScene(new MyScene());
...
@@ -81,14 +82,7 @@ cc.Class({
...
@@ -81,14 +82,7 @@ cc.Class({
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
))
this
.
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
))
this
.
preloadItem
()
this
.
preloadItem
()
// 添加游戏逻辑
this
.
gameLogic
=
new
GameLogic
(
this
.
data
,
{
designSize
:
this
.
_designSize
,
frameSize
:
this
.
_frameSize
,
mapScaleMin
:
this
.
_mapScaleMin
,
mapScaleMax
:
this
.
_mapScaleMax
,
cocosScale
:
this
.
_cocosScale
,
});
})
})
},
},
...
@@ -130,6 +124,16 @@ cc.Class({
...
@@ -130,6 +124,16 @@ cc.Class({
addPreloadAudio
()
{
addPreloadAudio
()
{
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
this
.
_audioResList
.
push
({
url
:
this
.
data
.
audio_url
});
const
dataArr
=
this
.
data
.
contentObj
?.
dataArray
;
if
(
dataArr
)
{
dataArr
.
forEach
(
data
=>
{
this
.
_audioResList
.
push
({
url
:
data
.
video_url
||
''
});
})
}
console
.
log
(
'
this.data:
'
,
this
.
data
);
},
},
addPreloadAnima
()
{
addPreloadAnima
()
{
...
@@ -162,6 +166,60 @@ cc.Class({
...
@@ -162,6 +166,60 @@ cc.Class({
loadEnd
()
{
loadEnd
()
{
this
.
initData
();
this
.
initData
();
this
.
initGameLogic
();
// this.testVideo();
},
initGameLogic
()
{
// 添加游戏逻辑
this
.
gameLogic
=
new
GameLogic
(
this
.
data
,
{
designSize
:
this
.
_designSize
,
frameSize
:
this
.
_frameSize
,
mapScaleMin
:
this
.
_mapScaleMin
,
mapScaleMax
:
this
.
_mapScaleMax
,
cocosScale
:
this
.
_cocosScale
,
});
},
testVideo
()
{
const
videoNode
=
cc
.
find
(
"
Canvas/temp
"
);
this
.
videoNode
=
videoNode
;
this
.
videoNode
.
baseX
=
videoNode
.
x
;
videoNode
.
active
=
true
;
const
vPlayer
=
videoNode
.
getComponent
(
cc
.
VideoPlayer
);
vPlayer
.
remoteURL
=
this
.
data
.
contentObj
.
dataArray
[
0
].
video_url
;
this
.
videoPlayer
=
vPlayer
;
vPlayer
.
node
.
on
(
'
ready-to-play
'
,
()
=>
{
vPlayer
.
play
();
checkIsPlaying
();
})
const
checkIsPlaying
=
()
=>
{
delayCall
(
0.001
,
()
=>
{
if
(
vPlayer
.
currentTime
)
{
// vPlayer.pause();
this
.
isVideoPlayerReady
=
true
;
// this.checkCanShowRecordList();
console
.
log
(
'
aaavbbb
'
);
}
else
{
checkIsPlaying
();
}
})
}
},
},
_cantouch
:
null
,
_cantouch
:
null
,
...
...
assets/Sbx_Pronunciation/script/util.js
View file @
def498c0
...
@@ -132,3 +132,17 @@ export function btnClickAnima(btn, time=0.15, rate=1.05) {
...
@@ -132,3 +132,17 @@ export function btnClickAnima(btn, time=0.15, rate=1.05) {
.
start
()
.
start
()
})
})
}
}
export
function
delayCall
(
time
,
cb
)
{
return
cc
.
tween
({})
.
delay
(
time
)
.
call
(()
=>
{
if
(
cb
)
{
cb
();
}
})
.
start
();
}
\ No newline at end of file
form/angular.json
View file @
def498c0
...
@@ -128,5 +128,8 @@
...
@@ -128,5 +128,8 @@
}
}
}
}
},
},
"defaultProject"
:
"ng-template-generator"
"defaultProject"
:
"ng-template-generator"
,
"cli"
:
{
"analytics"
:
false
}
}
}
\ No newline at end of file
form/yarn.lock
0 → 100644
View file @
def498c0
This diff is collapsed.
Click to expand it.
yarn.lock
0 → 100644
View file @
def498c0
This diff is collapsed.
Click to expand it.
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