batframework 1.0.9a11__py3-none-any.whl → 1.0.9a12__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.
Files changed (73) hide show
  1. batFramework/__init__.py +2 -0
  2. batFramework/action.py +280 -279
  3. batFramework/actionContainer.py +105 -82
  4. batFramework/animatedSprite.py +80 -58
  5. batFramework/animation.py +91 -77
  6. batFramework/audioManager.py +156 -131
  7. batFramework/baseScene.py +249 -240
  8. batFramework/camera.py +245 -317
  9. batFramework/constants.py +57 -51
  10. batFramework/cutscene.py +239 -253
  11. batFramework/cutsceneManager.py +34 -34
  12. batFramework/drawable.py +107 -77
  13. batFramework/dynamicEntity.py +30 -30
  14. batFramework/easingController.py +58 -58
  15. batFramework/entity.py +130 -130
  16. batFramework/enums.py +171 -135
  17. batFramework/fontManager.py +65 -65
  18. batFramework/gui/__init__.py +28 -25
  19. batFramework/gui/animatedLabel.py +90 -89
  20. batFramework/gui/button.py +17 -17
  21. batFramework/gui/clickableWidget.py +244 -244
  22. batFramework/gui/collapseContainer.py +98 -0
  23. batFramework/gui/constraints/__init__.py +1 -1
  24. batFramework/gui/constraints/constraints.py +1066 -980
  25. batFramework/gui/container.py +220 -206
  26. batFramework/gui/debugger.py +140 -130
  27. batFramework/gui/draggableWidget.py +63 -44
  28. batFramework/gui/image.py +61 -58
  29. batFramework/gui/indicator.py +116 -113
  30. batFramework/gui/interactiveWidget.py +243 -239
  31. batFramework/gui/label.py +147 -344
  32. batFramework/gui/layout.py +442 -429
  33. batFramework/gui/meter.py +155 -96
  34. batFramework/gui/radioButton.py +43 -35
  35. batFramework/gui/root.py +228 -228
  36. batFramework/gui/scrollingContainer.py +282 -0
  37. batFramework/gui/selector.py +232 -250
  38. batFramework/gui/shape.py +286 -276
  39. batFramework/gui/slider.py +353 -397
  40. batFramework/gui/style.py +10 -10
  41. batFramework/gui/styleManager.py +49 -54
  42. batFramework/gui/syncedVar.py +43 -49
  43. batFramework/gui/textInput.py +331 -306
  44. batFramework/gui/textWidget.py +308 -0
  45. batFramework/gui/toggle.py +140 -128
  46. batFramework/gui/tooltip.py +35 -30
  47. batFramework/gui/widget.py +546 -521
  48. batFramework/manager.py +131 -134
  49. batFramework/particle.py +118 -118
  50. batFramework/propertyEaser.py +79 -79
  51. batFramework/renderGroup.py +34 -34
  52. batFramework/resourceManager.py +130 -130
  53. batFramework/scene.py +31 -31
  54. batFramework/sceneLayer.py +134 -138
  55. batFramework/sceneManager.py +200 -197
  56. batFramework/scrollingSprite.py +115 -115
  57. batFramework/sprite.py +46 -51
  58. batFramework/stateMachine.py +49 -54
  59. batFramework/templates/__init__.py +2 -1
  60. batFramework/templates/character.py +15 -0
  61. batFramework/templates/controller.py +158 -97
  62. batFramework/templates/stateMachine.py +39 -0
  63. batFramework/tileset.py +46 -46
  64. batFramework/timeManager.py +213 -213
  65. batFramework/transition.py +162 -162
  66. batFramework/triggerZone.py +22 -22
  67. batFramework/utils.py +306 -306
  68. {batframework-1.0.9a11.dist-info → batframework-1.0.9a12.dist-info}/LICENSE +20 -20
  69. {batframework-1.0.9a11.dist-info → batframework-1.0.9a12.dist-info}/METADATA +24 -17
  70. batframework-1.0.9a12.dist-info/RECORD +72 -0
  71. batframework-1.0.9a11.dist-info/RECORD +0 -67
  72. {batframework-1.0.9a11.dist-info → batframework-1.0.9a12.dist-info}/WHEEL +0 -0
  73. {batframework-1.0.9a11.dist-info → batframework-1.0.9a12.dist-info}/top_level.txt +0 -0
