Skip to content

Commit

Permalink
gobli movement system updated
Browse files Browse the repository at this point in the history
  • Loading branch information
maurocristy87 committed Nov 11, 2024
1 parent cb18b12 commit 2834351
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/system/goblin/GoblinMovementSystem.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
import {
BoxCollider,
CollisionRepository,
EdgeCollider,
EntityManager,
inject,
RigidBody,
Symbols,
System,
Transform,
} from "angry-pixel";
import { BoxCollider, EdgeCollider, GameSystem, RigidBody, Transform } from "angry-pixel";
import { GoblinMovement } from "@component/goblin/GoblinMovement";
import { COLLISION_LAYERS } from "@config/layers";

export class GoblinMovementSystem implements System {
@inject(Symbols.EntityManager) private readonly entityManager: EntityManager;
@inject(Symbols.CollisionRepository) private readonly collisionRepository: CollisionRepository;

export class GoblinMovementSystem extends GameSystem {
public onUpdate(): void {
this.entityManager.search(GoblinMovement).forEach(({ entity, component: movement }) => {
const rigidBody = this.entityManager.getComponent(entity, RigidBody);
Expand Down

0 comments on commit 2834351

Please sign in to comment.