Reworked the directories to be a little more machine independent and make the hero snap to grid cells when moving, which improved collision handling.
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
package fmon.util
|
||||
|
||||
object Direction extends Enumeration {
|
||||
val North, Northeast, East, Southeast, South, Southwest, West, Northwest = Value
|
||||
case class Val protected(x: Int = 0, y: Int = 0) extends super.Val {
|
||||
}
|
||||
|
||||
val Stationary = Val()
|
||||
val North = Val(y = -1)
|
||||
val Northeast = Val(x = 1, y = -1)
|
||||
val East = Val(x = 1)
|
||||
val Southeast = Val(x = 1, y = 1)
|
||||
val South = Val(y = 1)
|
||||
val Southwest = Val(x = -1, y = 1)
|
||||
val West = Val(x = -1)
|
||||
val Northwest = Val(x = -1, y = -1)
|
||||
|
||||
val cardinals = Set(North, East, South, West)
|
||||
}
|
||||
Reference in New Issue
Block a user