batFramework/constants.py CHANGED
@@ -1,51 +1,57 @@
1
- import pygame
2
-
3
-
4
- class Constants:
5
- SCREEN: pygame.Surface = None
6
- RESOLUTION: tuple[int, int] = (1280, 720)
7
- WIDTH = 1280
8
- HEIGHT = 720
9
- VSYNC = 0
10
- FLAGS: int = pygame.SCALED | pygame.RESIZABLE
11
- FPS: int = 60
12
- MUSIC_END_EVENT = pygame.event.custom_type()
13
-
14
- DEFAULT_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
15
- DEFAULT_HOVER_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
16
- DEFAULT_CLICK_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
17
-
18
- BF_INITIALIZED: bool = False
19
- ALLOW_DEBUG : bool = True
20
-
21
- @staticmethod
22
- def set_allow_debug(allow_debug:bool):
23
- Constants.ALLOW_DEBUG = allow_debug
24
-
25
- @staticmethod
26
- def set_resolution(resolution: tuple[int, int]):
27
- Constants.RESOLUTION = resolution
28
- Constants.WIDTH = resolution[0]
29
- Constants.HEIGHT = resolution[1]
30
- Constants.update_screen()
31
-
32
- @staticmethod
33
- def update_screen():
34
- if Constants.BF_INITIALIZED:
35
- Constants.SCREEN = pygame.display.set_mode(Constants.RESOLUTION,Constants.FLAGS,vsync=Constants.VSYNC)
36
-
37
- @staticmethod
38
- def set_default_cursor(cursor: pygame.Cursor):
39
- Constants.DEFAULT_CURSOR = cursor
40
-
41
- @staticmethod
42
- def set_default_hover_cursor(cursor: pygame.Cursor):
43
- Constants.DEFAULT_HOVER_CURSOR = cursor
44
-
45
- @staticmethod
46
- def set_default_click_cursor(cursor: pygame.Cursor):
47
- Constants.DEFAULT_CLICK_CURSOR = cursor
48
-
49
- @staticmethod
50
- def set_fps_limit(value: int):
51
- Constants.FPS = value
1
+ import pygame
2
+
3
+
4
+ class Constants:
5
+ SCREEN: pygame.Surface = None
6
+ RESOLUTION: tuple[int, int] = (1280, 720)
7
+ WIDTH = 1280
8
+ HEIGHT = 720
9
+ VSYNC = 0
10
+ FLAGS: int = pygame.SCALED | pygame.RESIZABLE
11
+ FPS: int = 60
12
+ MUSIC_END_EVENT = pygame.event.custom_type()
13
+
14
+ DEFAULT_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
15
+ DEFAULT_HOVER_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
16
+ DEFAULT_CLICK_CURSOR = pygame.cursors.Cursor(pygame.SYSTEM_CURSOR_ARROW)
17
+
18
+ BF_INITIALIZED: bool = False
19
+ ALLOW_DEBUG : bool = True
20
+
21
+ WIDGET_KEY_REPEAT_DELAY = 200
22
+ WIDGET_KEY_REPEAT_INTERVAL = 50
23
+ GLOBAL_KEY_REPEAT_DELAY = 200
24
+ GLOBAL_KEY_REPEAT_INTERVAL = 50
25
+
26
+
27
+ @staticmethod
28
+ def set_allow_debug(allow_debug:bool):
29
+ Constants.ALLOW_DEBUG = allow_debug
30
+
31
+ @staticmethod
32
+ def set_resolution(resolution: tuple[int, int]):
33
+ Constants.RESOLUTION = resolution
34
+ Constants.WIDTH = resolution[0]
35
+ Constants.HEIGHT = resolution[1]
36
+ Constants.update_screen()
37
+
38
+ @staticmethod
39
+ def update_screen():
40
+ if Constants.BF_INITIALIZED:
41
+ Constants.SCREEN = pygame.display.set_mode(Constants.RESOLUTION,Constants.FLAGS,vsync=Constants.VSYNC)
42
+
43
+ @staticmethod
44
+ def set_default_cursor(cursor: pygame.Cursor):
45
+ Constants.DEFAULT_CURSOR = cursor
46
+
47
+ @staticmethod
48
+ def set_default_hover_cursor(cursor: pygame.Cursor):
49
+ Constants.DEFAULT_HOVER_CURSOR = cursor
50
+
51
+ @staticmethod
52
+ def set_default_click_cursor(cursor: pygame.Cursor):
53
+ Constants.DEFAULT_CLICK_CURSOR = cursor
54
+
55
+ @staticmethod
56
+ def set_fps_limit(value: int):
57
+ Constants.FPS = value
batFramework/cutscene.py CHANGED
@@ -1,253 +1,239 @@
1
- import batFramework as bf
2
- from .transition import Transition
3
- from typing import Callable,Any
4
-
5
- class Cutscene:
6
- def __init__(self):
7
- """
8
- Create a base Cutscene (ends immediately)
9
- """
10
-
11
- def start(self):
12
- """
13
- Called by the manager or the parent cutscene
14
- Has to return to blank init state
15
- """
16
- self.end()
17
-
18
- def process_event(self,event):
19
- pass
20
-
21
- def update(self,dt):
22
- pass
23
-
24
-
25
- def end(self):
26
- """
27
- Mark self as over
28
- """
29
- self.is_over = True
30
-
31
- class Sequence(Cutscene):
32
- def __init__(self,*cutscenes):
33
- self.sub_cutscenes :list[Cutscene] = list(cutscenes)
34
- self.index = 0
35
-
36
- def start(self):
37
- self.is_over = False
38
- self.index = 0
39
- if self.sub_cutscenes:
40
- self.sub_cutscenes[0].start()
41
-
42
- def process_event(self,event):
43
- """
44
- propagate process event for current sub cutscene
45
- """
46
- if self.index >0 and not self.is_over:
47
- self.sub_cutscenes[self.index].process_event(event)
48
-
49
-
50
-
51
- def update(self,dt):
52
- """
53
- Update current sub cutscene (if any)
54
- if current is over, start next one
55
- if current was last, then end self
56
- """
57
- if self.index < len(self.sub_cutscenes):
58
- self.sub_cutscenes[self.index].update(dt)
59
- if self.sub_cutscenes[self.index].is_over:
60
- self.index += 1
61
- if self.index == len(self.sub_cutscenes):
62
- self.end()
63
- return
64
- self.sub_cutscenes[self.index].start()
65
-
66
-
67
- class Parallel(Cutscene):
68
- def __init__(self,*cutscenes:Cutscene):
69
- self.sub_cutscenes : list[Cutscene] = list(cutscenes)
70
-
71
- def start(self):
72
- self.is_over = False
73
- if not self.sub_cutscenes:
74
- self.end()
75
- for s in self.sub_cutscenes:
76
- s.start()
77
-
78
- def update(self,dt):
79
- for s in self.sub_cutscenes:
80
- s.update(dt)
81
- if all(s.is_over for s in self.sub_cutscenes):
82
- self.end()
83
-
84
- class Wait(Cutscene):
85
- def __init__(self,duration:float,scene_name:str="global"):
86
- self.duration = duration
87
- self.scene_name = scene_name
88
- def start(self):
89
- self.is_over = False
90
- self.timer = bf.SceneTimer(duration=self.duration,end_callback=self.end,scene_name=self.scene_name)
91
- self.timer.start()
92
-
93
-
94
-
95
- class TransitionToScene(Cutscene):
96
- def __init__(self,scene_name:str,transition:Transition):
97
- self.scene_name = scene_name
98
- self.transition: Transition = transition
99
-
100
- def start(self):
101
- self.is_over = False
102
- bf.CutsceneManager().manager.transition_to_scene(self.scene_name,self.transition)
103
- bf.Timer(self.transition.duration,end_callback=self.end).start()
104
-
105
-
106
-
107
-
108
-
109
-
110
- class GlideWorldCameraFromTo(Cutscene):
111
- def __init__(self,start:tuple[float,float], stop:tuple[float,float],duration:float=1,easing:bf.easing=bf.easing.EASE_IN_OUT,scene_name:str=None):
112
- super().__init__()
113
- self.scene = None
114
- self.scene_name = scene_name
115
- self.start_pos = start
116
- self.stop_pos = stop
117
- self.controller = bf.EasingController(duration,easing,update_callback=self.internal,end_callback=self.end)
118
-
119
-
120
- def start(self):
121
- self.is_over = False
122
- if self.scene_name is None:
123
- self.scene_name = bf.CutsceneManager().manager.get_scene_at(0).name
124
-
125
- self.scene = bf.CutsceneManager().manager.get_scene(self.scene_name)
126
- self.controller.start()
127
-
128
-
129
- def internal(self,progression:float):
130
- self.scene.camera.set_center(
131
- self.start_pos[0]+progression*(self.stop_pos[0]-self.start_pos[0]),
132
- self.start_pos[1]+progression*(self.stop_pos[1]-self.start_pos[1])
133
- )
134
-
135
- def end(self):
136
- if self.scene:
137
- self.scene.camera.set_center(self.stop_pos[0],self.stop_pos[1])
138
-
139
- super().end()
140
-
141
-
142
-
143
- class Function(Cutscene):
144
- def __init__(self, function:Callable[[],Any],*args,**kwargs):
145
- super().__init__()
146
- self.function:Callable[[],Any] = function
147
- self.args = args
148
- self.kwargs = kwargs
149
-
150
- def start(self):
151
- self.is_over = False
152
- self.function(*self.args,**self.kwargs)
153
- self.end()
154
-
155
- class GlideCamera(Cutscene):
156
- def __init__(
157
- self,
158
- start: tuple[float, float] | None = None,
159
- stop: tuple[float, float] | None = None,
160
- delta: tuple[float, float] | None = None,
161
- duration: float = 1,
162
- easing: bf.easing = bf.easing.EASE_IN_OUT,
163
- scene_name: str | None = None,
164
- layer_name: str = "world",
165
- ):
166
- super().__init__()
167
- self.scene = None
168
- self.layer = None
169
- self.scene_name = scene_name
170
- self.layer_name = layer_name
171
- self.start_pos = start
172
- self.stop_pos = stop
173
- self.delta = delta
174
- self.controller = bf.EasingController(
175
- duration, easing, update_callback=self.internal, end_callback=self.end
176
- )
177
-
178
- def start(self):
179
- self.is_over = False
180
-
181
- if self.scene_name is None:
182
- self.scene_name = bf.CutsceneManager().manager.get_scene_at(0).name
183
-
184
- self.scene = bf.CutsceneManager().manager.get_scene(self.scene_name)
185
- self.layer = self.scene.get_layer(self.layer_name)
186
-
187
- if not self.layer:
188
- raise ValueError(f"Layer '{self.layer_name}' not found in scene '{self.scene_name}'.")
189
-
190
- # Fallback to current camera position
191
- if self.start_pos is None:
192
- self.start_pos = self.layer.camera.get_center()
193
-
194
- # Compute stop_pos if not set
195
- if self.stop_pos is None:
196
- if self.delta is not None:
197
- self.stop_pos = (
198
- self.start_pos[0] + self.delta[0],
199
- self.start_pos[1] + self.delta[1],
200
- )
201
- else:
202
- raise ValueError("Must specify either stop or delta position")
203
-
204
- self.controller.start()
205
-
206
- def internal(self, progression: float):
207
- self.layer.camera.set_center(
208
- self.start_pos[0] + progression * (self.stop_pos[0] - self.start_pos[0]),
209
- self.start_pos[1] + progression * (self.stop_pos[1] - self.start_pos[1]),
210
- )
211
-
212
- def end(self):
213
- if self.layer:
214
- self.layer.camera.set_center(*self.stop_pos)
215
- super().end()
216
-
217
- class GlideCameraTo(GlideCamera):
218
- def __init__(
219
- self,
220
- stop: tuple[float, float],
221
- duration: float = 1,
222
- easing: bf.easing = bf.easing.EASE_IN_OUT,
223
- scene_name: str | None = None,
224
- layer_name: str = "world",
225
- ):
226
- super().__init__(
227
- start=None,
228
- stop=stop,
229
- delta=None,
230
- duration=duration,
231
- easing=easing,
232
- scene_name=scene_name,
233
- layer_name=layer_name,
234
- )
235
-
236
- class GlideCameraBy(GlideCamera):
237
- def __init__(
238
- self,
239
- delta: tuple[float, float],
240
- duration: float = 1,
241
- easing: bf.easing = bf.easing.EASE_IN_OUT,
242
- scene_name: str | None = None,
243
- layer_name: str = "world",
244
- ):
245
- super().__init__(
246
- start=None,
247
- stop=None,
248
- delta=delta,
249
- duration=duration,
250
- easing=easing,
251
- scene_name=scene_name,
252
- layer_name=layer_name,
253
- )
1
+ import batFramework as bf
2
+ from .transition import Transition
3
+ from typing import Callable,Any
4
+
5
+ class Cutscene:
6
+ def __init__(self):
7
+ """
8
+ Create a base Cutscene (ends immediately)
9
+ """
10
+
11
+ def start(self):
12
+ """
13
+ Called by the manager or the parent cutscene
14
+ Has to return to blank init state
15
+ """
16
+ self.end()
17
+
18
+ def process_event(self,event):
19
+ pass
20
+
21
+ def update(self,dt):
22
+ pass
23
+
24
+ def __str__(self)->str:
25
+ return self.__class__.__name__
26
+
27
+ def end(self):
28
+ """
29
+ Mark self as over
30
+ """
31
+ print("Start ",self)
32
+
33
+ self.is_over = True
34
+
35
+ class Sequence(Cutscene):
36
+ def __init__(self,*cutscenes):
37
+ self.sub_cutscenes :list[Cutscene] = list(cutscenes)
38
+ self.index = 0
39
+
40
+ def start(self):
41
+ self.is_over = False
42
+ self.index = 0
43
+ if self.sub_cutscenes:
44
+ self.sub_cutscenes[0].start()
45
+
46
+ def process_event(self,event):
47
+ """
48
+ propagate process event for current sub cutscene
49
+ """
50
+ if self.index >0 and not self.is_over:
51
+ self.sub_cutscenes[self.index].process_event(event)
52
+
53
+
54
+
55
+ def update(self,dt):
56
+ """
57
+ Update current sub cutscene (if any)
58
+ if current is over, start next one
59
+ if current was last, then end self
60
+ """
61
+ if self.index < len(self.sub_cutscenes):
62
+ self.sub_cutscenes[self.index].update(dt)
63
+ if self.sub_cutscenes[self.index].is_over:
64
+ self.index += 1
65
+ if self.index == len(self.sub_cutscenes):
66
+ self.end()
67
+ return
68
+ self.sub_cutscenes[self.index].start()
69
+
70
+
71
+ class Parallel(Cutscene):
72
+ def __init__(self,*cutscenes:Cutscene):
73
+ self.sub_cutscenes : list[Cutscene] = list(cutscenes)
74
+
75
+ def start(self):
76
+ self.is_over = False
77
+ if not self.sub_cutscenes:
78
+ self.end()
79
+ for s in self.sub_cutscenes:
80
+ s.start()
81
+
82
+ def update(self,dt):
83
+ for s in self.sub_cutscenes:
84
+ s.update(dt)
85
+ if all(s.is_over for s in self.sub_cutscenes):
86
+ self.end()
87
+
88
+ class Wait(Cutscene):
89
+ def __init__(self,duration:float,scene_name:str="global"):
90
+ self.duration = duration
91
+ self.scene_name = scene_name
92
+ def start(self):
93
+ self.is_over = False
94
+ self.timer = bf.SceneTimer(duration=self.duration,end_callback=self.end,scene_name=self.scene_name)
95
+ self.timer.start()
96
+
97
+
98
+
99
+ class TransitionToScene(Cutscene):
100
+ def __init__(self,scene_name:str,transition:Transition):
101
+ self.scene_name = scene_name
102
+ self.transition: Transition = transition
103
+
104
+ def start(self):
105
+ self.is_over = False
106
+ bf.CutsceneManager().manager.transition_to_scene(self.scene_name,self.transition)
107
+ bf.Timer(self.transition.duration,end_callback=self.end).start()
108
+
109
+
110
+
111
+
112
+
113
+
114
+ class GlideWorldCameraFromTo(Cutscene):
115
+ def __init__(self,start:tuple[float,float], stop:tuple[float,float],duration:float=1,easing:bf.easing=bf.easing.EASE_IN_OUT,scene_name:str=None):
116
+ super().__init__()
117
+ self.scene = None
118
+ self.scene_name = scene_name
119
+ self.start_pos = start
120
+ self.stop_pos = stop
121
+ self.controller = bf.EasingController(duration,easing,update_callback=self.internal,end_callback=self.end)
122
+
123
+
124
+ def start(self):
125
+ self.is_over = False
126
+ if self.scene_name is None:
127
+ self.scene_name = bf.CutsceneManager().manager.get_scene_at(0).name
128
+
129
+ self.scene = bf.CutsceneManager().manager.get_scene(self.scene_name)
130
+ self.controller.start()
131
+
132
+
133
+ def internal(self,progression:float):
134
+ if not self.scene:
135
+ self.end()
136
+ return
137
+ self.scene.camera.set_center(
138
+ self.start_pos[0]+progression*(self.stop_pos[0]-self.start_pos[0]),
139
+ self.start_pos[1]+progression*(self.stop_pos[1]-self.start_pos[1])
140
+ )
141
+
142
+ def end(self):
143
+ if self.scene:
144
+ self.scene.camera.set_center(self.stop_pos[0],self.stop_pos[1])
145
+
146
+ super().end()
147
+
148
+
149
+
150
+ class Function(Cutscene):
151
+ def __init__(self, function:Callable[[],Any],*args,**kwargs):
152
+ super().__init__()
153
+ self.function:Callable[[],Any] = function
154
+ self.args = args
155
+ self.kwargs = kwargs
156
+
157
+ def start(self):
158
+ self.is_over = False
159
+ self.function(*self.args,**self.kwargs)
160
+ self.end()
161
+
162
+ class GlideCamera(Cutscene):
163
+ def __init__(
164
+ self,
165
+ start: tuple[float, float] | None,
166
+ stop: tuple[float, float] | None,
167
+ duration: float = 1,
168
+ easing: bf.easing = bf.easing.EASE_IN_OUT,
169
+ scene_name: str | None = None,
170
+ layer_name: str = "world",
171
+ ):
172
+ """
173
+ If start is None, it will be defaulted to the current camera center position.
174
+ Stop must be provided
175
+ """
176
+ super().__init__()
177
+ self.scene = None
178
+ self.layer = None
179
+ self.scene_name = scene_name
180
+ self.layer_name = layer_name
181
+ self.start_pos = start
182
+ self.stop_pos = stop
183
+ self.controller = bf.EasingController(
184
+ duration, easing, update_callback=self.internal, end_callback=self.end
185
+ )
186
+
187
+ def start(self):
188
+ self.is_over = False
189
+
190
+ if self.scene_name is None:
191
+ self.scene_name = bf.CutsceneManager().manager.get_scene_at(0).name
192
+
193
+ self.scene = bf.CutsceneManager().manager.get_scene(self.scene_name)
194
+ self.layer = self.scene.get_layer(self.layer_name)
195
+
196
+ if not self.layer:
197
+ raise ValueError(f"Layer '{self.layer_name}' not found in scene '{self.scene_name}'.")
198
+
199
+ # Fallback to current camera position
200
+ if self.start_pos is None:
201
+ self.start_pos = self.layer.camera.get_center()
202
+
203
+ self.controller.start()
204
+
205
+ def internal(self, progression: float):
206
+ self.layer.camera.set_center(
207
+ self.start_pos[0] + progression * (self.stop_pos[0] - self.start_pos[0]),
208
+ self.start_pos[1] + progression * (self.stop_pos[1] - self.start_pos[1]),
209
+ )
210
+
211
+ def end(self):
212
+ if self.layer:
213
+ self.layer.camera.set_center(*self.stop_pos)
214
+ super().end()
215
+
216
+
217
+
218
+ class GlideCameraBy(GlideCamera):
219
+ def __init__(
220
+ self,
221
+ delta: tuple[float, float],
222
+ duration: float = 1,
223
+ easing: bf.easing = bf.easing.EASE_IN_OUT,
224
+ scene_name: str | None = None,
225
+ layer_name: str = "world",
226
+ ):
227
+ stop_pos = (
228
+ start_pos[0] + self.delta[0],
229
+ start_pos[1] + self.delta[1],
230
+ )
231
+ super().__init__(
232
+ start=None,
233
+ stop=None,
234
+ delta=delta,
235
+ duration=duration,
236
+ easing=easing,
237
+ scene_name=scene_name,
238
+ layer_name=layer_name,
239
+ )