public bool CanAttach(OverlapWorld world, MapSiteDef site, HierarchyTransform t) { if (Size < site.AttachmentSize) { return(false); } var localT = new HierarchyTransform(Pos, Rot, t); var attachmentrT = new HierarchyTransform(default, site.AttachmentRotation, localT);
public MapSiteInstance(MapSiteDef def, Vec2 pos, float rot, bool attachedToBottom) { Def = def; World = new OverlapWorld(def.SizeX, def.SizeY); Pos = pos; Rot = rot; AttachedToBottom = attachedToBottom; }