Skip to content

Commit

Permalink
add more fishes cod
Browse files Browse the repository at this point in the history
  • Loading branch information
akinevz0 committed Oct 23, 2024
1 parent 4b01f89 commit 167c274
Show file tree
Hide file tree
Showing 20 changed files with 211 additions and 145 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ( I AM HOOKED )
A game about being a fish
A game about being a fish.

## what kind of wordplay mechanic can we make around

> I am hooked
## what this game is about

Expand Down
197 changes: 79 additions & 118 deletions fishies-code/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions fishies-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@pixi/react": "^7.1.2",
"bitecs": "^0.3.40",
"pixi.js": "^8.3.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
38 changes: 12 additions & 26 deletions fishies-code/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,35 +1,21 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'

import {
createWorld,
Types,
defineComponent,
defineQuery,
addEntity,
addComponent,
pipe
} from 'bitecs'

function App() {
const [count, setCount] = useState(0)

return (
return
<>
<div>
<a href="https://vitejs.dev" target="_blank">
<img src={viteLogo} className="logo" alt="Vite logo" />
</a>
<a href="https://react.dev" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.tsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>

</>
)
}

export default App
20 changes: 20 additions & 0 deletions fishies-code/src/assets/AnchoredSprite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Sprite } from "pixi.js"

/**
* Here we declare a Sprite that can be attached to any 0.1x0.1m object
* in the game world. A FullSprite is a 2d 1x1m object.
*/
class AnchoredSprite extends Sprite {
anchor: SpriteAnchor

constructor(anchor: SpriteAnchor = { x: 0.5, y: 0.8 }) {
this.anchor = anchor
}
}

export interface SpriteAnchor {
x: number
y: number
}

export default AnchoredSprite
6 changes: 6 additions & 0 deletions fishies-code/src/assets/Background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

class Background {

}

export default Background
12 changes: 12 additions & 0 deletions fishies-code/src/assets/CharacterSplash.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

import { Sprite } from "@pixi/react"

class CharacterSplash {
sprite: typeof Sprite

constructor(sprite: typeof Sprite) {
this.sprite = sprite
}
}

export default CharacterSplash
Empty file.
Loading

0 comments on commit 167c274

Please sign in to comment.