forked from Don-George-Thayyil/bubbly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
65 lines (61 loc) · 1.58 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { StatusBar } from 'expo-status-bar';
import React, { useRef } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import { GameEngine } from 'react-native-game-engine';
import Drag from './components/dragMechanism';
import restart from './entities';
import Bubble from './entities/bubble';
export default function App() {
const engine = useRef(null);
// const targeter = () => {
// let start = 13;
// let k = 1;
// for (let i = 0; i < 20; i++) {
// // if (start == 13) console.log("Startttinggg!!!:---")
// if ((start - 9) % 10 == 0) {
// start += 4;
// } else {
// start += 2;
// }
// // console.log(start)
// }
// }
// targeter();
// console.log("it is working!!!")
return (
<View>
<GameEngine
ref={engine}
style={styles.container}
systems={[Drag]} //logic related stuff...
entities={restart()}
//entities => {{...props,renderer:<renderingComponent>}}
//restart => {Bubbles()} , Bubbles=>{...props,renderer}
running={true}
>
<StatusBar style="auto" hidden={true} />
</GameEngine>
{/* <Text>Hello there</Text> */}
</View>
// <View style={{
// borderRadius: 500,
// backgroundColor: "skyblue",
// width:100,
// height:100,
// position:"absolute",
// top:300,
// left:150
// }}></View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
position: "absolute",
top: 0,
bottom: 0,
left: 0,
right: 0
},
});