Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
ngt7_fish
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
ngt7_fish
Commits
da901f3e
Commit
da901f3e
authored
Nov 14, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改完成
parent
b7a48342
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
boatmove.ts
assets/ngt7_fish/scene/game/boatmove.ts
+1
-1
netscale.ts
assets/ngt7_fish/scene/game/netscale.ts
+1
-1
ngt7_fish.fire
assets/ngt7_fish/scene/ngt7_fish.fire
+2
-2
ngt7_fish.ts
assets/ngt7_fish/scene/ngt7_fish.ts
+11
-8
No files found.
assets/ngt7_fish/scene/game/boatmove.ts
View file @
da901f3e
...
@@ -15,7 +15,7 @@ export default class boatmove extends cc.Component {
...
@@ -15,7 +15,7 @@ export default class boatmove extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// LIFE-CYCLE CALLBACKS:
onLoad
()
{
onLoad
()
{
let
mul
=
3
;
let
mul
=
1.5
;
if
(
this
.
firstUp
)
{
if
(
this
.
firstUp
)
{
cc
.
tween
(
this
.
node
).
repeatForever
(
cc
.
tween
(
this
.
node
).
repeatForever
(
cc
.
tween
()
cc
.
tween
()
...
...
assets/ngt7_fish/scene/game/netscale.ts
View file @
da901f3e
...
@@ -15,7 +15,7 @@ export default class netscale extends cc.Component {
...
@@ -15,7 +15,7 @@ export default class netscale extends cc.Component {
// LIFE-CYCLE CALLBACKS:
// LIFE-CYCLE CALLBACKS:
onLoad
()
{
onLoad
()
{
let
scale
=
0.05
;
let
scale
=
0.05
*
3
;
if
(
this
.
firstUp
)
{
if
(
this
.
firstUp
)
{
cc
.
tween
(
this
.
node
).
repeatForever
(
cc
.
tween
(
this
.
node
).
repeatForever
(
cc
.
tween
()
cc
.
tween
()
...
...
assets/ngt7_fish/scene/ngt7_fish.fire
View file @
da901f3e
...
@@ -4404,7 +4404,7 @@
...
@@ -4404,7 +4404,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
-442.526,
-442.526,
-
64.271
,
-
29.942
,
0,
0,
0,
0,
0,
0,
...
@@ -5303,7 +5303,7 @@
...
@@ -5303,7 +5303,7 @@
"ctor": "Float64Array",
"ctor": "Float64Array",
"array": [
"array": [
452.507,
452.507,
-
64.271
,
-
29.942
,
0,
0,
0,
0,
0,
0,
...
...
assets/ngt7_fish/scene/ngt7_fish.ts
View file @
da901f3e
...
@@ -196,9 +196,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -196,9 +196,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
layout_fish
.
addChild
(
node
);
layout_fish
.
addChild
(
node
);
this
.
scheduleOnce
(()
=>
{
this
.
scheduleOnce
(()
=>
{
this
.
updateItem
(
node
,
fish
);
this
.
updateItem
(
node
,
fish
);
},
index
*
12
)
},
Math
.
floor
(
index
/
2
)
*
8
+
Math
.
random
()
)
});
});
}
}
private
showLeft
:
boolean
;
updateItem
(
item
,
data
:
Option
)
{
updateItem
(
item
,
data
:
Option
)
{
item
.
data
=
data
;
item
.
data
=
data
;
console
.
log
(
data
);
console
.
log
(
data
);
...
@@ -211,26 +212,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -211,26 +212,28 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
item
.
active
=
false
;
item
.
active
=
false
;
//左往右
//左往右
if
(
Math
.
random
()
<
0.5
)
{
let
sceneWidth
=
cc
.
winSize
.
width
;
item
.
x
=
-
(
1920
/
2
+
Math
.
random
()
*
200
)
this
.
showLeft
=
!
this
.
showLeft
if
(
this
.
showLeft
)
{
item
.
x
=
-
(
sceneWidth
/
2
+
Math
.
random
()
*
200
)
item
.
y
=
-
315
-
Math
.
random
()
*
150
;
item
.
y
=
-
315
-
Math
.
random
()
*
150
;
item
.
scaleX
=
-
1
;
item
.
scaleX
=
-
1
;
text
.
scaleX
=
-
1
;
text
.
scaleX
=
-
1
;
item
.
active
=
true
;
item
.
active
=
true
;
cc
.
tween
(
item
).
repeatForever
(
cc
.
tween
().
by
(
21
*
3
,
{
x
:
1920
+
400
}).
call
(()
=>
{
cc
.
tween
(
item
).
repeatForever
(
cc
.
tween
().
by
(
21
*
3
,
{
x
:
sceneWidth
+
400
}).
call
(()
=>
{
item
.
scaleX
=
-
item
.
scaleX
;
item
.
scaleX
=
-
item
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
}).
by
(
21
*
3
,
{
x
:
-
1920
-
400
}).
call
(()
=>
{
}).
by
(
21
*
3
,
{
x
:
-
sceneWidth
-
400
}).
call
(()
=>
{
item
.
scaleX
=
-
item
.
scaleX
;
item
.
scaleX
=
-
item
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
})).
start
();
})).
start
();
}
else
{
}
else
{
item
.
x
=
1920
/
2
+
Math
.
random
()
*
200
item
.
x
=
sceneWidth
/
2
+
Math
.
random
()
*
200
item
.
y
=
-
315
-
Math
.
random
()
*
150
;
item
.
y
=
-
315
-
Math
.
random
()
*
150
;
item
.
scaleX
=
1
;
item
.
scaleX
=
1
;
text
.
scaleX
=
1
;
text
.
scaleX
=
1
;
item
.
active
=
true
;
item
.
active
=
true
;
cc
.
tween
(
item
).
repeatForever
(
cc
.
tween
().
by
(
21
*
3
,
{
x
:
-
1920
-
400
}).
call
(()
=>
{
cc
.
tween
(
item
).
repeatForever
(
cc
.
tween
().
by
(
21
*
3
,
{
x
:
-
sceneWidth
-
400
}).
call
(()
=>
{
item
.
scaleX
=
-
item
.
scaleX
;
item
.
scaleX
=
-
item
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
text
.
scaleX
=
-
text
.
scaleX
;
}).
by
(
21
*
3
,
{
x
:
1920
+
400
}).
call
(()
=>
{
}).
by
(
21
*
3
,
{
x
:
1920
+
400
}).
call
(()
=>
{
...
@@ -247,7 +250,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -247,7 +250,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let
item
=
e
.
target
;
let
item
=
e
.
target
;
let
location
=
e
.
getLocation
();
let
location
=
e
.
getLocation
();
cc
.
Tween
.
stopAllByTarget
(
item
);
cc
.
Tween
.
stopAllByTarget
(
item
);
let
pos
=
location
.
sub
(
cc
.
v2
(
1920
/
2
,
1080
/
2
));
let
pos
=
location
.
sub
(
cc
.
v2
(
cc
.
winSize
.
width
/
2
,
cc
.
winSize
.
height
/
2
));
item
.
x
=
pos
.
x
;
item
.
x
=
pos
.
x
;
item
.
y
=
pos
.
y
;
item
.
y
=
pos
.
y
;
}
}
...
...
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