Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PK_Game
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
PK_Game
Commits
3076382d
Commit
3076382d
authored
Oct 22, 2023
by
杨一航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:v0.92
parent
f9363f0b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
PK_Game.ts
assets/PK_Game/scene/PK_Game.ts
+0
-2
AI_PK_Game.ts
assets/PK_Game/script/AI_PK_Game.ts
+1
-1
endLayer_PK_Game.ts
assets/PK_Game/script/layers/endLayer_PK_Game.ts
+2
-2
gameLayer_PK_Game.ts
assets/PK_Game/script/layers/gameLayer_PK_Game.ts
+3
-1
No files found.
assets/PK_Game/scene/PK_Game.ts
View file @
3076382d
...
...
@@ -383,8 +383,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
else
if
(
item
.
data
.
type
==
"
SERVER_gameSettleEnd
"
)
{
this
.
gameLayerCom
.
hide
()
await
asyncDelay
(
0.5
);
this
.
myInfoCom
.
init
(
this
.
data
.
myInfo
);
this
.
myInfoCom
.
show
();
...
...
assets/PK_Game/script/AI_PK_Game.ts
View file @
3076382d
...
...
@@ -42,7 +42,7 @@ export class AI {
await
asyncDelay
(
time
);
let
index
=
0
;
if
(
Math
.
random
()
<=
1
-
this
.
anspronum
)
{
if
(
Math
.
random
()
<=
this
.
anspronum
)
{
index
=
rigthIndex
;
}
else
{
index
=
Math
.
floor
(
Math
.
random
()
*
3.99
);
...
...
assets/PK_Game/script/layers/endLayer_PK_Game.ts
View file @
3076382d
...
...
@@ -54,12 +54,12 @@ export default class EndLayer extends cc.Component {
this
.
winRoot
.
active
=
false
;
let
root
=
this
.
loseRoot
;
if
(
data
.
blueRight
>=
data
.
redRight
)
{
if
(
data
.
status
.
blueRight
>=
data
.
status
.
redRight
)
{
root
=
this
.
winRoot
;
}
root
.
active
=
true
;
root
.
opacity
=
0
;
cc
.
tween
(
root
).
delay
(
0.5
).
to
(
1
,
{
opacity
:
255
}).
start
();
cc
.
tween
(
root
).
delay
(
0.
4
5
).
to
(
1
,
{
opacity
:
255
}).
start
();
this
.
blueHead
.
getComponent
(
Player
).
init
(
mydata
.
url
);
this
.
blueName
.
string
=
mydata
.
name
;
...
...
assets/PK_Game/script/layers/gameLayer_PK_Game.ts
View file @
3076382d
...
...
@@ -126,6 +126,7 @@ export default class GameLayer extends cc.Component {
async
initQuestion
(
question
,
index
)
{
this
.
rootCover
.
active
=
false
;
this
.
questionBar
.
active
=
false
;
this
.
rightIndex
=
question
.
rightIndex
;
...
...
@@ -136,6 +137,7 @@ export default class GameLayer extends cc.Component {
await
asyncDelay
(
1
);
this
.
rootCover
.
active
=
false
;
this
.
totaltime
=
10.2
;
this
.
countTime
=
0
;
this
.
questionBar
.
active
=
true
;
...
...
@@ -225,7 +227,7 @@ export default class GameLayer extends cc.Component {
cc
.
tween
(
this
.
blueBar
).
to
(
0.35
,
{
x
:
this
.
blueX
-
cc
.
winSize
.
width
},
{
easing
:
"
sineIn
"
}).
start
()
cc
.
tween
(
this
.
redBar
).
to
(
0.35
,
{
x
:
this
.
redX
+
cc
.
winSize
.
width
},
{
easing
:
"
sineIn
"
}).
start
()
cc
.
tween
(
this
.
cupStart
).
to
(
0.
5
,
{
x
:
this
.
cupEnd
.
x
,
y
:
this
.
cupEnd
.
y
,
scale
:
this
.
cupEnd
.
scale
}).
call
(()
=>
{
cc
.
tween
(
this
.
cupStart
).
to
(
0.
6
,
{
x
:
this
.
cupEnd
.
x
,
y
:
this
.
cupEnd
.
y
,
scale
:
this
.
cupEnd
.
scale
}).
call
(()
=>
{
this
.
node
.
active
=
false
;
}).
start
();
...
...
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