Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
debug_shell
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
debug_shell
Commits
cb954d20
Commit
cb954d20
authored
Dec 06, 2021
by
liujiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui
parent
2993b91f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
420 additions
and
46 deletions
+420
-46
debug_shell.fire
play/assets/debug_shell/scene/debug_shell.fire
+368
-33
oxford_front.ts
play/assets/oxford_front/scene/oxford_front.ts
+52
-13
No files found.
play/assets/debug_shell/scene/debug_shell.fire
View file @
cb954d20
This diff is collapsed.
Click to expand it.
play/assets/oxford_front/scene/oxford_front.ts
View file @
cb954d20
...
@@ -53,12 +53,41 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -53,12 +53,41 @@ export default class SceneComponent extends MyCocosSceneComponent {
FullPageNode
:
cc
.
Node
[]
=
[];
FullPageNode
:
cc
.
Node
[]
=
[];
tw
:
cc
.
Tween
=
null
;
tw
s
:
any
[]
=
[]
;
gameMachineService
:
any
=
null
;
gameMachineService
:
any
=
null
;
LoadingCount
:
number
=
0
;
LoadingCount
:
number
=
1
;
_mapScaleMin
:
number
=
1
;
start
()
{
_mapScaleMax
:
number
=
1
;
_cocosScale
:
number
=
1
;
onLoad
(){
this
.
tws
=
[];
this
.
LoadingCount
=
0
;
this
.
LoadingCount
=
0
;
this
.
initSize
();
}
initSize
()
{
// 注意cc.winSize只有在适配后(修改fitHeight/fitWidth后)才能获取到正确的值,因此使用cc.getFrameSize()来获取初始的屏幕大小
let
screen_size
=
cc
.
view
.
getFrameSize
().
width
/
cc
.
view
.
getFrameSize
().
height
let
design_size
=
cc
.
Canvas
.
instance
.
designResolution
.
width
/
cc
.
Canvas
.
instance
.
designResolution
.
height
let
f
=
screen_size
>=
design_size
cc
.
Canvas
.
instance
.
fitHeight
=
f
cc
.
Canvas
.
instance
.
fitWidth
=
!
f
const
frameSize
=
cc
.
view
.
getFrameSize
();
this
.
_frameSize
=
frameSize
;
this
.
_designSize
=
cc
.
view
.
getDesignResolutionSize
();
let
sx
=
cc
.
winSize
.
width
/
frameSize
.
width
;
let
sy
=
cc
.
winSize
.
height
/
frameSize
.
height
;
this
.
_cocosScale
=
Math
.
min
(
sx
,
sy
);
sx
=
frameSize
.
width
/
this
.
_designSize
.
width
;
sy
=
frameSize
.
height
/
this
.
_designSize
.
height
;
this
.
_mapScaleMin
=
Math
.
min
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMax
=
Math
.
max
(
sx
,
sy
)
*
this
.
_cocosScale
;
}
start
()
{
this
.
showWaitingLetters
();
this
.
showWaitingLetters
();
this
.
initBg
();
this
.
initBg
();
this
.
initSubmarineView
();
this
.
initSubmarineView
();
...
@@ -134,6 +163,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -134,6 +163,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
initSubmarineView
()
{
initSubmarineView
()
{
this
.
submarineView
.
node
.
on
(
'
scrolling
'
,
this
.
moveSubmarineBackground
,
this
);
this
.
submarineView
.
node
.
on
(
'
scrolling
'
,
this
.
moveSubmarineBackground
,
this
);
this
.
SubmarineView
.
active
=
false
;
}
}
moveSubmarineBackground
()
{
moveSubmarineBackground
()
{
...
@@ -511,7 +541,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -511,7 +541,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
if
(
this
.
LoadingCount
<=
0
)
{
if
(
this
.
LoadingCount
<=
0
)
{
this
.
LoadingCount
=
0
;
this
.
LoadingCount
=
0
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
tw
&&
this
.
tw
.
stop
();
if
(
this
.
tws
){
for
(
const
tw
of
this
.
tws
)
{
tw
.
node
.
y
=
0
;
tw
.
tw
.
stop
();
}
}
this
.
loading
.
active
=
false
;
this
.
loading
.
active
=
false
;
});
});
}
}
...
@@ -525,14 +560,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -525,14 +560,18 @@ export default class SceneComponent extends MyCocosSceneComponent {
const
text
=
this
.
loading
.
getChildByName
(
'
text
'
)
const
text
=
this
.
loading
.
getChildByName
(
'
text
'
)
text
.
children
.
forEach
((
node
,
idx
)
=>
{
text
.
children
.
forEach
((
node
,
idx
)
=>
{
node
.
color
=
colorList
[
idx
];
node
.
color
=
colorList
[
idx
];
this
.
tw
=
cc
.
tween
(
node
)
const
tw
=
cc
.
tween
(
node
)
.
delay
(
idx
/
4
)
.
delay
(
idx
/
4
)
.
by
(
0.3
,
{
y
:
50
},
{
easing
:
'
sineOut
'
})
.
to
(
0.3
,
{
y
:
50
},
{
easing
:
'
sineOut
'
})
.
by
(
0.3
,
{
y
:
-
50
},
{
easing
:
'
sineIn
'
})
.
to
(
0.3
,
{
y
:
-
50
},
{
easing
:
'
sineIn
'
})
.
delay
((
text
.
children
.
length
-
idx
)
/
4
)
.
delay
((
text
.
children
.
length
-
idx
)
/
4
)
.
union
()
.
union
()
.
repeatForever
()
.
repeatForever
()
.
start
();
.
start
();
this
.
tws
.
push
({
tw
,
node
});
});
});
this
.
loading
.
active
=
true
;
this
.
loading
.
active
=
true
;
}
}
...
...
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