Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
wildfirecode13
new_taobao
Commits
4ec59866
Commit
4ec59866
authored
Oct 13, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
9d6dc9d0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1778 additions
and
12 deletions
+1778
-12
debug.log
taobao_jn/client/debug.log
+1748
-0
pagegamemain.axml
taobao_jn/client/pages/pagegamemain/pagegamemain.axml
+1
-1
pagegamemain.js
taobao_jn/client/pages/pagegamemain/pagegamemain.js
+29
-11
No files found.
taobao_jn/client/debug.log
View file @
4ec59866
This source diff could not be displayed because it is too large. You can
view the blob
instead.
taobao_jn/client/pages/pagegamemain/pagegamemain.axml
View file @
4ec59866
...
...
@@ -62,7 +62,7 @@
<image class="gamemtask2" src={{resList['d9ce0594-e262-4e9a-adfc-0b5b2a16d9c5'].url}} />
</view>
<scroll-view class="gameinfogro" scroll-y={{true}} scroll-animation-duration={{300}} scroll-with-animation={{true}} scroll-top={{(attionlist.length)*130}} disable-scroll={{false}} >
<view class="gameminfo{{index==(attionlist.length-1)?' aninfo':''}}" a:for="{{attionlist}}" a:key="*this" style="top:{{index*130+'rpx;'}}">
<view class="gameminfo{{index==(attionlist.length-1)?' aninfo':''}}" a:for="{{
show
attionlist}}" a:key="*this" style="top:{{index*130+'rpx;'}}">
<image class="gameminfobg" src={{resList['f1611c59-e6ba-4e4d-8aeb-50d3c794e98b'].url}} />
<label class="gameminfotxt">{{item.txt}}</label>
</view>
...
...
taobao_jn/client/pages/pagegamemain/pagegamemain.js
View file @
4ec59866
...
...
@@ -36,6 +36,9 @@ Page({
attionlist
:
[
],
showattionlist
:[
],
//实际展示的list
iswin
:
false
,
//
step
:
1
,
//阶段
//我的消息通知
...
...
@@ -101,11 +104,12 @@ Page({
step
:
step
,
roomnums
:
roomnums
,
roomdata
:
roomdata
,
attionlist
:
[{
txt
:
"游戏开始啦,共有"
+
roomnums
+
"名玩家加入游戏,快来升温队伍拿奖励吧。"
}]
});
attionlist
:[],
showattionlist
:[],
});
let
attiontxt1
=
"游戏开始啦,共有"
+
roomnums
+
"名玩家加入游戏,快来升温队伍拿奖励吧。"
;
this
.
addAttionTxt
(
attiontxt1
);
this
.
changePashow
();
this
.
updateAct
();
// this.updateActInfo();
...
...
@@ -125,14 +129,14 @@ Page({
let
itime1
=
Number
((
Math
.
random
()
*
chatime
).
toFixed
(
2
))
*
1000
;
this
.
aiuseTool
(
itime1
,
i
,
chatime
);
//ai邀请
let
inviterange
=
[
0
,
30
];
let
inviterange
=
[
0
,
5
];
let
invitenums
=
Math
.
round
(
Math
.
random
()
*
inviterange
[
1
])
+
inviterange
[
0
];
console
.
log
(
"邀请的温度值"
,
invitenums
);
this
.
ainvite
(
invitenums
,
i
);
//ai任务
let
taskrange
=
[
1
,
5
];
let
tasknums
=
Math
.
round
(
Math
.
random
()
*
taskrange
[
1
])
+
taskrange
[
0
];
// this.ai
this
.
aitask
(
tasknums
,
i
);
}
},
//机器使用道具
...
...
@@ -176,7 +180,22 @@ Page({
}
},
//机器人完成任务
aitask
(
tasknums
,
i
){
let
chatime
=
Math
.
floor
(
gameatime
/
tasknums
)
*
1000
;
for
(
let
i1
=
0
;
i1
<
tasknums
;
i1
++
){
let
i1start
=
i1
*
chatime
;
let
i1end
=
(
i1
+
1
)
*
chatime
-
5000
;
let
rangetime
=
Math
.
floor
(
Math
.
random
()
*
(
i1end
-
i1start
))
+
i1start
;
setTimeout
(()
=>
{
let
itxt
=
"玩家"
+
(
i
+
1
)
+
"完成了一个任务,获得了"
+
taskwarm
+
"温度值"
;
this
.
addAttionTxt
(
itxt
);
let
inroomidx
=
i
+
1
;
let
inwd
=
this
.
data
.
roomdata
[
inroomidx
][
"wd"
];
inwd
+=
taskwarm
;
this
.
updateRolewd
(
i
+
2
,
inwd
);
},
rangetime
);
}
},
onShow
()
{
this
.
updateActInfo
();
},
...
...
@@ -486,9 +505,6 @@ Page({
}
else
{
return
""
;
}
if
(
ncount
>
lcount
)
{
let
cha
}
},
//新增一条消息
addAttionTxt
(
txt
)
{
...
...
@@ -496,8 +512,10 @@ Page({
attionlist
.
push
({
txt
:
txt
});
let
showattionlist
=
attionlist
.
slice
(
-
10
);
this
.
setData
({
attionlist
:
attionlist
attionlist
:
attionlist
,
showattionlist
:
showattionlist
});
},
//获取邀请人
...
...
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