diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-07 13:54:12 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-07 13:54:12 -0600 |
commit | 57509cad921a3e17c9c92d7221c9325e50ede52f (patch) | |
tree | beb64a25e75c6e69d862f10d271950b89b1e0da6 /src/systems/grid.js | |
parent | a54812ed50379bd8baacce53c16aeccdff752327 (diff) | |
download | bbiy-57509cad921a3e17c9c92d7221c9325e50ede52f.tar.gz bbiy-57509cad921a3e17c9c92d7221c9325e50ede52f.zip |
Add particles to pushing entities
Diffstat (limited to 'src/systems/grid.js')
-rw-r--r-- | src/systems/grid.js | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/src/systems/grid.js b/src/systems/grid.js index 4082793..3e56ea9 100644 --- a/src/systems/grid.js +++ b/src/systems/grid.js @@ -66,46 +66,4 @@ game.system.Grid = (entitiesGrid) => { return { gameCoordsToGrid, gridCoordsToGame, update, gridWidth, gridHeight }; -}; - -// -// -// -// const proposed = {...newGridCoords}; -// let wall = false; -// let entitiesToPush = []; -// if (entity.hasComponent("controllable")) { -// let found = false; - -// -// if (entity.hasComponent("controllable")) { -// if (!wall) { -// entity.components.gridPosition = {...entity.components.gridPosition, ...newGridCoords}; -// entitiesToPush.map((e) => e.addComponent(game.components.Momentum({...momentumVector}))); -// } -// const particles = game.createBorderParticles({ -// colors: ["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF", "#00FFFF"], -// maxAmount: 100, -// minAmount: 25, -// minLife: 100, -// maxLife: 300, -// minRadius: 1, -// maxRadius: 3, -// maxSpeed: 0.15, -// }); -// particles.addComponent(game.components.Position(gridCoordsToGame(oldGridCoords))); -// particles.addComponent(game.components.Appearance({width: 50, height: 50})); -// game.entities[particles.id] = particles; -// } else { -// entity.components.gridPosition = {...entity.components.gridPosition, ...newGridCoords}; -// } -// -// -// -// -// -// } -// } else { -// entity.addComponent(game.components.Position({...gridCoordsToGame(entity.components.gridPosition)})); -// }; -// });
\ No newline at end of file +};
\ No newline at end of file |