Description

Checks if the next destination of the player is not fair. Returns an object with three values :

  • passable (boolean) If the tile is passable
  • x (integer) the length difference between the new position and not passable tile
  • y (integer) the difference of height between the new position and not passable tile

Usage

Parameters

  • entity {Game_Character}

    Character

  • old_x {Integer}

    Current position X

  • old_y {Integer}

    Current position X

  • x {Integer}

    New position X

  • y {Integer}

    New position Y

  • d {String}

    Direction : up, right, bottom or left

Returns

Object

Discussion