batframework 1.0.8a12__py3-none-any.whl → 1.0.8a14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- batFramework/__init__.py +4 -3
- batFramework/animatedSprite.py +4 -52
- batFramework/animation.py +52 -0
- batFramework/character.py +3 -3
- batFramework/constants.py +4 -0
- batFramework/cutscene.py +7 -5
- batFramework/drawable.py +75 -0
- batFramework/entity.py +105 -55
- batFramework/gui/container.py +1 -1
- batFramework/gui/debugger.py +1 -1
- batFramework/gui/label.py +18 -41
- batFramework/gui/layout.py +2 -2
- batFramework/gui/root.py +0 -6
- batFramework/gui/widget.py +1 -1
- batFramework/manager.py +35 -34
- batFramework/particle.py +1 -1
- batFramework/scene.py +1 -34
- batFramework/sceneManager.py +5 -23
- batFramework/sprite.py +2 -2
- batFramework/templates/character.py +5 -6
- batFramework/{time.py → timeManager.py} +0 -2
- batFramework/utils.py +118 -19
- {batframework-1.0.8a12.dist-info → batframework-1.0.8a14.dist-info}/METADATA +1 -1
- {batframework-1.0.8a12.dist-info → batframework-1.0.8a14.dist-info}/RECORD +27 -26
- batFramework/object.py +0 -123
- {batframework-1.0.8a12.dist-info → batframework-1.0.8a14.dist-info}/LICENCE +0 -0
- {batframework-1.0.8a12.dist-info → batframework-1.0.8a14.dist-info}/WHEEL +0 -0
- {batframework-1.0.8a12.dist-info → batframework-1.0.8a14.dist-info}/top_level.txt +0 -0
@@ -1,62 +1,63 @@
|
|
1
|
-
batFramework/__init__.py,sha256=
|
1
|
+
batFramework/__init__.py,sha256=DTeryYh2C-cZhmO6GQqfy-Lyjzdpa-KobxvQpIY1meM,2580
|
2
2
|
batFramework/action.py,sha256=919IVYKviLyVYDtQL7oZvlVuE_aodjJCuwz6fGi5sCk,8420
|
3
3
|
batFramework/actionContainer.py,sha256=qy6-YY3iX26KJ8NqFMSYo6JExohD8HFk0sC1qhb7qA8,2602
|
4
|
-
batFramework/animatedSprite.py,sha256=
|
4
|
+
batFramework/animatedSprite.py,sha256=IWE8zUgpFaqQPUr7iOUo7TJ_E10aUaMNqlIqv8dW87E,4242
|
5
|
+
batFramework/animation.py,sha256=_XcH6r3TVQZUcLbhzUnTNlXrjy-J-nYiRmFpxvTYEoc,1934
|
5
6
|
batFramework/audioManager.py,sha256=8tKSf4huZe5tgH98qHlKoFNjXPGDQNJho6PKfSCe7JA,3869
|
6
7
|
batFramework/camera.py,sha256=u1EPSitZ9mEEa32yQB7K6ywnWgWCSumbhrc4HRjimEY,9406
|
7
|
-
batFramework/character.py,sha256=
|
8
|
-
batFramework/constants.py,sha256=
|
9
|
-
batFramework/cutscene.py,sha256=
|
8
|
+
batFramework/character.py,sha256=AK5sQLvAOY3X4-7vzeHeIO5WDFsubn_TADLYxmYc0Qo,789
|
9
|
+
batFramework/constants.py,sha256=E6Z-q4n_PXGxkP_Lr0l-BmWwDHGcabtlj45yrqifCKg,1217
|
10
|
+
batFramework/cutscene.py,sha256=FIry2kyDS1R8gHuEXKnsLz4XT30kf1Te1cjCLEK2Z24,4080
|
10
11
|
batFramework/cutsceneBlocks.py,sha256=3jtmTpV48NKCu-Qgjg7KN5KnwXn0kycIQ7t7G3RH3VE,4862
|
12
|
+
batFramework/drawable.py,sha256=oGj3qAh27FsCeQP2lKVBSTZ6NL4OEl3qgy3oapI02-8,2164
|
11
13
|
batFramework/dynamicEntity.py,sha256=6WcI6OveFNmrtOUYzmVMlT35Hz4MXeeRKzd1M3meL1Q,876
|
12
14
|
batFramework/easingController.py,sha256=4N8GIp1fsaWBUlDxXx3SMwOq1Mrhn10MZZIO51_CRnk,1677
|
13
|
-
batFramework/entity.py,sha256=
|
15
|
+
batFramework/entity.py,sha256=vO42Hc2JAKtRAwOwMZNO27AtJR1Y1bJuhWEkr_K6TmY,3373
|
14
16
|
batFramework/enums.py,sha256=re12gHw2g-5qtCNmGOfZbEC5cL5E8-FA79hfKGrI6-I,2078
|
15
17
|
batFramework/fontManager.py,sha256=iCVavr4hpn0T4xsaUAzdNd01j5ebpcj30fvFHzm1g-M,2246
|
16
|
-
batFramework/manager.py,sha256=
|
17
|
-
batFramework/
|
18
|
-
batFramework/particle.py,sha256=SD_DRqfhzlEeWlORDVPh1R__2_RplNcBujmqovN9Mww,3079
|
18
|
+
batFramework/manager.py,sha256=FXeBe7w98H1YHspTmXjyZe0-_QPXh6ZpBH84eYghDgo,4243
|
19
|
+
batFramework/particle.py,sha256=Aps9eJNdFag-TlduMSezKp4ocFQVvI6iZ98chhdhbgE,3081
|
19
20
|
batFramework/renderGroup.py,sha256=_VDvmP4iB-XarFJo_Uh5YKwWq1cazHmOBmTXZkqKk40,2020
|
20
21
|
batFramework/resourceManager.py,sha256=0cOIAFXT7UzzvgHn9QkWcXsTp8H2bIS70NvvgpBL2_4,3554
|
21
|
-
batFramework/scene.py,sha256=
|
22
|
-
batFramework/sceneManager.py,sha256=
|
22
|
+
batFramework/scene.py,sha256=0E7omgNUEl5Uhbx8iO3exyCy4p1MC7bSvqfwncW4KMw,11281
|
23
|
+
batFramework/sceneManager.py,sha256=ZH-vQbppwhg63EEdk7ahRpZ-K1TnB7BKVxD7y7IRSjM,7356
|
23
24
|
batFramework/scrollingSprite.py,sha256=PPEieAaFcOLE_Lm7cnm3xc7XyLKopCPcDbXEfyThO48,4133
|
24
|
-
batFramework/sprite.py,sha256=
|
25
|
+
batFramework/sprite.py,sha256=Cz8qzl8jR8y33DUSCObJQOk5e8PcZeavtFhBdR2TogU,1627
|
25
26
|
batFramework/stateMachine.py,sha256=wC-5xbKvf-vGm_N16X9KhgMya5915GyVXL79uk5Bapw,1359
|
26
27
|
batFramework/tileset.py,sha256=3AJBWHx90PC43BdLYCBFm811XBrMvWoB-nsUgyo6s-I,1728
|
27
|
-
batFramework/
|
28
|
+
batFramework/timeManager.py,sha256=XcqPs_74pjXafi6oNJe8W85SVfXTfPmOZOQyLOuyt8I,4987
|
28
29
|
batFramework/transition.py,sha256=-1cyk-7Fbm0U2Z4Y2jjpLHwJ2khM1VxIMcfk2bBEo-M,6655
|
29
30
|
batFramework/triggerZone.py,sha256=wIxkvO0cVVupQsJIPOD_-ofqwLnu1TLNK-n6oNXB1E8,579
|
30
|
-
batFramework/utils.py,sha256=
|
31
|
+
batFramework/utils.py,sha256=G9TBEFW6Okm4H7ohikG1GIf6d1pdql8ZBdhkpK5yyys,9969
|
31
32
|
batFramework/gui/__init__.py,sha256=17ij7mrCBCoehqCq1PV6MSXPOfMoLPmrV_G8d6ax4Tk,687
|
32
33
|
batFramework/gui/button.py,sha256=Ozs6VKHf9FCQXQODDiLQywGN3hwfXtQ6s2I-rzdjnQg,429
|
33
34
|
batFramework/gui/clickableWidget.py,sha256=2vS9GFSI3uufYQbaosXxTMs81vyVfQGz71AeZmf8vcY,7049
|
34
|
-
batFramework/gui/container.py,sha256=
|
35
|
-
batFramework/gui/debugger.py,sha256=
|
35
|
+
batFramework/gui/container.py,sha256=4FOVYmxpn9HM_-J20YWR7u2sj9kwpJldb4Cfc-2hmi4,5927
|
36
|
+
batFramework/gui/debugger.py,sha256=0VTQvhSD5zLjbVhs97ldeBLXqnFLlua-zTCpWB9OBGQ,3928
|
36
37
|
batFramework/gui/dialogueBox.py,sha256=3Z76l9obrpQImI8hjoBS_8G9sY3UILj2d3nJsaxtaI4,3221
|
37
38
|
batFramework/gui/draggableWidget.py,sha256=SKG7oMInZ_GTnrbv2T0aqlppuiuLX1tkVSCQJtRMlk8,1392
|
38
39
|
batFramework/gui/image.py,sha256=7IRvalA6QQz7SYI9h4y4-ryWa9EOxZM3sc10-OZyCPc,1770
|
39
40
|
batFramework/gui/indicator.py,sha256=leCvxsGxt00-oTn0N5MTmLstLH9uLG3RjQ02KlXtZCQ,1549
|
40
41
|
batFramework/gui/interactiveWidget.py,sha256=FAZnSlMIohduZIDTZh5U-_mh1AbgTF4sz-0oig4LWIQ,5760
|
41
|
-
batFramework/gui/label.py,sha256=
|
42
|
-
batFramework/gui/layout.py,sha256=
|
42
|
+
batFramework/gui/label.py,sha256=WWc_AdxC0ZJzyT478SrUAQUhERsihr2KsTRfVLdPOiQ,11178
|
43
|
+
batFramework/gui/layout.py,sha256=3nprthjCJqUdD1qHN3lReYRb-4L0-t6v51JEO4NRcgo,8563
|
43
44
|
batFramework/gui/meter.py,sha256=RFzAhSzR3O-Pw0wjdfApWGWFQSJoYa4WohkiREDAAJc,2395
|
44
45
|
batFramework/gui/radioButton.py,sha256=rROl9mtUa-m220R5qZ85NBPZS7nPVx-azhqijJ-XhCo,2411
|
45
|
-
batFramework/gui/root.py,sha256=
|
46
|
+
batFramework/gui/root.py,sha256=OsRmbh-UdIDrAqolwa5IV76iSksu_ByVo0WQp0YCSUQ,4812
|
46
47
|
batFramework/gui/shape.py,sha256=Ros_-Mm2Q2CFauZFqFPh1QyyuZnNmg7C2PYbs7Cq41k,9347
|
47
48
|
batFramework/gui/slider.py,sha256=5d3rfTYjDCDiM5prKu6DTemlGgji2FQ_vGuLzxoa5gU,8335
|
48
49
|
batFramework/gui/style.py,sha256=OeLbft0RkIslQ2IcZpBeF6TaQDONIoBcAHj_Bkh9gFw,131
|
49
50
|
batFramework/gui/styleManager.py,sha256=rALKJ-AmRbDAiyu8hVAYRAlkQxw677DiPoNKJZ4xtJ4,1245
|
50
51
|
batFramework/gui/textInput.py,sha256=aTegghN6O3djL0eBEEij9DsEuZ1MyE61P51IzaLUUEg,9324
|
51
52
|
batFramework/gui/toggle.py,sha256=XLFzCRaY7uOkKFVtR3y01wsNjLjZqrS1748IcvBRN2Q,3969
|
52
|
-
batFramework/gui/widget.py,sha256=
|
53
|
+
batFramework/gui/widget.py,sha256=2tehCiSLum0pwz3KNlrwc5SYvkZ7Hs0FiqtbmXuLoJs,13885
|
53
54
|
batFramework/gui/constraints/__init__.py,sha256=qqXE8nnSrEvCSeHdqY8UYPZLetqdubFPI7IdZuh35QE,26
|
54
55
|
batFramework/gui/constraints/constraints.py,sha256=nyPew0HIJ24rl4JcdBjUYu2aFynTryN9wqv1wKCo4ew,26873
|
55
56
|
batFramework/templates/__init__.py,sha256=8XN-7JwYFKTRx_lnUL_If3spwgn5_2b7bwmrRRBPON0,46
|
56
|
-
batFramework/templates/character.py,sha256=
|
57
|
+
batFramework/templates/character.py,sha256=4UEcegUIeIgj48sVgzyRcT6yjpFOZ8Q_gHTtiB5j6kw,1348
|
57
58
|
batFramework/templates/states.py,sha256=WeomVrQ10vHxVCj9Wnk1PcinKyb871uV910mQe287kI,5370
|
58
|
-
batframework-1.0.
|
59
|
-
batframework-1.0.
|
60
|
-
batframework-1.0.
|
61
|
-
batframework-1.0.
|
62
|
-
batframework-1.0.
|
59
|
+
batframework-1.0.8a14.dist-info/LICENCE,sha256=A65iXbMDbOxQLDNOODJLqA7o5RxszYlEqIgNSzBQRf4,1073
|
60
|
+
batframework-1.0.8a14.dist-info/METADATA,sha256=avsotELk-g0Ts9vQWsdLuFQzvXohhiarcDY9UodilRg,1695
|
61
|
+
batframework-1.0.8a14.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
62
|
+
batframework-1.0.8a14.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
63
|
+
batframework-1.0.8a14.dist-info/RECORD,,
|
batFramework/object.py
DELETED
@@ -1,123 +0,0 @@
|
|
1
|
-
from typing import Any, Self
|
2
|
-
import pygame
|
3
|
-
import batFramework as bf
|
4
|
-
from typing import TYPE_CHECKING
|
5
|
-
|
6
|
-
if TYPE_CHECKING:
|
7
|
-
from .camera import Camera
|
8
|
-
|
9
|
-
|
10
|
-
class Object:
|
11
|
-
__count = 0
|
12
|
-
__available_uid = set()
|
13
|
-
__used_uid = set()
|
14
|
-
|
15
|
-
def __init__(self) -> None:
|
16
|
-
self.rect = pygame.FRect(0, 0, 0, 0)
|
17
|
-
self.tags: list[str] = []
|
18
|
-
self.parent_scene: bf.Scene | None = None
|
19
|
-
self.debug_color: tuple | str = "red"
|
20
|
-
self.render_order: int = 0
|
21
|
-
self.uid: int = Object.__count
|
22
|
-
Object.__used_uid.add(self.uid)
|
23
|
-
|
24
|
-
if Object.__available_uid:
|
25
|
-
self.name = Object.__available_uid.pop()
|
26
|
-
else:
|
27
|
-
self.name = Object.__count
|
28
|
-
Object.__count += 1
|
29
|
-
|
30
|
-
def __del__(self):
|
31
|
-
Object.__available_uid.add(self.uid)
|
32
|
-
|
33
|
-
def set_position(self, x, y) -> Self:
|
34
|
-
self.rect.topleft = x, y
|
35
|
-
return self
|
36
|
-
|
37
|
-
def set_center(self, x, y) -> Self:
|
38
|
-
self.rect.center = x, y
|
39
|
-
return self
|
40
|
-
|
41
|
-
def get_debug_outlines(self):
|
42
|
-
yield (self.rect, self.debug_color)
|
43
|
-
|
44
|
-
def set_debug_color(self, color) -> Self:
|
45
|
-
self.debug_color = color
|
46
|
-
return self
|
47
|
-
|
48
|
-
def set_parent_scene(self, scene) -> Self:
|
49
|
-
if scene == self.parent_scene:
|
50
|
-
return self
|
51
|
-
if self.parent_scene is not None:
|
52
|
-
self.do_when_removed()
|
53
|
-
self.parent_scene = scene
|
54
|
-
if scene is not None:
|
55
|
-
self.do_when_added()
|
56
|
-
return self
|
57
|
-
|
58
|
-
def do_when_added(self):
|
59
|
-
pass
|
60
|
-
|
61
|
-
def do_when_removed(self):
|
62
|
-
pass
|
63
|
-
|
64
|
-
def set_uid(self, uid: int) -> Self:
|
65
|
-
if uid in Object.__used_uid:
|
66
|
-
print(f"set_uid error : UID '{uid}' is already in use")
|
67
|
-
return self
|
68
|
-
self.uid = uid
|
69
|
-
Object.__used_uid.add(uid)
|
70
|
-
return self
|
71
|
-
|
72
|
-
def add_tags(self, *tags) -> Self:
|
73
|
-
for tag in tags:
|
74
|
-
if tag not in self.tags:
|
75
|
-
self.tags.append(tag)
|
76
|
-
self.tags.sort()
|
77
|
-
return self
|
78
|
-
|
79
|
-
def remove_tags(self, *tags):
|
80
|
-
self.tags = [tag for tag in self.tags if tag not in tags]
|
81
|
-
|
82
|
-
def has_tags(self, *tags) -> bool:
|
83
|
-
return all(tag in self.tags for tag in tags)
|
84
|
-
|
85
|
-
def get_tags(self) -> list[str]:
|
86
|
-
return self.tags
|
87
|
-
|
88
|
-
def process_event(self, event: pygame.Event) -> bool:
|
89
|
-
"""
|
90
|
-
Returns bool : True if the method is blocking (no propagation to next object of the scene)
|
91
|
-
"""
|
92
|
-
if event.consumed:
|
93
|
-
return
|
94
|
-
self.do_process_actions(event)
|
95
|
-
self.do_handle_event(event)
|
96
|
-
|
97
|
-
def do_process_actions(self, event: pygame.Event) -> None:
|
98
|
-
"""
|
99
|
-
Process entity actions you may have set
|
100
|
-
"""
|
101
|
-
|
102
|
-
def do_reset_actions(self) -> None:
|
103
|
-
"""
|
104
|
-
Reset entity actions you may have set
|
105
|
-
"""
|
106
|
-
|
107
|
-
def do_handle_event(self, event: pygame.Event):
|
108
|
-
"""
|
109
|
-
Handle specific events with no action support
|
110
|
-
"""
|
111
|
-
return False
|
112
|
-
|
113
|
-
def update(self, dt: float) -> None:
|
114
|
-
"""
|
115
|
-
Update method to be overriden by subclasses of object (must call do_update and do_reset_actions)
|
116
|
-
"""
|
117
|
-
self.do_update(dt)
|
118
|
-
self.do_reset_actions()
|
119
|
-
|
120
|
-
def do_update(self, dt: float) -> None:
|
121
|
-
"""
|
122
|
-
Update method to be overriden for specific behavior by the end user
|
123
|
-
"""
|
File without changes
|
File without changes
|
File without changes
|