private Vector3 getObstacleCompensationVector(MoveDirection dir) { if (dir.IsLeft()) { return new Vector3(1.5f, -0.5f, -0.5f); } else if (dir.IsRight()) { return new Vector3(-0.5f, -0.5f, -0.5f); } else if (dir.IsUp()) { return new Vector3(0.5f, -0.5f, -1.5f); } else { return new Vector3(0.5f, -0.5f, 0.5f); } }
private Vector3 getObstacleCompensationVector(MoveDirection dir) { if (dir.IsLeft()) { return(new Vector3(1.5f, -0.5f, -0.5f)); } else if (dir.IsRight()) { return(new Vector3(-0.5f, -0.5f, -0.5f)); } else if (dir.IsUp()) { return(new Vector3(0.5f, -0.5f, -1.5f)); } else { return(new Vector3(0.5f, -0.5f, 0.5f)); } }
public static bool IsHorzOrient(this MoveDirection direction) { return(direction.IsLeft() || direction.IsRight()); }