Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_16
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
op_16
Commits
176a5498
Commit
176a5498
authored
Feb 22, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:
parent
6aea4023
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
op_16.ts
assets/op_16/scene/op_16.ts
+5
-0
AI.ts
assets/op_16/script/AI.ts
+1
-0
No files found.
assets/op_16/scene/op_16.ts
View file @
176a5498
...
...
@@ -525,7 +525,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
updateStatus
(
status
=
null
)
{
if
(
status
)
{
console
.
log
(
status
);
this
.
_status
=
JSON
.
parse
(
JSON
.
stringify
(
status
));
}
else
{
console
.
log
(
'
喵喵喵
'
);
}
const
playerMe
=
this
.
allPlayerList
.
find
(
(
player
)
=>
player
.
uuid
==
this
.
playerId
...
...
@@ -577,8 +580,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
changeSide
()
{
if
(
this
.
_status
.
current
==
"
Red
"
)
{
this
.
_status
.
current
=
"
Blue
"
;
console
.
log
(
'
changeSide Blue
'
);
}
else
{
this
.
_status
.
current
=
"
Red
"
;
console
.
log
(
'
changeSide Red
'
);
}
}
...
...
assets/op_16/script/AI.ts
View file @
176a5498
...
...
@@ -37,6 +37,7 @@ export class AI {
if
(
this
.
playerData
.
color
==
this
.
_status
.
current
)
{
await
asyncDelay
(
Math
.
random
()
*
3
+
4
);
if
(
this
.
_status
.
letter
==
""
)
{
await
asyncDelay
(
Math
.
random
()
*
3
+
2
);
this
.
networkHelper
.
sendFrame
({
type
:
"
roll
"
,
uuid
:
this
.
playerData
.
uuid
,
...
...
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