【发布时间】:2020-09-07 05:07:38
【问题描述】:
我正在尝试制作类似于 Word-Link 的游戏。我想在多个字母之间滑动并创建一个单词。我如何在 React-Native 中实现这一点。我的一个想法是使用模式锁定系统,但我仍在发布此查询以查找是否有更好的方法来做到这一点。目前我正在使用 ToucableOpacity 按下按钮并生成单词。 [1]:https://i.stack.imgur.com/z4iKW.jpg
<TouchableOpacity
onPress={() => {
this.addLetters(alpha4[0])
// Alert.alert("A")
box1 = alpha4[0]
this.setState({ box1: box1 })
}}
>
<View style={{ width: 50, height: 50, backgroundColor: 'beige' }}>
<Text style={{ fontSize: 30, fontWeight: 'bold', justifyContent: 'center', textAlignVertical: 'center', textAlign: 'center', borderWidth: 5 }}>{alpha4[0]}</Text>
</View>
</TouchableOpacity>
【问题讨论】:
标签: android node.js react-native swipe multi-touch