Skip to content

Commit

Permalink
Adding cat sprite to the start map (#164)
Browse files Browse the repository at this point in the history
Part of #3
  • Loading branch information
r4pt0s authored Oct 19, 2024
2 parents fdb7652 + c9aa94c commit 75cf21c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asset_credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ https://pipoya.itch.io/charamel | Create awesome Characters

https://adriccustoms.itch.io/little-bits-office

https://opengameart.org/content/lpc-forest-tiles
https://opengameart.org/content/lpc-forest-tiles
By users Sharm, Hyptosis, Johann C, Beast, William. Thompsonj, & Reemax | Assets made by Lanea Zimmerman, Tuomo Untinen, Manuel Riecke

https://arks.itch.io/dino-characters @ScissorMarks
Expand All @@ -45,3 +45,5 @@ https://minzinn.itch.io/pixelvehicles
https://elevenlabs.io/ - sounds for Sinusoid Formula Game on Machine #11

https://openart.ai/ - sprites for Sinusoid Formula Game on Machine #11 (formula sprite animation by @purifiedlight)

https://pop-shop-packs.itch.io/cats-pixel-asset-pack
Binary file added public/assets/sprites/cat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions src/gameObjects/map_start/cat.gameObject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export const cat = (k, map, spawnpoints) => {
k.loadSprite('cat', './assets/sprites/cat.png', {
sliceX: 4,
sliceY: 1,
anims: {
laying: { from: 0, to: 3, loop: true, speed: 2 },
},
});

const [treeRoom1] = map.query({ include: 'tree_room_1' });

const catObj = k.make([
k.sprite('cat', { frame: 0, anim: 'laying' }),
k.area(),
k.pos(treeRoom1.pos.x, treeRoom1.pos.y + 40),
k.scale(0.7),
k.body({ isStatic: true }),
k.offscreen({ hide: true, distance: 10 }),
'cat',
]);

return catObj;
};
2 changes: 2 additions & 0 deletions src/gameObjects/map_start/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { bruno } from './bruno.gameObject';
import { cat } from './cat.gameObject';
import { cake } from './cake.gameObject';
import { npcsOnChairs } from './npcsOnChairs.gameObject';
import { ztmTrailer } from './ztmTrailer.gameObject';
Expand All @@ -23,6 +24,7 @@ export const gameObjects = [
misterFu,
tvVideo,
treasureChest,
cat,
];

export default gameObjects;

0 comments on commit 75cf21c

Please sign in to comment.