MCPcopy Index your code
hub / github.com/marblexu/PythonPlantsVsZombies / loadFrames

Method loadFrames

source/component/plant.py:131–142  ·  view source on GitHub ↗
(self, frames, name, scale, color=c.BLACK)

Source from the content-addressed store, hash-verified

129 self.hit_timer = 0
130
131 def loadFrames(self, frames, name, scale, color=c.BLACK):
132 frame_list = tool.GFX[name]
133 if name in tool.PLANT_RECT:
134 data = tool.PLANT_RECT[name]
135 x, y, width, height = data['x'], data['y'], data['width'], data['height']
136 else:
137 x, y = 0, 0
138 rect = frame_list[0].get_rect()
139 width, height = rect.w, rect.h
140
141 for frame in frame_list:
142 frames.append(tool.get_image(frame, x, y, width, height, color, scale))
143
144 def loadImages(self, name, scale):
145 self.loadFrames(self.frames, name, scale)

Callers 14

loadImagesMethod · 0.95
load_imagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45
loadImagesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected