code clean-up

This commit is contained in:
Josh Guyette 2022-06-26 00:12:11 -05:00
parent e66166c30c
commit d1fb6871ef
4 changed files with 1 additions and 35 deletions

View File

@ -1,26 +0,0 @@
import React, { PureComponent } from "react";
import { StyleSheet, View } from "react-native";
const RADIUS = 20;
export const Finger = ({ position }: { position: any[] }) => {
const x = position[0] - RADIUS / 2;
const y = position[1] - RADIUS / 2;
return (
<View style={[styles.finger, { left: x, top: y }]} />
)
};
const styles = StyleSheet.create({
finger: {
borderColor: "#CCC",
borderWidth: 4,
borderRadius: RADIUS * 2,
width: RADIUS * 2,
height: RADIUS * 2,
backgroundColor: "pink",
position: "absolute"
}
});
export default Finger;

View File

@ -27,13 +27,6 @@ export const entities = (restart: boolean = false) => {
let entities = {
physics: { engine, world },
// fingers: {
// 1: { position: [40, 200], renderer: Finger },
// 2: { position: [100, 200], renderer: Finger },
// 3: { position: [160, 200], renderer: Finger },
// 4: { position: [220, 200], renderer: Finger },
// 5: { position: [280, 200], renderer: Finger },
// },
Balloon: newBalloon(),
LeftWall: Wall(
world,

View File

@ -3,12 +3,10 @@ import Matter from "matter-js";
export { windowHeight, windowWidth } from "@game";
import Finger from "./Finger";
import Wall from "./Wall";
import Balloon from './Balloon';
export {
Finger,
Wall,
Balloon
};

View File

@ -17,6 +17,7 @@
"react-dom": "17.0.2",
"react-native": "0.68.2",
"react-native-game-engine": "^1.2.0",
"react-native-reanimated": "~2.8.0",
"react-native-safe-area-context": "4.2.4",
"react-native-svg": "12.3.0",
"react-native-web": "0.17.7"