/// <summary> /// Returns whether anything in the same square as some particular object, moving out to a particular destination /// would be blocked by that object /// </summary> /// <param name="to">destination of hypothetical movement</param> /// <param name="isServer">Whether or not being run on server</param> /// <param name="context">the object in question.</param> /// <returns></returns> public bool HasAnyDepartureBlockedByRegisterTile(Vector3Int to, bool isServer, RegisterTile context) { foreach (RegisterTile o in GetTileList(isServer).Get(context.LocalPositionClient)) { if (o.IsPassable(isServer, context.gameObject) == false && context.IsPassableFromInside(to, isServer, o.gameObject) == false) { return(true); } } return(false); }