coopgame-0.9
توضیحات
Tooling and templates used for building games
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | coopgame-0.9 |
| نام | coopgame |
| نسخه کتابخانه | 0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | tburns |
| ایمیل نویسنده | tyler.tj.burns@gmail.com |
| آدرس صفحه اصلی | https://github.com/tylertjburns/coopgame |
| آدرس اینترنتی | https://pypi.org/project/coopgame/ |
| مجوز | MIT |
# coopgame
Library of tooling and templates used for building games
Example:
```
from coopgame.gameTemplate import GameTemplate
from coopstructs.vectors import Vector2
import pygame
from coopgame.colors import Color
from coopgame.sprites import RectangleSprite
class MyGame(GameTemplate):
def __init__(self):
super().__init__()
self.sprites = pygame.sprite.Group()
def draw(self, frames):
for entity in self.sprites:
self.screen.blit(entity.surf, entity.rect)
def handle_hover_over(self, mouse_pos_as_vector: Vector2):
pass
def handle_left_click(self):
self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.BLUE, 10, 10))
def handle_right_click(self):
self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.RED, 20, 30))
def handle_key_pressed(self, pressed_key):
if pressed_key == pygame.K_r:
self.sprites.empty()
if __name__ == "__main__":
import logging
import loggingConfig
loggingConfig.initLogging(loggingLvl=logging.DEBUG)
game = MyGame()
game.main()
```
نیازمندی
| مقدار | نام |
|---|---|
| ==0.4 | coopbugger |
| ==1.3 | coopgraph |
| ==0.3 | coopmovers |
| ==0.47 | coopstructs |
| ==0.32 | cooptools |
| ==0.10.0 | cycler |
| ==1.1.0 | descartes |
| ==1.3.2 | kiwisolver |
| ==3.4.3 | matplotlib |
| ==1.21.2 | numpy |
| ==8.3.1 | Pillow |
| ==2.0.1 | pygame |
| ==1.5.18 | pyglet |
| ==2.5.3 | pylint |
| ==1.7.3 | pynput |
| ==2.4.7 | pyparsing |
| ==0.9.9 | pyquaternion |
| ==2.8.2 | python-dateutil |
| ==1.7.1 | scipy |
| ==1.7.1 | Shapely |
| ==1.15.0 | six |
| ==0.10.1 | toml |
| ==1.4.1 | typed-ast |
| ==1.12.1 | wrapt |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >3.5 | Python |
نحوه نصب
نصب پکیج whl coopgame-0.9:
pip install coopgame-0.9.whl
نصب پکیج tar.gz coopgame-0.9:
pip install coopgame-0.9.tar.gz