def is_family_bigger(self, state=None): if not state: state = self.current_state_key fr = Ghost.get_family_rect(self, state) r = self.get_fus_rect(state) sl = r.left st = r.top sw = r.width sh = r.height return (((fr.x < sl) or (fr.w > sw)), ((fr.y < st) or (fr.h > sh)))
def is_family_bigger(self, state=None): if not state: state = self.current_state_key fr = Ghost.get_family_rect(self, state) r = self.get_fus_rect(state) sl = r.left st = r.top sw = r.width sh = r.height return (((fr.x < sl) or (fr.w > sw)), ((fr.y < st) or (fr.h > sh)))
def get_family_rect(self, state=None, only_children=False): if not state: state = self.current_state_key gfr = Ghost.get_family_rect(self, state, only_children) if only_children: return gfr elif self.visible: if self._finished: r = self.get_fus_rect(state) else: r = self.get_ghost_rect(state) return r.union(gfr)
def get_family_rect(self, state=None, only_children=False): if not state: state = self.current_state_key gfr = Ghost.get_family_rect(self, state) if only_children: return gfr elif self.visible: if self._finished: r = self.get_fus_rect(state) else: r = self.get_ghost_rect(state) return r.union(gfr)