Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(17)  |  Call(12)  |  Derive(0)  |  Import(5)

src/p/u/puituniverse-HEAD/packages/cute-wars/puit/state/objectcollection.py   puituniverse(Download)
  import backgroundstuff
 
from backgroundstuff.boundingbox import Boundingbox
from puit.objects.player import Player # FIXME: this has to go when it's not needed any longer
 
      right_width = self._dimensions.width - left_width
      self._near_subnode = TritreeObjectCollection(Boundingbox(
          self._dimensions.bottom_left, (left_width, self._dimensions.height)),
          self._collision_relations, parent=self)
      self._middle_subnode = TritreeObjectCollection(None,
          self._collision_relations, parent=self)
      self._far_subnode = TritreeObjectCollection(Boundingbox(
          (self._dimensions.left + left_width, self._dimensions.bottom),
      top_height = self._dimensions.height - bottom_height
      self._near_subnode = TritreeObjectCollection(Boundingbox(
          self._dimensions.bottom_left, (self._dimensions.width, bottom_height)),
          self._collision_relations, parent=self)
      self._middle_subnode = TritreeObjectCollection(None, self._collision_relations,
          parent=self)
      self._far_subnode = TritreeObjectCollection(Boundingbox(
          (self._dimensions.left, self._dimensions.bottom + bottom_height),

src/p/u/puituniverse-HEAD/packages/cute-wars/puit/objects/gameobject.py   puituniverse(Download)
from backgroundstuff.boundingbox import Boundingbox
import types
 
 
class Gameobject(object):
  def __init__(self, position, width=1, height=1):
    self.is_dead = False
    self.boundingbox = Boundingbox(position, (width, height), gameobject=self)
    self.velocity = [0.0, 0.0]
    self.on_ground = False

src/p/u/puituniverse-HEAD/packages/cute-wars/puit/draw/radar.py   puituniverse(Download)
from backgroundstuff.boundingbox import Boundingbox
 
import puit
from puit.objects.character import Character
from puit.objects.itemcrate import Itemcrate
    self._x_ratio = float(self._width) / self._level_width
    self._y_ratio = float(self._height) / self._level_height
    self._player_dot_bounds = Boundingbox(size=(1, 1))
    self._blink_counter = 0
    self._on_ticks = 20
    self._repeat_ticks = 30
    self._zoom_factor = self._width / float(self._level_width)
    mini_screen_width = int(self._zoom_factor * self._width)
    self._mini_screen_bounds = Boundingbox(size=(mini_screen_width, self._height))

src/p/u/puituniverse-HEAD/packages/cute-wars/backgroundstuff/mainloop.py   puituniverse(Download)
 
from backgroundstuff.fixed_resolution import FixedResolutionViewport
from backgroundstuff.boundingbox import Boundingbox
 
 
    self.media = {}
 
    self.scrollarea = Boundingbox(size=(width, height))
    self._scroll_speed = (0, 0)
    self.state = None

src/p/u/puituniverse-HEAD/packages/cute-wars/backgroundstuff/animation.py   puituniverse(Download)
import puit # aaaaaaaaaaaaaaaaah shouldn't be. stupid scrolling system. change me
from backgroundstuff import graphics
from backgroundstuff.boundingbox import Boundingbox
 
data_folder = 'data'
        pos[0] += shift[0]
        pos[1] += shift[1]
        boundingbox = Boundingbox(pos, boundingbox.size)
      self.animation_set.draw_animation(animation, self.frame, boundingbox,
          mirrored)
        h = shift[i]
      self.sprites[i].draw_animation(animation,
          Boundingbox(offset_position, boundingbox.size), mirrored, h)
      offset_position[0] += self.sprites[i].animations[animation].x_offset
      offset_position[1] += self.sprites[i].animations[animation].y_offset