2024-01-09 02:26:26 -06:00
|
|
|
import React from "react";
|
2022-06-25 00:29:43 -05:00
|
|
|
import { StatusBar } from "expo-status-bar";
|
|
|
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
2024-01-09 02:26:26 -06:00
|
|
|
import { Logs } from 'expo'
|
|
|
|
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
2022-06-25 00:29:43 -05:00
|
|
|
|
2024-01-09 02:26:26 -06:00
|
|
|
import GameEngine from "./game/systems/GameEngine";
|
2022-06-25 00:29:43 -05:00
|
|
|
|
|
|
|
export default function App() {
|
2024-01-09 02:26:26 -06:00
|
|
|
Logs.enableExpoCliLogging()
|
|
|
|
|
2022-06-25 00:29:43 -05:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<StatusBar backgroundColor="orange" hidden={true} />
|
|
|
|
<SafeAreaProvider>
|
2024-01-09 02:26:26 -06:00
|
|
|
<SafeView />
|
2022-06-25 00:29:43 -05:00
|
|
|
</SafeAreaProvider>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
2024-01-09 02:26:26 -06:00
|
|
|
|
|
|
|
function SafeView() {
|
|
|
|
const { top, bottom, left, right } = useSafeAreaInsets();
|
|
|
|
const topInset = top.valueOf();
|
|
|
|
global.topInset = topInset;
|
|
|
|
global.bottomInset = bottom;
|
|
|
|
global.leftInset = left;
|
|
|
|
global.rightInset = right;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<SafeAreaView>
|
|
|
|
<GameEngine />
|
|
|
|
</SafeAreaView>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|