-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
34 lines (29 loc) · 863 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react';
import { AppRegistry, StatusBar, StyleSheet, Text, View, Dimensions } from 'react-native';
import { GameEngine } from "react-native-game-engine";
import { Square } from "./square";
import { MoveFinger } from "./systems";
import { Arrow } from './arrow';
export default class App extends React.Component {
render() {
const { height, width } = Dimensions.get('window');
// console.log({ height, width })
return (
<GameEngine
style={styles.container}
systems={[MoveFinger]}
entities={{
2: { direction: '', renderer: <Arrow />},
3: { position: [width/2, height/2], renderer: <Square />},
}}>
<StatusBar hidden={false} />
</GameEngine>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
});