From 1ca88b176cfeed7b75456d3b7f5be21d5d3cd0b5 Mon Sep 17 00:00:00 2001 From: Josh Guyette Date: Tue, 9 Jan 2024 02:26:26 -0600 Subject: [PATCH] Updated to Expo 49 and updated other packes as well. Added eslint, still need to clean up linting errors. Fix bugs in the game; uses safe area, floor is now visible, score is now visible. Typed out globals. Added eas.json and updated build scripts. --- .eslintrc.js | 30 +++++++++++ .gitignore | 6 +++ App.tsx | 25 ++++++++- AppView.tsx | 94 --------------------------------- app.json | 9 +++- assets/SVG/BalloonSVG.js | 3 +- eas.json | 62 ++++++++++++++++++++++ game/entities/Balloon.tsx | 102 +++++++++++++++++------------------- game/entities/Wall.tsx | 4 +- game/entities/entities.ts | 71 ++++++++++++++----------- game/entities/index.ts | 11 ++-- game/global.d.ts | 11 ++++ game/systems/GameEngine.tsx | 78 +++++++++++++++++++++++++++ game/systems/GameLoop.ts | 19 +++---- game/types.ts | 41 +++++++++++---- package.json | 65 +++++++++++++++-------- tsconfig.json | 32 +++++------ 17 files changed, 411 insertions(+), 252 deletions(-) create mode 100644 .eslintrc.js delete mode 100644 AppView.tsx create mode 100644 eas.json create mode 100644 game/global.d.ts create mode 100644 game/systems/GameEngine.tsx diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..16dadd1 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,30 @@ +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react/recommended", + ], + overrides: [ + { + env: { + node: true, + }, + files: [".eslintrc.{js,cjs}"], + parserOptions: { + sourceType: "script", + }, + }, + ], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: "latest", + sourceType: "module", + }, + plugins: ["@typescript-eslint", "react"], + rules: {}, + ignorePatterns: ["*.d.ts"], +}; diff --git a/.gitignore b/.gitignore index d0637c2..4675c34 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,12 @@ npm-debug.* *.mobileprovision *.orig.* web-build/ +*.log +*.app +*.tar.gz +*.ipa +*.apk +*.aab # macOS .DS_Store diff --git a/App.tsx b/App.tsx index c1c37d7..0a270af 100644 --- a/App.tsx +++ b/App.tsx @@ -1,15 +1,36 @@ +import React from "react"; import { StatusBar } from "expo-status-bar"; import { SafeAreaProvider } from "react-native-safe-area-context"; +import { Logs } from 'expo' +import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context"; -import AppView from "./AppView"; +import GameEngine from "./game/systems/GameEngine"; export default function App() { + Logs.enableExpoCliLogging() + return ( <>