Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP15
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
OP15
Commits
f3bcc7bd
Commit
f3bcc7bd
authored
Dec 08, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add native fn flag
parent
98a8eb7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
66 deletions
+68
-66
OP15.js
play/assets/OP15/scene/OP15.js
+68
-66
No files found.
play/assets/OP15/scene/OP15.js
View file @
f3bcc7bd
...
@@ -581,80 +581,82 @@ cc.Class({
...
@@ -581,80 +581,82 @@ cc.Class({
const
gs
=
groundBg
.
getComponent
(
cc
.
Sprite
);
const
gs
=
groundBg
.
getComponent
(
cc
.
Sprite
);
gs
.
spriteFrame
=
sf
;
gs
.
spriteFrame
=
sf
;
groundBg
.
active
=
true
;
groundBg
.
active
=
true
;
});
let
dbCount
=
0
;
let
dbCount
=
0
;
let
finishDbCount
=
0
let
finishDbCount
=
0
for
(
const
block
of
this
.
data
.
hotZoneItemArr
)
{
for
(
const
block
of
this
.
data
.
hotZoneItemArr
)
{
if
(
block
.
gIdx
==
'
0
'
||
block
.
gIdx
==
'
1
'
)
{
if
(
block
.
gIdx
==
'
0
'
||
block
.
gIdx
==
'
1
'
)
{
dbCount
++
;
dbCount
++
;
}
}
}
}
for
(
const
block
of
this
.
data
.
hotZoneItemArr
)
{
for
(
const
block
of
this
.
data
.
hotZoneItemArr
)
{
if
(
block
.
gIdx
==
'
2
'
)
{
if
(
block
.
gIdx
==
'
2
'
)
{
const
s1
=
((
ground
.
width
/
block
.
imgSizeW
)
+
(
ground
.
height
/
block
.
imgSizeH
))
/
2
const
s1
=
((
ground
.
width
/
block
.
imgSizeW
)
+
(
ground
.
height
/
block
.
imgSizeH
))
/
2
const
node
=
new
cc
.
Node
();
const
node
=
new
cc
.
Node
();
node
.
parent
=
ground
;
node
.
parent
=
ground
;
const
spr
=
node
.
addComponent
(
cc
.
Sprite
);
const
spr
=
node
.
addComponent
(
cc
.
Sprite
);
getSpriteFrimeByUrl
(
block
.
pic_url
,
(
sf
)
=>
{
getSpriteFrimeByUrl
(
block
.
pic_url
,
(
sf
)
=>
{
spr
.
spriteFrame
=
sf
;
spr
.
spriteFrame
=
sf
;
node
.
scale
=
s1
;
node
.
scale
=
s1
;
})
})
}
}
if
(
block
.
gIdx
==
'
0
'
||
block
.
gIdx
==
'
1
'
)
{
if
(
block
.
gIdx
==
'
0
'
||
block
.
gIdx
==
'
1
'
)
{
const
n
=
new
cc
.
Node
();
const
n
=
new
cc
.
Node
();
n
.
scale
=
0.25
;
n
.
scale
=
0.25
;
const
db
=
n
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
const
db
=
n
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
n
.
parent
=
ground
;
n
.
parent
=
ground
;
n
.
active
=
false
;
n
.
active
=
false
;
loadDragonBones
(
db
,
{
loadDragonBones
(
db
,
{
tex
:
block
.
texPngData
.
url
,
tex
:
block
.
texPngData
.
url
,
atlas
:
block
.
texJsonData
.
url
,
atlas
:
block
.
texJsonData
.
url
,
ske
:
block
.
skeJsonData
.
url
,
ske
:
block
.
skeJsonData
.
url
,
}).
then
(({
width
,
height
})
=>
{
}).
then
(({
width
,
height
})
=>
{
n
.
width
=
width
;
n
.
width
=
width
;
n
.
height
=
height
;
n
.
height
=
height
;
n
.
active
=
true
;
n
.
active
=
true
;
db
.
playAnimation
(
'
normal
'
,
0
);
db
.
playAnimation
(
'
normal
'
,
0
);
finishDbCount
++
;
finishDbCount
++
;
console
.
log
(
finishDbCount
,
dbCount
)
console
.
log
(
finishDbCount
,
dbCount
)
if
(
finishDbCount
==
dbCount
)
{
if
(
finishDbCount
==
dbCount
)
{
this
.
loadEnd
();
this
.
loadEnd
();
}
}).
catch
(()
=>
{
finishDbCount
++
;
console
.
log
(
finishDbCount
,
dbCount
)
if
(
finishDbCount
==
dbCount
)
{
this
.
loadEnd
();
}
});
if
(
block
.
gIdx
==
'
0
'
)
{
const
rectInfo
=
{
node
:
n
,
audio_url
:
block
.
audio_url
,
rect
:
{
x
:
block
.
rect
.
x
/
baseRect
.
width
,
y
:
block
.
rect
.
y
/
baseRect
.
height
,
width
:
block
.
rect
.
width
/
baseRect
.
width
,
height
:
block
.
rect
.
height
/
baseRect
.
height
,
}
}
};
}).
catch
(()
=>
{
this
.
_figurePointRectArray
.
push
(
rectInfo
);
finishDbCount
++
;
console
.
log
(
finishDbCount
,
dbCount
)
if
(
block
.
labelText
)
{
if
(
finishDbCount
==
dbCount
)
{
const
k
=
+
block
.
labelText
*
1000
;
this
.
loadEnd
();
if
(
!
isNaN
(
k
))
{
}
this
.
_hintsNodeList
.
push
({
});
node
:
n
,
if
(
block
.
gIdx
==
'
0
'
)
{
after
:
k
const
rectInfo
=
{
});
node
:
n
,
audio_url
:
block
.
audio_url
,
rect
:
{
x
:
block
.
rect
.
x
/
baseRect
.
width
,
y
:
block
.
rect
.
y
/
baseRect
.
height
,
width
:
block
.
rect
.
width
/
baseRect
.
width
,
height
:
block
.
rect
.
height
/
baseRect
.
height
,
}
};
this
.
_figurePointRectArray
.
push
(
rectInfo
);
if
(
block
.
labelText
)
{
const
k
=
+
block
.
labelText
*
1000
;
if
(
!
isNaN
(
k
))
{
this
.
_hintsNodeList
.
push
({
node
:
n
,
after
:
k
});
}
}
}
}
}
}
}
}
}
}
});
// console.log(this.data);
// console.log(this.data);
console
.
log
(
'
resource perload finish
'
);
console
.
log
(
'
resource perload finish
'
);
...
...
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