Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
Coloring
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
Coloring
Commits
42be91ea
Commit
42be91ea
authored
Mar 23, 2022
by
张世斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.网络参数配置
parent
8c60f94f
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
14362 additions
and
3869 deletions
+14362
-3869
Coloring.fire
assets/Coloring/scene/Coloring.fire
+816
-3822
Coloring_bak.fire
assets/Coloring/scene/Coloring_bak.fire
+13142
-0
Coloring_bak.fire.meta
assets/Coloring/scene/Coloring_bak.fire.meta
+7
-0
AssetMgr.ts
assets/Coloring/script/Core/Manager/AssetMgr.ts
+0
-3
SoundMgr.ts
assets/Coloring/script/Core/Manager/SoundMgr.ts
+2
-0
UIUtil.ts
assets/Coloring/script/Core/Util/UIUtil.ts
+15
-1
MenuController.ts
assets/Coloring/script/Game/MenuController.ts
+32
-16
MenuModel.ts
assets/Coloring/script/Game/MenuModel.ts
+6
-0
MenuView.ts
assets/Coloring/script/Game/MenuView.ts
+80
-11
defaultData.js
assets/Coloring/script/defaultData.js
+34
-16
test.meta
assets/Coloring/textures/test.meta
+12
-0
Ff.png
assets/Coloring/textures/test/Ff.png
+0
-0
Ff.png.meta
assets/Coloring/textures/test/Ff.png.meta
+36
-0
Ff1.png
assets/Coloring/textures/test/Ff1.png
+0
-0
Ff1.png.meta
assets/Coloring/textures/test/Ff1.png.meta
+36
-0
Ff2.png
assets/Coloring/textures/test/Ff2.png
+0
-0
Ff2.png.meta
assets/Coloring/textures/test/Ff2.png.meta
+36
-0
Ff3.png
assets/Coloring/textures/test/Ff3.png
+0
-0
Ff3.png.meta
assets/Coloring/textures/test/Ff3.png.meta
+36
-0
Ff4.png
assets/Coloring/textures/test/Ff4.png
+0
-0
Ff4.png.meta
assets/Coloring/textures/test/Ff4.png.meta
+36
-0
Ff5.png
assets/Coloring/textures/test/Ff5.png
+0
-0
Ff5.png.meta
assets/Coloring/textures/test/Ff5.png.meta
+36
-0
No files found.
assets/Coloring/scene/Coloring.fire
View file @
42be91ea
This diff is collapsed.
Click to expand it.
assets/Coloring/scene/Coloring_bak.fire
0 → 100644
View file @
42be91ea
This diff is collapsed.
Click to expand it.
assets/Coloring/scene/Coloring_bak.fire.meta
0 → 100644
View file @
42be91ea
{
"ver": "1.2.9",
"uuid": "477c1d15-15ba-4964-bcab-10beec13cb42",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
"subMetas": {}
}
\ No newline at end of file
assets/Coloring/script/Core/Manager/AssetMgr.ts
View file @
42be91ea
...
@@ -114,9 +114,6 @@ export default class AssetMgr extends Manager {
...
@@ -114,9 +114,6 @@ export default class AssetMgr extends Manager {
})
})
}
}
public
releaseAsset
(
asset
:
cc
.
Asset
,
_
?)
public
releaseAsset
(
asset
:
cc
.
Asset
,
_
?)
public
releaseAsset
(
abName
:
string
,
resName
:
string
)
public
releaseAsset
(
abName
:
string
,
resName
:
string
)
public
releaseAsset
(
a1
:
any
,
a2
:
any
)
{
public
releaseAsset
(
a1
:
any
,
a2
:
any
)
{
...
...
assets/Coloring/script/Core/Manager/SoundMgr.ts
View file @
42be91ea
...
@@ -207,6 +207,7 @@ export default class SoundMgr extends Manager{
...
@@ -207,6 +207,7 @@ export default class SoundMgr extends Manager{
//播放URL的音效
//播放URL的音效
public
async
playEffectByUrl
(
resName
:
string
,
delay
:
number
=
0
,
volume
:
number
=
1
,
isLoop
:
boolean
=
false
)
{
public
async
playEffectByUrl
(
resName
:
string
,
delay
:
number
=
0
,
volume
:
number
=
1
,
isLoop
:
boolean
=
false
)
{
this
.
stopAllMusic
();
let
audio
=
await
this
.
loadResEffectByUrl
(
resName
)
let
audio
=
await
this
.
loadResEffectByUrl
(
resName
)
if
(
audio
)
{
if
(
audio
)
{
let
id
=
cc
.
audioEngine
.
play
(
audio
,
isLoop
,
volume
)
let
id
=
cc
.
audioEngine
.
play
(
audio
,
isLoop
,
volume
)
...
@@ -220,6 +221,7 @@ export default class SoundMgr extends Manager{
...
@@ -220,6 +221,7 @@ export default class SoundMgr extends Manager{
//播放场景中的音效
//播放场景中的音效
public
playResEffect
(
resName
:
string
,
delay
:
number
=
0
,
volume
:
number
=
1
,
isLoop
:
boolean
=
false
){
public
playResEffect
(
resName
:
string
,
delay
:
number
=
0
,
volume
:
number
=
1
,
isLoop
:
boolean
=
false
){
this
.
stopAllMusic
();
let
audio
=
this
.
loadResEffectClone
(
resName
)
let
audio
=
this
.
loadResEffectClone
(
resName
)
if
(
audio
){
if
(
audio
){
let
id
=
cc
.
audioEngine
.
play
(
audio
,
isLoop
,
volume
)
let
id
=
cc
.
audioEngine
.
play
(
audio
,
isLoop
,
volume
)
...
...
assets/Coloring/script/Core/Util/UIUtil.ts
View file @
42be91ea
...
@@ -191,5 +191,19 @@ export default class UIUtil {
...
@@ -191,5 +191,19 @@ export default class UIUtil {
return
sprite
return
sprite
}
}
//提取网络图片
public
static
async
getSpriteByUrl
(
key
:{
url
:
string
}):
Promise
<
cc
.
SpriteFrame
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
cc
.
loader
.
load
(
key
,
(
err
,
img
)
=>
{
if
(
err
)
{
cc
.
error
(
"
loadBundleByUrl error
"
,
key
.
url
,
err
)
reject
(
err
)
}
else
{
const
spriteFrame
=
new
cc
.
SpriteFrame
(
img
)
resolve
(
spriteFrame
);
}
})
});
}
}
}
\ No newline at end of file
assets/Coloring/script/Game/MenuController.ts
View file @
42be91ea
...
@@ -16,6 +16,8 @@ export default class MenuController extends Controller{
...
@@ -16,6 +16,8 @@ export default class MenuController extends Controller{
private
colorCur
:
string
//当前选择的色彩
private
colorCur
:
string
//当前选择的色彩
private
answers
:
string
[]
private
answers
:
string
[]
private
camera
:
cc
.
Camera
private
camera
:
cc
.
Camera
private
isCanTap
:
boolean
=
true
;
constructor
(){
constructor
(){
super
();
super
();
...
@@ -33,7 +35,7 @@ export default class MenuController extends Controller{
...
@@ -33,7 +35,7 @@ export default class MenuController extends Controller{
await
this
.
model
.
init
();
await
this
.
model
.
init
();
this
.
view
=
await
this
.
getView
(
ViewConst
.
MenuView
,
MenuView
)
as
MenuView
;
this
.
view
=
await
this
.
getView
(
ViewConst
.
MenuView
,
MenuView
)
as
MenuView
;
await
this
.
view
.
updateData
();
await
this
.
view
.
updateData
(
this
.
model
);
this
.
view
.
open
();
this
.
view
.
open
();
let
gameData
=
this
.
model
.
getItem
(
this
.
stageIdx
);
let
gameData
=
this
.
model
.
getItem
(
this
.
stageIdx
);
...
@@ -44,7 +46,7 @@ export default class MenuController extends Controller{
...
@@ -44,7 +46,7 @@ export default class MenuController extends Controller{
this
.
answers
=
new
Array
();
this
.
answers
=
new
Array
();
cc
.
log
(
words
);
cc
.
log
(
words
);
cc
.
log
(
answers
);
cc
.
log
(
answers
);
let
colorBlocks
=
this
.
view
.
colorItems
;
let
colorBlocks
=
this
.
view
.
colorItems
1
;
for
(
let
i
=
0
;
i
<
colorBlocks
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
colorBlocks
.
length
;
i
++
){
cc
.
log
(
colorBlocks
[
i
].
name
);
cc
.
log
(
colorBlocks
[
i
].
name
);
let
word
=
colorBlocks
[
i
].
getComponentInChildren
(
cc
.
Label
);
let
word
=
colorBlocks
[
i
].
getComponentInChildren
(
cc
.
Label
);
...
@@ -52,6 +54,10 @@ export default class MenuController extends Controller{
...
@@ -52,6 +54,10 @@ export default class MenuController extends Controller{
colorBlocks
[
i
].
color
=
cc
.
Color
.
WHITE
;
colorBlocks
[
i
].
color
=
cc
.
Color
.
WHITE
;
// colorBlocks[i].getComponent(cc.Sprite).trim=true;
// colorBlocks[i].getComponent(cc.Sprite).trim=true;
colorBlocks
[
i
].
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,()
=>
{
colorBlocks
[
i
].
on
(
cc
.
Node
.
EventType
.
TOUCH_START
,()
=>
{
// if(!this.isCanTap){
// return;
// }
// this.isCanTap=false;
if
(
GameUtil
.
isEmptyObj
(
this
.
colorCur
))
if
(
GameUtil
.
isEmptyObj
(
this
.
colorCur
))
{
{
return
;
return
;
...
@@ -70,7 +76,7 @@ export default class MenuController extends Controller{
...
@@ -70,7 +76,7 @@ export default class MenuController extends Controller{
color
.
fromHEX
(
this
.
colorCur
);
color
.
fromHEX
(
this
.
colorCur
);
colorBlocks
[
i
].
color
=
color
;
colorBlocks
[
i
].
color
=
color
;
// cc.Color.fromHEX(colorBlocks[i].color,+"#"+this.colorCur);
// cc.Color.fromHEX(colorBlocks[i].color,+"#"+this.colorCur);
this
.
onRight
(
itemAudio
);
this
.
onRight
();
let
flag
=
0
;
let
flag
=
0
;
for
(
let
i
=
0
;
i
<
this
.
answers
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
answers
.
length
;
i
++
){
...
@@ -78,7 +84,7 @@ export default class MenuController extends Controller{
...
@@ -78,7 +84,7 @@ export default class MenuController extends Controller{
flag
++
;
flag
++
;
}
}
}
}
(
flag
>=
answers
.
length
)
&&
this
.
finish
(
colorBlocks
);
(
flag
>=
answers
.
length
)
&&
this
.
finish
();
}
}
});
});
colorBlocks
[
i
].
_hitTest
=
this
.
_hitTest
.
bind
(
this
);
colorBlocks
[
i
].
_hitTest
=
this
.
_hitTest
.
bind
(
this
);
...
@@ -127,13 +133,18 @@ export default class MenuController extends Controller{
...
@@ -127,13 +133,18 @@ export default class MenuController extends Controller{
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
normal
"
,
-
1
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
normal
"
,
-
1
);
}
}
private
finish
(
colorBlocks
){
private
finish
(){
AppFacade
.
getMgr
(
SoundMgr
).
playResEffect
(
this
.
model
.
getFinishAudio
());
AppFacade
.
getMgr
(
SoundMgr
).
playEffectByUrl
(
this
.
model
.
getFinishAudio
());
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
finish
"
,
1
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
finish
"
,
1
,()
=>
{
this
.
view
.
resultPaint
.
active
=
true
;
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
normal
"
,
-
1
);
this
.
view
.
paint
.
active
=
false
;
});
// this.view.resultPaint.active=true;
// this.view.paint.active=false;
let
resultPaint
=
this
.
view
.
resultPaint
.
children
[
0
];
// let resultPaint=this.view.resultPaint.children[0];
this
.
view
.
showPaint2
();
let
colorBlocks
=
this
.
view
.
colorItems1
;
let
colorBlocks2
=
this
.
view
.
colorItems2
;
// let colorBlocks=this.view.colorItems;
// let colorBlocks=this.view.colorItems;
for
(
let
i
=
0
;
i
<
colorBlocks
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
colorBlocks
.
length
;
i
++
){
// cc.log(colorBlocks[i].color);
// cc.log(colorBlocks[i].color);
...
@@ -141,7 +152,7 @@ export default class MenuController extends Controller{
...
@@ -141,7 +152,7 @@ export default class MenuController extends Controller{
// word.string=words[i];
// word.string=words[i];
// colorBlocks[i].color=cc.Color.WHITE;
// colorBlocks[i].color=cc.Color.WHITE;
let
item
=
resultPaint
.
children
[
i
];
let
item
=
colorBlocks2
[
i
]
if
(
colorBlocks
[
i
].
color
){
if
(
colorBlocks
[
i
].
color
){
item
.
color
=
colorBlocks
[
i
].
color
;
item
.
color
=
colorBlocks
[
i
].
color
;
}
}
...
@@ -166,19 +177,24 @@ export default class MenuController extends Controller{
...
@@ -166,19 +177,24 @@ export default class MenuController extends Controller{
}
}
private
async
onRight
(){
private
async
onRight
(){
AppFacade
.
getMgr
(
SoundMgr
).
playEffectByUrl
(
this
.
model
.
getFinishWaitAudio
());
AppFacade
.
getMgr
(
SoundMgr
).
playResEffect
(
ResConst
.
snd
.
right
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
right
"
,
1
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
right
"
,
1
,()
=>
{
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
normal
"
,
-
1
);
});
cc
.
log
(
"
Right
"
)
cc
.
log
(
"
Right
"
)
}
}
private
onWrong
(){
private
onWrong
(){
AppFacade
.
getMgr
(
SoundMgr
).
playResEffect
(
this
.
model
.
getFinishWaitAudio
());
AppFacade
.
getMgr
(
SoundMgr
).
playResEffect
(
ResConst
.
snd
.
wrong
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
wrong
"
,
1
);
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
wrong
"
,
1
,()
=>
{
this
.
playDragonBoneAnimation
(
this
.
catAni
,
"
normal
"
,
-
1
);
});
cc
.
log
(
"
Wrong
"
)
cc
.
log
(
"
Wrong
"
)
}
}
private
onClickRole
(){
private
onClickRole
(){
AppFacade
.
getMgr
(
SoundMgr
).
playResEffect
(
ResConst
.
snd
.
click
);
// AppFacade.getMgr(SoundMgr).playResEffect(ResConst.snd.click);
AppFacade
.
getMgr
(
SoundMgr
).
playEffectByUrl
(
this
.
model
.
getStartAudio
());
}
}
...
...
assets/Coloring/script/Game/MenuModel.ts
View file @
42be91ea
...
@@ -3,6 +3,7 @@ import { defaultData } from "../defaultData";
...
@@ -3,6 +3,7 @@ import { defaultData } from "../defaultData";
export
default
class
MenuModel
extends
Model
{
export
default
class
MenuModel
extends
Model
{
public
stageIdx
=
0
;
private
data
;
private
data
;
public
async
init
()
{
public
async
init
()
{
let
getData
=
this
.
getData
.
bind
(
this
);
let
getData
=
this
.
getData
.
bind
(
this
);
...
@@ -37,6 +38,11 @@ export default class MenuModel extends Model{
...
@@ -37,6 +38,11 @@ export default class MenuModel extends Model{
func
(
this
.
getDefaultData
());
func
(
this
.
getDefaultData
());
}
}
public
getFont
(){
let
node
=
cc
.
find
(
"
res/font/MMTextBook-Bold
"
);
let
label
=
node
.
getComponent
(
cc
.
Label
);
return
label
.
font
;
}
public
getConfigs
(){
public
getConfigs
(){
return
this
.
data
;
return
this
.
data
;
}
}
...
...
assets/Coloring/script/Game/MenuView.ts
View file @
42be91ea
import
UIFullView
from
"
../Core/BaseView/UIFullView
"
;
import
UIFullView
from
"
../Core/BaseView/UIFullView
"
;
import
{
ViewConst
}
from
"
../Core/ConstDefine/ViewConst
"
;
import
{
ViewConst
}
from
"
../Core/ConstDefine/ViewConst
"
;
import
UIButton
from
"
../Core/UI/UIButton
"
;
import
UIButton
from
"
../Core/UI/UIButton
"
;
import
GameUtil
from
"
../Core/Util/GameUtil
"
;
import
UIUtil
from
"
../Core/Util/UIUtil
"
;
import
MenuModel
from
"
./MenuModel
"
;
export
default
class
MenuView
extends
UIFullView
{
export
default
class
MenuView
extends
UIFullView
{
public
paint
:
cc
.
Node
;
//游戏画板
private
paint
:
cc
.
Node
;
//游戏画板
public
resultPaint
:
cc
.
Node
;
//结束画板
private
resultPaint
:
cc
.
Node
;
//结束画板
public
paint1
:
cc
.
Node
;
//游戏色块父节点
public
paint2
:
cc
.
Node
;
//结束面板色块父节点
// public palette:cc.Node; //调色板
// public palette:cc.Node; //调色板
public
choiceColor
:
cc
.
Node
;
//色彩选择框
public
choiceColor
:
cc
.
Node
;
//色彩选择框
public
roleAnimation
:
dragonBones
.
ArmatureDisplay
;
//动画角色猫龙骨骼
public
roleAnimation
:
dragonBones
.
ArmatureDisplay
;
//动画角色猫龙骨骼
public
btnSubmit
:
UIButton
//提交按钮*取消
public
btnSubmit
:
UIButton
//提交按钮*取消
public
btnColors
:
UIButton
[]
//色彩按钮
public
btnColors
:
UIButton
[]
//色彩按钮
public
colorItems
:
cc
.
Node
[];
//要涂的色块对象。每个色块为一个节点。对节点进行改色
public
colorItems1
:
cc
.
Node
[];
//要涂的色块对象。每个色块为一个节点。对节点进行改色
public
colorItems2
:
cc
.
Node
[];
//结束面板色块对象。每个色块为一个节点。对节点进行改色
public
btnRole
:
UIButton
public
btnRole
:
UIButton
public
getTypeName
():
string
{
public
getTypeName
():
string
{
...
@@ -20,15 +26,20 @@ export default class MenuView extends UIFullView{
...
@@ -20,15 +26,20 @@ export default class MenuView extends UIFullView{
}
}
protected
async
getChilds
(){
protected
async
getChilds
(){
this
.
paint
=
this
.
getChildNode
(
"
main_area/paint
"
);
this
.
paint
=
this
.
getChildNode
(
"
main_area/paint
"
);
let
colorArea
=
this
.
getChildNode
(
"
main_area/paint/alligator
"
);
this
.
paint1
=
this
.
getChildNode
(
"
main_area/paint/alligator
"
);
this
.
colorItems
=
new
Array
();
this
.
paint1
.
destroyAllChildren
();
for
(
let
i
=
0
;
i
<
colorArea
.
childrenCount
;
i
++
){
let
item
=
colorArea
.
children
[
i
];
// this.colorItems=new Array();
this
.
colorItems
[
i
]
=
item
;
// for(let i=0;i<colorArea.childrenCount;i++){
}
// let item=colorArea.children[i];
// this.colorItems[i]=item;
// }
this
.
resultPaint
=
this
.
getChildNode
(
"
paint2
"
);
this
.
resultPaint
=
this
.
getChildNode
(
"
paint2
"
);
this
.
paint2
=
this
.
getChildNode
(
"
paint2/alligator
"
);
this
.
paint2
.
destroyAllChildren
();
let
palette
=
this
.
getChildNode
(
"
color_area
"
);
let
palette
=
this
.
getChildNode
(
"
color_area
"
);
this
.
choiceColor
=
this
.
getChildNode
(
"
color_area/icon_choose
"
);
this
.
choiceColor
=
this
.
getChildNode
(
"
color_area/icon_choose
"
);
this
.
roleAnimation
=
this
.
getChildComp
(
"
bottom_area/coolcat
"
,
dragonBones
.
ArmatureDisplay
);
this
.
roleAnimation
=
this
.
getChildComp
(
"
bottom_area/coolcat
"
,
dragonBones
.
ArmatureDisplay
);
...
@@ -47,7 +58,65 @@ export default class MenuView extends UIFullView{
...
@@ -47,7 +58,65 @@ export default class MenuView extends UIFullView{
}
}
}
}
protected
async
onUpdateData
(){
public
showPaint2
(){
this
.
paint
.
active
=
false
;
this
.
resultPaint
.
active
=
true
;
}
protected
async
onUpdateData
(
model
:
MenuModel
){
let
images
:{
img
:
string
}[]
=
model
.
getImages
();
let
bg1
=
this
.
getChildComp
(
"
main_area/paint/alligator
"
,
cc
.
Sprite
);
let
bg2
=
this
.
getChildComp
(
"
paint2/alligator
"
,
cc
.
Sprite
);
bg1
.
spriteFrame
=
await
UIUtil
.
getSpriteByUrl
(
model
.
getBG
());
bg2
.
spriteFrame
=
await
UIUtil
.
getSpriteByUrl
(
model
.
getBG
());
//要涂的色块
this
.
colorItems1
=
new
Array
();
let
colorArea1
=
this
.
paint1
;
this
.
colorItems2
=
new
Array
();
let
colorArea2
=
this
.
paint2
;
let
gameData
=
model
.
getItem
(
model
.
stageIdx
);
let
words
=
gameData
.
words
.
split
(
""
);
let
pos
=
gameData
.
pos
;
for
(
let
i
=
0
;
i
<
images
.
length
;
i
++
)
{
let
spriteFrame
=
await
UIUtil
.
getSpriteByUrl
({
url
:
images
[
i
].
img
})
let
item1
=
GameUtil
.
createNode
(
"
img
"
+
1
,
colorArea1
);
item1
.
group
=
"
camera
"
;
let
sprite1
:
cc
.
Sprite
=
this
.
addCCComp
(
item1
,
cc
.
Sprite
);
sprite1
.
spriteFrame
=
spriteFrame
;
let
wordNode1
=
GameUtil
.
createNode
(
"
word
"
,
item1
);
wordNode1
.
x
=
pos
[
i
][
0
];
wordNode1
.
y
=
pos
[
i
][
1
];
wordNode1
.
color
=
cc
.
Color
.
BLACK
;
let
label1
:
cc
.
Label
=
this
.
addCCComp
(
wordNode1
,
cc
.
Label
);
label1
.
string
=
words
[
i
];
label1
.
font
=
model
.
getFont
();
label1
.
fontSize
=
80
;
label1
.
lineHeight
=
80
;
this
.
colorItems1
[
i
]
=
sprite1
.
node
;
let
item2
=
GameUtil
.
createNode
(
"
img
"
+
1
,
colorArea2
);
item2
.
group
=
"
camera
"
let
sprite2
:
cc
.
Sprite
=
this
.
addCCComp
(
item2
,
cc
.
Sprite
);
sprite2
.
spriteFrame
=
spriteFrame
;
let
wordNode2
=
GameUtil
.
createNode
(
"
word
"
,
item2
);
wordNode2
.
anchorX
=
0
;
wordNode2
.
x
=
pos
[
i
][
0
];
wordNode2
.
y
=
pos
[
i
][
1
];
wordNode2
.
color
=
cc
.
Color
.
BLACK
;
let
label2
:
cc
.
Label
=
this
.
addCCComp
(
wordNode2
,
cc
.
Label
);
label2
.
string
=
words
[
i
];
label2
.
font
=
model
.
getFont
();
label2
.
fontSize
=
80
;
label2
.
lineHeight
=
80
;
this
.
colorItems2
[
i
]
=
sprite2
.
node
;
}
}
}
protected
onOpen
(){
protected
onOpen
(){
...
...
assets/Coloring/script/defaultData.js
View file @
42be91ea
...
@@ -2,9 +2,16 @@ export const defaultData =
...
@@ -2,9 +2,16 @@ export const defaultData =
{
{
"
items
"
:
[
"
items
"
:
[
{
{
"
words
"
:
"
aAcBaCbA
"
,
"
words
"
:
"
FdFFf
"
,
"
answers
"
:
"
0147
"
,
"
answers
"
:
"
0234
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3
"
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3
"
,
"
pos
"
:[
[
-
425.989
,
-
6.456
],
[
-
37.043
,
195.708
],
[
151.487
,
-
129.498
],
[
570.348
,
200
],
[
617.5
,
43.247
]
]
},
},
{
{
"
words
"
:
"
aAcBaCbA
"
,
"
words
"
:
"
aAcBaCbA
"
,
...
@@ -12,19 +19,30 @@ export const defaultData =
...
@@ -12,19 +19,30 @@ export const defaultData =
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3
"
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3
"
},
},
],
],
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3
"
,
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/18bf8207ddea222c9b82c68f2549dadc.mp3
"
,
"
waitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd8a2b8eeb4abbe7683d30e728ece184.mp3
"
,
"
waitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/46cba1330608d848239ec6a68bb4707e.mp3
"
,
"
finishAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/17edcaecd09a72a64a77480673cdc232.mp3
"
,
"
finishAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3
"
,
"
finishWaitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/c0926db86deeb3edc9642cb14a516b36.mp3
"
,
"
finishWaitAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/b3260e3d6972cc59b345f573aaab4290.mp3
"
,
"
bg
"
:
"
http://staging-teach.cdn.ireadabc.com/5a6b2c02be73b864c7aa5d83099c6263.png
"
,
"
rightAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/e3921a16a8313df274d8bc4e3f2bedd8.mp3
"
,
"
images
"
:
[
"
wrongAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fca98e3ed3f1269c07de6aac67f9d2c2.mp3
"
,
{
"
bg
"
:
"
http://staging-teach.cdn.ireadabc.com/90bd03bdc2437b51055ed0423bac9b4a.png
"
,
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/9fb2c19d37ee3f71352c85fb3fe08768.png
"
"
images
"
:
[
},
{
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/4cc0099a522ba36f0916b6aeb5c85a84.png
"
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/c281cbfa449b15f6d2a444f1162bf421.png
"
},
}
{
]
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/5ef1b6241fbdb251848ec9ae3bc3773a.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/b8369480bf8db275d94c889d6155ab52.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/3caca3cd7fff035545689e1b0d5cc724.png
"
},
{
"
img
"
:
"
http://staging-teach.cdn.ireadabc.com/e6b058fa93f6d635afab2c3b853d3ac1.png
"
}
]
}
}
// {
// {
// "items": [
// "items": [
...
...
assets/Coloring/textures/test.meta
0 → 100644
View file @
42be91ea
{
"ver": "1.1.2",
"uuid": "708cca69-e488-459b-b87e-4f63e03d27d4",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff.png
0 → 100644
View file @
42be91ea
287 KB
assets/Coloring/textures/test/Ff.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "0848006a-b3a2-4be0-82b7-7ebd757e12e4",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff": {
"ver": "1.0.4",
"uuid": "01f99d17-df74-416f-8e7b-963d729fa77c",
"rawTextureUuid": "0848006a-b3a2-4be0-82b7-7ebd757e12e4",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -1,
"offsetY": 17,
"trimX": 50,
"trimY": 31,
"width": 1305,
"height": 635,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff1.png
0 → 100644
View file @
42be91ea
13.4 KB
assets/Coloring/textures/test/Ff1.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "85474ca0-6d94-4fa2-aae7-ab0b019a8773",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff1": {
"ver": "1.0.4",
"uuid": "9fcb715d-4988-46c5-89b6-9d9becd6996c",
"rawTextureUuid": "85474ca0-6d94-4fa2-aae7-ab0b019a8773",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -459,
"offsetY": 43,
"trimX": 58,
"trimY": 181,
"width": 373,
"height": 283,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff2.png
0 → 100644
View file @
42be91ea
31.3 KB
assets/Coloring/textures/test/Ff2.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "6e659dbc-3f8f-4624-bd14-e2b059c6e4cf",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff2": {
"ver": "1.0.4",
"uuid": "1d7622b3-7a2f-4798-bf2c-6f57b9b1c416",
"rawTextureUuid": "6e659dbc-3f8f-4624-bd14-e2b059c6e4cf",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -13,
"offsetY": 192,
"trimX": 376,
"trimY": 40,
"width": 629,
"height": 267,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff3.png
0 → 100644
View file @
42be91ea
13.1 KB
assets/Coloring/textures/test/Ff3.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "447a83ff-1af3-4c2b-a6c1-1f6cdbe96369",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff3": {
"ver": "1.0.4",
"uuid": "d1901a0c-7f87-452b-b20c-0f9b2d7d6b8d",
"rawTextureUuid": "447a83ff-1af3-4c2b-a6c1-1f6cdbe96369",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 175,
"offsetY": -101.5,
"trimX": 752,
"trimY": 365,
"width": 253,
"height": 204,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff4.png
0 → 100644
View file @
42be91ea
8.61 KB
assets/Coloring/textures/test/Ff4.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "0e42b3da-a83f-4050-bd25-a79d7bd68d4e",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff4": {
"ver": "1.0.4",
"uuid": "20b6e9bb-97e8-41f1-917a-16fd9224bcb5",
"rawTextureUuid": "0e42b3da-a83f-4050-bd25-a79d7bd68d4e",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 567,
"offsetY": 217.5,
"trimX": 1208,
"trimY": 86,
"width": 125,
"height": 124,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/Coloring/textures/test/Ff5.png
0 → 100644
View file @
42be91ea
7.47 KB
assets/Coloring/textures/test/Ff5.png.meta
0 → 100644
View file @
42be91ea
{
"ver": "2.3.5",
"uuid": "c511c8db-f4f7-43aa-b03e-660f10e817b2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1407,
"height": 731,
"platformSettings": {},
"subMetas": {
"Ff5": {
"ver": "1.0.4",
"uuid": "67c5a188-253f-4d98-aa26-df3d814b9bfe",
"rawTextureUuid": "c511c8db-f4f7-43aa-b03e-660f10e817b2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 617,
"offsetY": 59.5,
"trimX": 1292,
"trimY": 278,
"width": 57,
"height": 56,
"rawWidth": 1407,
"rawHeight": 731,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
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