MyDungeon Documentation
![]() | MovingDungeonObjectMove Method |
Checks if the entity can move in the provided direction
Namespace: MyDungeon.Entities
Assembly: Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0

C#
protected virtual bool Move( int xDir, int yDir, out RaycastHit2D hit )
Parameters
- xDir
- Type: SystemInt32
X direction the entity is attempting to move in - yDir
- Type: SystemInt32
Y direction the entity is attempting to move in - hit
- Type: RaycastHit2D
Output variable for Raycast collision check
Return Value
Type: BooleanTrue if direction is clear for movement or False if entity is currently moving or blocked
