RafaelBarbosatec / bonfire

(RPG maker) Create RPG-style or similar games more simply with Flame.
https://bonfire-engine.github.io
MIT License
1.27k stars 190 forks source link

[question]: withoutDiagonal is available? #473

Closed shinriyo closed 9 months ago

shinriyo commented 12 months ago

How can we help?

I added it for Goblin class.

but, he can move diagonaly.

  @override
  void update(double dt) {
    super.update(dt);
    if (!enableBehaviors) return;

    if (!gameRef.sceneBuilderStatus.isRunning) {
      seePlayer(
        radiusVision: DungeonMap.tileSize,
        observed: (p) {
          moveTowardsTarget(
            target: p,
            close: () {
              execAttack(attack);
            },
            // I added
            movementAxis: MovementAxis.withoutDiagonal,
          );
        },
RafaelBarbosatec commented 11 months ago

Hi @shinriyo . I can not reproduce this probem. In my test work well. Could you share more information or vide?