我的世界丘比特套装代码,我的世界丘比特套装能修复吗

首页 > 机动车 > 作者:YD1662023-11-17 16:45:47

开启游戏环节

我的世界丘比特套装代码,我的世界丘比特套装能修复吗(5)

二、首页

首页是选择游戏人数的页面

不同人数会分配不同的角色数量

常驻角色有狼人、村民、预言家、女巫、猎人

当游戏人数达到11人时将出现丘比特

UI代码如下:

<!--index.wxml--> <view class="container"> <view class="setting"> <image class="logo" src="{{logo}}"></image> <form action=""> <picker range="{{array}}" value="{{index}}" bindchange="gameNumberChange"> <text class="picker">选择游戏人数:</text> <text wx:if="{{array[index] < 10}}">{{" " array[index]}}</text> <text wx:else>{{array[index]}}</text> </picker> <view class="role-config" wx:for="{{config}}"> <image class="role-logo" src="{{item.role.logo}}"></image> {{item.role.name}} x {{item.count}} </view> </form> </view> <button type="primary" bindtap="startGame">开始游戏</button> </view>

效果如下:

我的世界丘比特套装代码,我的世界丘比特套装能修复吗(6)

三、游戏页

在进入游戏界面之前,玩家需要抽取自己对应的角色牌

之后才是跳转到游戏的界面

角色选取界面部分代码如下:

<view class="container"> <block wx:if="{{isChoosing}}"> <view class="inner-container"> <view class="swiper-indicator">{{swiperCurrent}}/{{roles.length}}</view> <swiper bindchange="swiperCurrentChange"> <block wx:for="{{roles}}"> <swiper-item> <view class="item-container"> <view class="side-space"></view> <image src="{{cover}}" class="cover"></image> <view class="side-space"></view> </view> </swiper-item> </block> </swiper> </view> <button type="primary" bindtap="chooseRole">选择这张牌</button> </block> <block wx:else> <view class="inner-container"> <view class="role-logo-container"> <image src="{{choosedRole.logo}}" class="role-logo" animation="{{roleLogoAnimationData}}"></image> </view> <view class="role-name">你的角色是: {{choosedRole.name}}</view> <view class="role-description">{{choosedRole.description}}</view> </view> <button type="primary" bindtap="setReady">准备好了</button> </block> </view>

效果展示:

我的世界丘比特套装代码,我的世界丘比特套装能修复吗(7)

进入游戏后,有多个白天黑夜的转换环节,狼人可以在黑夜中淘汰选手

效果如下:

我的世界丘比特套装代码,我的世界丘比特套装能修复吗(8)

上一页123下一页

栏目热文

文档排行

本站推荐

Copyright © 2018 - 2021 www.yd166.com., All Rights Reserved.