Exemple #1
0
    def __init__(self, level, id, indic, once, coord, size, invert, action_data=None, locking=True):
        AbstractPlatform.__init__(self, level, None, True, pygame.Rect(coord, size), invert, not indic)
        self._id = id
        self._locking = locking
        self._once = once
        self._action_data = action_data
        self._director = ResourceManager.load_director()

        self._text = ResourceManager.get_text_repository()
        self._last = 0

        self._has_interacted = False
Exemple #2
0
    def __init__(self, level, data, coord, speedx=25, speedy=40, invert=False, invincible=False):
        Character.__init__(self, level, data, coord, invert, speedx, speedy)

        self._repo = ResourceManager.get_player_repository()
        self._text = ResourceManager.get_text_repository()

        self._last_hit = Player.INVULNERABILITY_LAPSE
        self._parry = Player.PARRY_CD

        self._invincible = invincible
        self._end_parry = True

        self._pending_trigger = None
        self._last_triggered = Player.TRIGGER_HYST
        self._interact_last_displayed = AnimatedText.get_duration()
        self._interact = False
    def __init__(self):
        AbstractScene.__init__(self)
        self._scroll_x = 0
        self._hud = Hud()
        self._hud.create_hud_group(PlayerRepository.ATTR_HEALTH, HudHeart,
                                   (0, 0), Hud.GROW_RIGHT, 100)
        self._hud.create_hud_group(PlayerRepository.ATTR_MASKS, HudMask,
                                   (0, 6), Hud.GROW_RIGHT, 110)
        self._hud.create_hud_group(PlayerRepository.ATTR_TOILET_PAPER,
                                   HudToiletPaper, (80, 0), Hud.GROW_LEFT, 100)

        self._text_repo = ResourceManager.get_text_repository()
        self._player_repo = ResourceManager.get_player_repository()

        self._background = None
        self._sky = None

        self._last_scroll = self._scroll_x
Exemple #4
0
    def __init__(self,
                 level,
                 data,
                 position,
                 invert,
                 velocity_x=0,
                 velocity_y=0):
        AbstractSprite.__init__(self)
        self._coords = ResourceManager.load_coords(level, data)
        self._sheet = ResourceManager.load_sheet(level, data, colorkey=-1)
        self._level = level
        self._data = data
        if invert:
            self._sheet = pygame.transform.flip(self._sheet, True, False)

        self._left = False
        self._animation_idx = 0
        self._animation_dur = -1

        self._text = ResourceManager.get_text_repository()

        self._set_sprite("STILL")
        self.rect = self.image.get_rect()

        self.set_global_position(position)

        self._is_jumping = False
        self._jump = Character.JUMPING_DELAY
        self._velocity = (0, 0)
        self._velocity_x = velocity_x
        self._velocity_y = velocity_y

        self._dash = Character.DASH_CD
        self._end_dash = True

        self._movement_x = Character.STILL
        self._movement_y = Character.STILL

        self._orientation = Character.RIGHT