batframework 1.0.9a7__py3-none-any.whl → 1.0.9a8__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 +20 -11
- batFramework/action.py +1 -1
- batFramework/animatedSprite.py +47 -116
- batFramework/animation.py +30 -5
- batFramework/audioManager.py +8 -5
- batFramework/baseScene.py +240 -0
- batFramework/camera.py +4 -0
- batFramework/constants.py +6 -1
- batFramework/cutscene.py +221 -21
- batFramework/cutsceneManager.py +5 -2
- batFramework/drawable.py +7 -5
- batFramework/easingController.py +10 -11
- batFramework/entity.py +21 -2
- batFramework/enums.py +48 -33
- batFramework/gui/__init__.py +3 -1
- batFramework/gui/animatedLabel.py +10 -2
- batFramework/gui/button.py +4 -31
- batFramework/gui/clickableWidget.py +42 -30
- batFramework/gui/constraints/constraints.py +212 -136
- batFramework/gui/container.py +72 -48
- batFramework/gui/debugger.py +12 -17
- batFramework/gui/draggableWidget.py +8 -11
- batFramework/gui/image.py +3 -10
- batFramework/gui/indicator.py +73 -1
- batFramework/gui/interactiveWidget.py +117 -100
- batFramework/gui/label.py +73 -63
- batFramework/gui/layout.py +221 -452
- batFramework/gui/meter.py +21 -7
- batFramework/gui/radioButton.py +0 -1
- batFramework/gui/root.py +99 -29
- batFramework/gui/selector.py +257 -0
- batFramework/gui/shape.py +13 -5
- batFramework/gui/slider.py +260 -93
- batFramework/gui/textInput.py +45 -21
- batFramework/gui/toggle.py +70 -52
- batFramework/gui/tooltip.py +30 -0
- batFramework/gui/widget.py +203 -125
- batFramework/manager.py +7 -8
- batFramework/particle.py +4 -1
- batFramework/propertyEaser.py +79 -0
- batFramework/renderGroup.py +17 -50
- batFramework/resourceManager.py +43 -13
- batFramework/scene.py +15 -335
- batFramework/sceneLayer.py +138 -0
- batFramework/sceneManager.py +31 -36
- batFramework/scrollingSprite.py +8 -3
- batFramework/sprite.py +1 -1
- batFramework/templates/__init__.py +1 -2
- batFramework/templates/controller.py +97 -0
- batFramework/timeManager.py +76 -22
- batFramework/transition.py +37 -103
- batFramework/utils.py +121 -3
- {batframework-1.0.9a7.dist-info → batframework-1.0.9a8.dist-info}/METADATA +24 -3
- batframework-1.0.9a8.dist-info/RECORD +66 -0
- {batframework-1.0.9a7.dist-info → batframework-1.0.9a8.dist-info}/WHEEL +1 -1
- batFramework/character.py +0 -27
- batFramework/templates/character.py +0 -43
- batFramework/templates/states.py +0 -166
- batframework-1.0.9a7.dist-info/RECORD +0 -63
- /batframework-1.0.9a7.dist-info/LICENCE → /batframework-1.0.9a8.dist-info/LICENSE +0 -0
- {batframework-1.0.9a7.dist-info → batframework-1.0.9a8.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
batFramework/__init__.py,sha256=6-NSXYHNIO713OHgmJmHvry25eLpqwdI0aIG17JtH-k,2961
|
2
|
+
batFramework/action.py,sha256=-h8aXHcfPeClJbfz_7tF_zCdDTExCQHye_ev6-Do43s,8397
|
3
|
+
batFramework/actionContainer.py,sha256=qy6-YY3iX26KJ8NqFMSYo6JExohD8HFk0sC1qhb7qA8,2602
|
4
|
+
batFramework/animatedSprite.py,sha256=NW5fkrooEKytSRxsPruAT3kYY-7cx2whfHAPU-er61Y,1992
|
5
|
+
batFramework/animation.py,sha256=kwkfw4Xbh_jkDC-FXUd1lnwNeTQCcA_Eqz3z5OAiakA,3015
|
6
|
+
batFramework/audioManager.py,sha256=hloFlneDBZQpk4PLWH3Yn5vk52pC-pEX53_exIhnciY,3941
|
7
|
+
batFramework/baseScene.py,sha256=Hxdo6mfjW6c1Ain44XCGWL6yTMpIirHDD0S8SL2NLGY,7092
|
8
|
+
batFramework/camera.py,sha256=jukVjwX6GQmv4Odm8beRKIOj0BReVXeYfcsFfsxYAzg,9559
|
9
|
+
batFramework/constants.py,sha256=0sH5lwu8IX1JIECHI7mcBV5CIyhazTQ1d-69H2y_1LA,1583
|
10
|
+
batFramework/cutscene.py,sha256=q3HTbHI20MAgt4Qhw_z1pq52KX4FZeKAfqWNtCmzkZM,7473
|
11
|
+
batFramework/cutsceneManager.py,sha256=Mb4f7Esx-QAOgS5q1dfFz-xWqsOo6rK7o3MNXiBHbCI,1071
|
12
|
+
batFramework/drawable.py,sha256=Mhcj2E3Fibo-9W0jPPDd_JNKZMU3bHNTW9qbTTor30o,2297
|
13
|
+
batFramework/dynamicEntity.py,sha256=SjXShy5aT4cQzjlTem05zSQRiNeq52AUXEBVodEG6gI,736
|
14
|
+
batFramework/easingController.py,sha256=dql9m5EFHCQ8_u-8iT2XrFn9WHqEsocYll_2mTM6cug,1792
|
15
|
+
batFramework/entity.py,sha256=tf6BaLa186jzo1WWqdLtGNnCEK2_ywki7d5qf6B9jN4,3460
|
16
|
+
batFramework/enums.py,sha256=kYKnPmJjeuQ2Wwm56bD97HllCtLVBr7vCeskst3zGkY,3137
|
17
|
+
batFramework/fontManager.py,sha256=M7h6AVq9Fwr51UTCFoGsg_PSurdjByA4w8qouXq4EKE,2254
|
18
|
+
batFramework/manager.py,sha256=-tDp8Vph11W6EKSi7fkZLw40B3uwdPAhepfWG8lIFuI,4427
|
19
|
+
batFramework/particle.py,sha256=k-t8H1BwksMUbZ5kDSMMXR5n7ahKEgHMARKgb2pXyr0,3178
|
20
|
+
batFramework/propertyEaser.py,sha256=vW9txE-IRE5zplV7KFS7ALnrcb6y9Yn1RLJqAgRLCZQ,2583
|
21
|
+
batFramework/renderGroup.py,sha256=e6p76CXVtV4lwJ9OzmLlLIncni8yyUriJeik2bNJNhw,1089
|
22
|
+
batFramework/resourceManager.py,sha256=Vb1AxkMybRdSe-IyKS2XqK2MV55pSbJSyXkq-BvMZW8,4588
|
23
|
+
batFramework/scene.py,sha256=GjJtIS2daY20EZhjakEeCX7V-riUD9Q_4bl6r4bl_5c,930
|
24
|
+
batFramework/sceneLayer.py,sha256=CtTyj_ap862UQtkDemdHDWW6tVP21Wjd9xTpOIEHnfk,4606
|
25
|
+
batFramework/sceneManager.py,sha256=1uND5fFsOr1OzHzRh6li1HLrTZjT4xxi7HJkleOm1A8,6898
|
26
|
+
batFramework/scrollingSprite.py,sha256=weIvJkDur71ZJgevvL4aZoQZ9yoDAqBoXX68fawsfbo,4169
|
27
|
+
batFramework/sprite.py,sha256=hPE2aMRnW1h5W3RWVVNIHazNRnmtf2_s-dgHpboTW2k,1627
|
28
|
+
batFramework/stateMachine.py,sha256=wC-5xbKvf-vGm_N16X9KhgMya5915GyVXL79uk5Bapw,1359
|
29
|
+
batFramework/tileset.py,sha256=3AJBWHx90PC43BdLYCBFm811XBrMvWoB-nsUgyo6s-I,1728
|
30
|
+
batFramework/timeManager.py,sha256=oWAKWLZZA1be2CwM8qTtOcqnSK3_qLW50tnFLepupRE,6660
|
31
|
+
batFramework/transition.py,sha256=kG_6nFmEwCg2ko9--XKor2_hiF9ltwMLr-nPr2QOdyk,5026
|
32
|
+
batFramework/triggerZone.py,sha256=MaPp20UoyRHAMiN0_sBanJJ_0cWnYXZEeY-BEaDTDxQ,652
|
33
|
+
batFramework/utils.py,sha256=lRdyOApo9xwmG06CxlFs7zC1655oL8HdOvH5uM0vqmw,14716
|
34
|
+
batFramework/gui/__init__.py,sha256=i-DdOlEwmd0At2TMfuWEq-PhVPsJt5cwQLzpR4lvcS4,775
|
35
|
+
batFramework/gui/animatedLabel.py,sha256=17EunGRfohYI_1cacrXJU3o3IlSSPKkQE9v55U58PYA,3082
|
36
|
+
batFramework/gui/button.py,sha256=g4S60hsXpuhZjtrv8C9ht0TEwBHJh-jrsLdxRkSMmbE,552
|
37
|
+
batFramework/gui/clickableWidget.py,sha256=-X8pocPBUsLp_pbm01h92awpkTUmWV721qE65L--TuI,7874
|
38
|
+
batFramework/gui/container.py,sha256=Oa66QKcaAr3MtaNNaG_blUDrwlbLCsAmKsF2D3zGooU,6863
|
39
|
+
batFramework/gui/debugger.py,sha256=7SYBZ9KonlbiK2AOvpVelgRS86yxaqfoB1cC9kdmC08,3665
|
40
|
+
batFramework/gui/draggableWidget.py,sha256=UwcLZ7dr3bZS-XbXJPh5OEG1NHZIN9bGnI02KH5yb6Y,1238
|
41
|
+
batFramework/gui/image.py,sha256=zzuHGZ7gkTwO7HEzd1jvrG82vV9ami3fgme0sA-8c5I,1755
|
42
|
+
batFramework/gui/indicator.py,sha256=0gVF68h7pQvWFjrkh94Nz5qQC0G3kWli7c_WEDSnhbM,3698
|
43
|
+
batFramework/gui/interactiveWidget.py,sha256=tt37CFP-O_i6vWfKQfRLXbXjpZHY4HqVgvnarmkIb_I,7572
|
44
|
+
batFramework/gui/label.py,sha256=-BrOeFjZ9kpnQMAZcMjYB2Hg-zgLNB4S6tBGSTHv8K8,11678
|
45
|
+
batFramework/gui/layout.py,sha256=i8jhcJ3f1I4R41KzYyfpKcIrGpZZyDC5hPPguWypykU,14008
|
46
|
+
batFramework/gui/meter.py,sha256=ik0hukJSEu_JEe5x4QQt42wPfkJ_EQPazpdNLoaGW7Y,2733
|
47
|
+
batFramework/gui/radioButton.py,sha256=dmdVKHZfu-FF0it-WcavX7q37LMbCi2VX-HUXTadrFg,2411
|
48
|
+
batFramework/gui/root.py,sha256=wt1lMMG7o73eXt2T3ljetpVVBu1jpFu8LSkjIw_pH10,7471
|
49
|
+
batFramework/gui/selector.py,sha256=NuJX4guSb6MujyDnUhMDxJJ0JKSk85ZlzIqBHBfUcCo,8164
|
50
|
+
batFramework/gui/shape.py,sha256=MWECgIxflbhuFb_l_41HGgt4ECaXTAydwbr2SYGFvAY,9634
|
51
|
+
batFramework/gui/slider.py,sha256=MSq2qTVZdNm3CmBntJJuXGyBHYFndm_AIx_xfSth4tM,15634
|
52
|
+
batFramework/gui/style.py,sha256=OeLbft0RkIslQ2IcZpBeF6TaQDONIoBcAHj_Bkh9gFw,131
|
53
|
+
batFramework/gui/styleManager.py,sha256=mg9VbK0Ux9pwTbq9oICilnQG3xJLnnZEjOzzSg0IVpY,1424
|
54
|
+
batFramework/gui/textInput.py,sha256=8IHbLG7vpp1-7r825jhMcxUOz8CdXsIbX5oeBXahgwA,12155
|
55
|
+
batFramework/gui/toggle.py,sha256=gaGcPQCCvycwauKyjbOA7z81SVC4QsRbnWXe11-tyb0,4532
|
56
|
+
batFramework/gui/tooltip.py,sha256=Lay-4I7l6r5efk66j-KNfh4cqHmHF2mY9YtKgPYUiSk,887
|
57
|
+
batFramework/gui/widget.py,sha256=pzb5NRpQuBJAu6akV0e-VfDvt67csERTuJLTcHTk0Ww,17764
|
58
|
+
batFramework/gui/constraints/__init__.py,sha256=qqXE8nnSrEvCSeHdqY8UYPZLetqdubFPI7IdZuh35QE,26
|
59
|
+
batFramework/gui/constraints/constraints.py,sha256=LwbaIyerVRo5AJhVgjhcFfxFva6Wm9YcOneC0tONlP4,31598
|
60
|
+
batFramework/templates/__init__.py,sha256=E9PmclsTSsTZo-aDrIMiplFJeK4KiUJVFoA9mZw6ur0,25
|
61
|
+
batFramework/templates/controller.py,sha256=xylgodtCUj4Tpz6Yze6-uFgarxs44m7HaKY4q6nWqVQ,2969
|
62
|
+
batframework-1.0.9a8.dist-info/LICENSE,sha256=A65iXbMDbOxQLDNOODJLqA7o5RxszYlEqIgNSzBQRf4,1073
|
63
|
+
batframework-1.0.9a8.dist-info/METADATA,sha256=94iW7O-WwOotG1Kl4UC3MnYJY8KgTFsbH6MFbemtML0,2937
|
64
|
+
batframework-1.0.9a8.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
|
65
|
+
batframework-1.0.9a8.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
66
|
+
batframework-1.0.9a8.dist-info/RECORD,,
|
batFramework/character.py
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
import batFramework as bf
|
2
|
-
from .stateMachine import State
|
3
|
-
from .animatedSprite import AnimatedSprite
|
4
|
-
from .dynamicEntity import DynamicEntity
|
5
|
-
|
6
|
-
class Character(DynamicEntity,AnimatedSprite):
|
7
|
-
def __init__(self,*args,**kwargs) -> None:
|
8
|
-
super().__init__(*args,**kwargs)
|
9
|
-
self.state_machine = bf.StateMachine(self)
|
10
|
-
self.do_setup_animations()
|
11
|
-
self.do_setup_states()
|
12
|
-
|
13
|
-
def set_state(self,state_name:str):
|
14
|
-
self.state_machine.set_state(state_name)
|
15
|
-
|
16
|
-
def get_current_state(self)->State:
|
17
|
-
return self.state_machine.get_current_state()
|
18
|
-
|
19
|
-
def update(self, dt: float) -> None:
|
20
|
-
self.state_machine.update(dt)
|
21
|
-
super().update(dt)
|
22
|
-
|
23
|
-
def do_setup_states(self):
|
24
|
-
pass
|
25
|
-
|
26
|
-
def do_setup_animations(self):
|
27
|
-
pass
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import batFramework as bf
|
2
|
-
import pygame
|
3
|
-
from .states import *
|
4
|
-
|
5
|
-
class Platform2DCharacter(bf.Character):
|
6
|
-
def __init__(self,*args,**kwargs):
|
7
|
-
super().__init__(*args,**kwargs)
|
8
|
-
self.actions = bf.ActionContainer(
|
9
|
-
*bf.DirectionalKeyControls(),
|
10
|
-
bf.Action("jump").add_key_control(pygame.K_SPACE).set_holding()
|
11
|
-
)
|
12
|
-
self.on_ground : bool = False
|
13
|
-
self.max_jumps = 2
|
14
|
-
self.jump_counter = 0
|
15
|
-
self.jump_force = 150
|
16
|
-
self.speed = 100
|
17
|
-
self.acceleration = 30
|
18
|
-
self.friction = 0.7
|
19
|
-
self.gravity = 300
|
20
|
-
self.terminal_velocity = 1000
|
21
|
-
|
22
|
-
def do_setup_animations(self):
|
23
|
-
self.add_animation(bf.Animation("idle"))
|
24
|
-
self.add_animation(bf.Animation("run"))
|
25
|
-
self.add_animation(bf.Animation("jump"))
|
26
|
-
self.add_animation(bf.Animation("fall"))
|
27
|
-
|
28
|
-
|
29
|
-
def do_setup_states(self):
|
30
|
-
self.state_machine.add_state(Platform2DIdle())
|
31
|
-
self.state_machine.add_state(Platform2DRun())
|
32
|
-
self.state_machine.add_state(Platform2DJump())
|
33
|
-
self.state_machine.add_state(Platform2DFall())
|
34
|
-
self.state_machine.set_state("idle")
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
def do_reset_actions(self) -> None:
|
39
|
-
self.actions.reset()
|
40
|
-
|
41
|
-
def do_process_actions(self, event: pygame.Event) -> None:
|
42
|
-
self.actions.process_event(event)
|
43
|
-
|
batFramework/templates/states.py
DELETED
@@ -1,166 +0,0 @@
|
|
1
|
-
import batFramework as bf
|
2
|
-
from typing import TYPE_CHECKING
|
3
|
-
|
4
|
-
if TYPE_CHECKING:
|
5
|
-
from .character import Platform2DCharacter
|
6
|
-
|
7
|
-
|
8
|
-
class CharacterState(bf.State):
|
9
|
-
def set_parent(self, parent):
|
10
|
-
"""Initialize the parent character."""
|
11
|
-
res = super().set_parent(parent)
|
12
|
-
if res:
|
13
|
-
self.parent: Platform2DCharacter = parent
|
14
|
-
return res
|
15
|
-
|
16
|
-
def on_enter(self):
|
17
|
-
"""Handle state entry."""
|
18
|
-
self.parent.set_animation(self.name)
|
19
|
-
|
20
|
-
def handle_input(self):
|
21
|
-
"""Process input and update movement direction."""
|
22
|
-
if self.parent.actions.is_active("right"):
|
23
|
-
self._apply_horizontal_input(self.parent.acceleration, self.parent.speed)
|
24
|
-
if self.parent.actions.is_active("left"):
|
25
|
-
self._apply_horizontal_input(-self.parent.acceleration, -self.parent.speed)
|
26
|
-
|
27
|
-
if self.parent.velocity.x > 0:
|
28
|
-
self.parent.set_flipX(False)
|
29
|
-
elif self.parent.velocity.x < 0:
|
30
|
-
self.parent.set_flipX(True)
|
31
|
-
|
32
|
-
|
33
|
-
def _apply_horizontal_input(self, acceleration, limit):
|
34
|
-
"""Apply input acceleration and enforce speed limit."""
|
35
|
-
|
36
|
-
self.parent.velocity.x += acceleration
|
37
|
-
if abs(self.parent.velocity.x) > abs(limit):
|
38
|
-
self.parent.velocity.x = limit
|
39
|
-
|
40
|
-
def apply_friction(self):
|
41
|
-
"""Apply friction to horizontal velocity."""
|
42
|
-
if (self.parent.actions.is_active("right") or self.parent.actions.is_active("left")):
|
43
|
-
return
|
44
|
-
|
45
|
-
if abs(self.parent.velocity.x) < 0.01: # Threshold for negligible velocity
|
46
|
-
self.parent.velocity.x = 0
|
47
|
-
else:
|
48
|
-
self.parent.velocity.x *= self.parent.friction
|
49
|
-
|
50
|
-
def apply_gravity(self, dt):
|
51
|
-
"""Apply gravity to vertical velocity."""
|
52
|
-
self.parent.velocity.y += self.parent.gravity * dt
|
53
|
-
self.parent.velocity.y = min(self.parent.velocity.y, self.parent.terminal_velocity)
|
54
|
-
|
55
|
-
def move_character(self, dt):
|
56
|
-
"""Move the character based on velocity."""
|
57
|
-
self.parent.rect.x += self.parent.velocity.x * dt
|
58
|
-
self.parent.rect.y += self.parent.velocity.y * dt
|
59
|
-
|
60
|
-
def update(self, dt):
|
61
|
-
"""Update the character state."""
|
62
|
-
self.handle_input()
|
63
|
-
self.apply_physics(dt)
|
64
|
-
self.handle_collision()
|
65
|
-
|
66
|
-
def apply_physics(self, dt):
|
67
|
-
"""Apply all physics effects."""
|
68
|
-
self.apply_friction()
|
69
|
-
self.move_character(dt)
|
70
|
-
if self.parent.on_ground:
|
71
|
-
self.parent.velocity.y = 0 # Stop downward movement on ground
|
72
|
-
|
73
|
-
def handle_collision(self):
|
74
|
-
"""Placeholder for collision detection and resolution."""
|
75
|
-
pass # Future collision code goes here
|
76
|
-
|
77
|
-
|
78
|
-
class Platform2DIdle(CharacterState):
|
79
|
-
def __init__(self) -> None:
|
80
|
-
super().__init__("idle")
|
81
|
-
|
82
|
-
def on_enter(self):
|
83
|
-
self.parent.jump_counter = 0
|
84
|
-
super().on_enter()
|
85
|
-
|
86
|
-
def update(self, dt):
|
87
|
-
super().update(dt)
|
88
|
-
|
89
|
-
if not self.parent.on_ground:
|
90
|
-
self.parent.set_state("fall")
|
91
|
-
elif self.parent.velocity.x != 0:
|
92
|
-
self.parent.set_state("run")
|
93
|
-
elif self.parent.actions.is_active("jump"):
|
94
|
-
self.parent.set_state("jump")
|
95
|
-
|
96
|
-
|
97
|
-
class Platform2DRun(CharacterState):
|
98
|
-
def __init__(self) -> None:
|
99
|
-
super().__init__("run")
|
100
|
-
|
101
|
-
|
102
|
-
def on_enter(self):
|
103
|
-
self.parent.jump_counter = 0
|
104
|
-
super().on_enter()
|
105
|
-
|
106
|
-
def update(self, dt):
|
107
|
-
super().update(dt)
|
108
|
-
|
109
|
-
if self.parent.velocity.x :
|
110
|
-
if (self.parent.actions.is_active("right") or self.parent.actions.is_active("left")):
|
111
|
-
if self.parent.get_current_animation().name != "run" : self.parent.set_animation("run")
|
112
|
-
else:
|
113
|
-
if self.parent.get_current_animation().name != "idle" : self.parent.set_animation("idle")
|
114
|
-
|
115
|
-
if self.parent.actions.is_active("jump"):
|
116
|
-
self.parent.set_state("jump")
|
117
|
-
elif self.parent.velocity.x == 0:
|
118
|
-
if not (self.parent.actions.is_active("right") or self.parent.actions.is_active("left")):
|
119
|
-
self.parent.set_state("idle")
|
120
|
-
elif not self.parent.on_ground:
|
121
|
-
self.parent.set_state("fall")
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
class Platform2DJump(CharacterState):
|
127
|
-
def __init__(self) -> None:
|
128
|
-
super().__init__("jump")
|
129
|
-
|
130
|
-
def on_enter(self):
|
131
|
-
super().on_enter()
|
132
|
-
self.parent.on_ground = False
|
133
|
-
self.parent.velocity.y = -self.parent.jump_force
|
134
|
-
self.parent.jump_counter += 1
|
135
|
-
|
136
|
-
def update(self, dt):
|
137
|
-
super().update(dt)
|
138
|
-
self.apply_gravity(dt)
|
139
|
-
|
140
|
-
|
141
|
-
if self.parent.jump_counter < self.parent.max_jumps:
|
142
|
-
if self.parent.actions.is_active("jump") and (self.parent.velocity.y//10)*10 == 0:
|
143
|
-
self.parent.set_state("jump")
|
144
|
-
return
|
145
|
-
|
146
|
-
|
147
|
-
if self.parent.velocity.y > 0:
|
148
|
-
self.parent.set_state("fall")
|
149
|
-
|
150
|
-
|
151
|
-
class Platform2DFall(CharacterState):
|
152
|
-
def __init__(self) -> None:
|
153
|
-
super().__init__("fall")
|
154
|
-
|
155
|
-
def update(self, dt):
|
156
|
-
super().update(dt)
|
157
|
-
self.apply_gravity(dt)
|
158
|
-
|
159
|
-
if self.parent.on_ground:
|
160
|
-
if abs(self.parent.velocity.x) > 0.01:
|
161
|
-
self.parent.set_state("run")
|
162
|
-
else:
|
163
|
-
self.parent.set_state("idle")
|
164
|
-
|
165
|
-
if self.parent.actions.is_active("jump") and self.parent.jump_counter < self.parent.max_jumps:
|
166
|
-
self.parent.set_state("jump")
|
@@ -1,63 +0,0 @@
|
|
1
|
-
batFramework/__init__.py,sha256=Wu_8kpeyR_XgD5zewnX_xXAF8CwStcO7vivideqsgIw,2590
|
2
|
-
batFramework/action.py,sha256=919IVYKviLyVYDtQL7oZvlVuE_aodjJCuwz6fGi5sCk,8420
|
3
|
-
batFramework/actionContainer.py,sha256=qy6-YY3iX26KJ8NqFMSYo6JExohD8HFk0sC1qhb7qA8,2602
|
4
|
-
batFramework/animatedSprite.py,sha256=IWE8zUgpFaqQPUr7iOUo7TJ_E10aUaMNqlIqv8dW87E,4242
|
5
|
-
batFramework/animation.py,sha256=_XcH6r3TVQZUcLbhzUnTNlXrjy-J-nYiRmFpxvTYEoc,1934
|
6
|
-
batFramework/audioManager.py,sha256=_TtLnkxOo08mxPDtzMC4cuK94eqZhslO5q_FEsZRaU0,3850
|
7
|
-
batFramework/camera.py,sha256=tSy9n20QLeJD3Uz352q-uejzAHPtQczvahaNz7APJcY,9408
|
8
|
-
batFramework/character.py,sha256=AK5sQLvAOY3X4-7vzeHeIO5WDFsubn_TADLYxmYc0Qo,789
|
9
|
-
batFramework/constants.py,sha256=x8a0GqBJdiwMEjlVohyL3AWHaSxyrBy-4pucVKVNakg,1354
|
10
|
-
batFramework/cutscene.py,sha256=UOz3NApbz4W7Wi6wD_ZEmkxaZCAWt1YWh5ZFzXw5Xco,1749
|
11
|
-
batFramework/cutsceneManager.py,sha256=mvBR4KOv6KV9eHzhYH7r6IJMVLjM71C30C2OuvwbuSU,945
|
12
|
-
batFramework/drawable.py,sha256=5We2ITq3M5ERG22-iQw7Mo_1LNo0nqma1P13tvphDjY,2197
|
13
|
-
batFramework/dynamicEntity.py,sha256=SjXShy5aT4cQzjlTem05zSQRiNeq52AUXEBVodEG6gI,736
|
14
|
-
batFramework/easingController.py,sha256=ql_nt8unwUZLy7MC7unzDn5eTW44VtjrOTCDs8WS0eY,1750
|
15
|
-
batFramework/entity.py,sha256=wMQKR6IxQ69vtPY4nGsz7WnY9ApPhO_VY08IYx6yUu8,2910
|
16
|
-
batFramework/enums.py,sha256=xkT4yepdLLQn-5YWoSxhHamXE7w_M-GIw47dWWHfKIs,2185
|
17
|
-
batFramework/fontManager.py,sha256=M7h6AVq9Fwr51UTCFoGsg_PSurdjByA4w8qouXq4EKE,2254
|
18
|
-
batFramework/manager.py,sha256=TQ0Q1f_GbQE8h4G9zCNQgtNTKNCj630S43Ai4e0yZik,4488
|
19
|
-
batFramework/particle.py,sha256=Aps9eJNdFag-TlduMSezKp4ocFQVvI6iZ98chhdhbgE,3081
|
20
|
-
batFramework/renderGroup.py,sha256=CO8LtTP1gYI1i_8OwmMk2SlU33Nv4iXnHvK0RVK3D24,2026
|
21
|
-
batFramework/resourceManager.py,sha256=0cOIAFXT7UzzvgHn9QkWcXsTp8H2bIS70NvvgpBL2_4,3554
|
22
|
-
batFramework/scene.py,sha256=0E7omgNUEl5Uhbx8iO3exyCy4p1MC7bSvqfwncW4KMw,11281
|
23
|
-
batFramework/sceneManager.py,sha256=GCGt7DYoty_wX2LVEhv0C6TaNyNWhKvWocwOqxUIBXc,7099
|
24
|
-
batFramework/scrollingSprite.py,sha256=6FFS27kPaPto6-lIM7k3zHW1pnlEJ4mFopYP_tyvzb0,3917
|
25
|
-
batFramework/sprite.py,sha256=Cz8qzl8jR8y33DUSCObJQOk5e8PcZeavtFhBdR2TogU,1627
|
26
|
-
batFramework/stateMachine.py,sha256=wC-5xbKvf-vGm_N16X9KhgMya5915GyVXL79uk5Bapw,1359
|
27
|
-
batFramework/tileset.py,sha256=3AJBWHx90PC43BdLYCBFm811XBrMvWoB-nsUgyo6s-I,1728
|
28
|
-
batFramework/timeManager.py,sha256=TT_pynpS1wYmSK6s8ksQTt-coR9EeB0mYimhq5yrK08,4975
|
29
|
-
batFramework/transition.py,sha256=tKthKfGyv1V39eIiNGSGL---KcZXix3YIGg9RirOcLc,6809
|
30
|
-
batFramework/triggerZone.py,sha256=MaPp20UoyRHAMiN0_sBanJJ_0cWnYXZEeY-BEaDTDxQ,652
|
31
|
-
batFramework/utils.py,sha256=vfndaYn4wMy0W746C6oCWCvnUyk9BxPL2vIpGyEDssU,9958
|
32
|
-
batFramework/gui/__init__.py,sha256=OFAKZkafWX-BfDjF4MILmigVT1lywnsfH2pOIJwUybY,691
|
33
|
-
batFramework/gui/animatedLabel.py,sha256=KePSSd6bTeJ5UXoPUpvY7QRx5Uah5-qpBDGby6xRgqU,2752
|
34
|
-
batFramework/gui/button.py,sha256=p_wMcaijpUbNuoRBNkhplrZqsB3gdl7mVpduR-UFm_4,1803
|
35
|
-
batFramework/gui/clickableWidget.py,sha256=8wHuH_aBuNrzG5_YZLfmtc65n0jtlDrJV3rFd9M4QSg,7477
|
36
|
-
batFramework/gui/container.py,sha256=2EIPpumiswH365Tq-3iF2FzApY2T440O9qijAx7SkpU,6280
|
37
|
-
batFramework/gui/debugger.py,sha256=0w2B4qQ5MeFwwP46zG7KTzIFzh2fmtU10UH96b_hT9Y,3997
|
38
|
-
batFramework/gui/draggableWidget.py,sha256=SKG7oMInZ_GTnrbv2T0aqlppuiuLX1tkVSCQJtRMlk8,1392
|
39
|
-
batFramework/gui/image.py,sha256=CPDSF7Fz1zmGAK-ii7R4MIAD5EZCnPw4mpD_cGv77U8,1925
|
40
|
-
batFramework/gui/indicator.py,sha256=31QAyvT9w-eCWUSoK4pV-4TsTzFvkY_g5snoeI1hATM,1619
|
41
|
-
batFramework/gui/interactiveWidget.py,sha256=ww9WsR2Y87og7NtnzCcyc1zIPE-Bjtn0YZ0SOfKMUbQ,6633
|
42
|
-
batFramework/gui/label.py,sha256=6GY_2f4el1KmJ3JoLgE57oPl7Xdbx1codaHdAW3h_x0,11639
|
43
|
-
batFramework/gui/layout.py,sha256=MJjcz6fjTWtt4-Td0dAqKd3XRDlRJ5QaDpRbdYEj1w8,21661
|
44
|
-
batFramework/gui/meter.py,sha256=RFzAhSzR3O-Pw0wjdfApWGWFQSJoYa4WohkiREDAAJc,2395
|
45
|
-
batFramework/gui/radioButton.py,sha256=DgCtN1j1s2rUITpdYqArqQ36NnNGump7FiTe_ndEzJg,2436
|
46
|
-
batFramework/gui/root.py,sha256=r8dhI2xd2h5bUbTe4x_On77BTTZ7Sf8qY5wWJimWXds,5078
|
47
|
-
batFramework/gui/shape.py,sha256=PSQRqa8jYA8VsBXRQcpcCuEvTYmWDW8zJkzA_eRFPIo,9349
|
48
|
-
batFramework/gui/slider.py,sha256=rt0f2jnxyd89uepyBqBueP3qw6y9ZTIRGXipI9fhBs4,8467
|
49
|
-
batFramework/gui/style.py,sha256=OeLbft0RkIslQ2IcZpBeF6TaQDONIoBcAHj_Bkh9gFw,131
|
50
|
-
batFramework/gui/styleManager.py,sha256=mg9VbK0Ux9pwTbq9oICilnQG3xJLnnZEjOzzSg0IVpY,1424
|
51
|
-
batFramework/gui/textInput.py,sha256=v4r110mYmPj0RB97DsCG81U06dUd-7cnNeBj-mnbdiE,11002
|
52
|
-
batFramework/gui/toggle.py,sha256=icvg0GY0pErCZPWoje_SO7L6Ik_sM--XHTM-pUAwdY8,3997
|
53
|
-
batFramework/gui/widget.py,sha256=KrkQH8Z2tSVcnCHhet-xXlHy3SqSjHByBQVNoTOs54E,14597
|
54
|
-
batFramework/gui/constraints/__init__.py,sha256=qqXE8nnSrEvCSeHdqY8UYPZLetqdubFPI7IdZuh35QE,26
|
55
|
-
batFramework/gui/constraints/constraints.py,sha256=XFvrjFFN1nmbYzI6l54DlZkrRP-wWXfgXrtE4T5egCA,29707
|
56
|
-
batFramework/templates/__init__.py,sha256=8XN-7JwYFKTRx_lnUL_If3spwgn5_2b7bwmrRRBPON0,46
|
57
|
-
batFramework/templates/character.py,sha256=4UEcegUIeIgj48sVgzyRcT6yjpFOZ8Q_gHTtiB5j6kw,1348
|
58
|
-
batFramework/templates/states.py,sha256=WeomVrQ10vHxVCj9Wnk1PcinKyb871uV910mQe287kI,5370
|
59
|
-
batframework-1.0.9a7.dist-info/LICENCE,sha256=A65iXbMDbOxQLDNOODJLqA7o5RxszYlEqIgNSzBQRf4,1073
|
60
|
-
batframework-1.0.9a7.dist-info/METADATA,sha256=-k4nsIYu17ETK8XuTqXQC3tATx_YYMgFiFBRJqvwoeA,1694
|
61
|
-
batframework-1.0.9a7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
62
|
-
batframework-1.0.9a7.dist-info/top_level.txt,sha256=vxAKBIk1oparFTxeXGBrgfIO7iq_YR5Fv1JvPVAIwmA,13
|
63
|
-
batframework-1.0.9a7.dist-info/RECORD,,
|
File without changes
|
File without changes
|