from direct.gui.DirectGui import DirectButton, DirectFrame
from direct.gui.DirectGuiGlobals import FLAT, DISABLED, NORMAL
from direct.showbase.DirectObject import DirectObject
+from direct.interval.IntervalGlobal import Sequence, Func
+from direct.interval.LerpInterval import LerpFunctionInterval
from pmachines.items.background import Background
from pmachines.gui.sidepanel import SidePanel
from ya2.utils.cursor import MouseCursor
info('enforce res: ' + val)
def destroy(self):
+ self.__intro_sequence.finish()
self.ignore('enforce_res')
self._unset_gui()
self._unset_lights()
def _set_camera(self):
base.camera.set_pos(0, -20, 0)
base.camera.look_at(0, 0, 0)
+ def camera_ani(t):
+ start_v = (1, -5, 1)
+ end_v = (0, -20, 0)
+ curr_pos = (
+ start_v[0] + (end_v[0] - start_v[0]) * t,
+ start_v[1] + (end_v[1] - start_v[1]) * t,
+ start_v[2] + (end_v[2] - start_v[2]) * t)
+ base.camera.set_pos(*curr_pos)
+ self.repos()
+ camera_interval = LerpFunctionInterval(
+ camera_ani,
+ 1.2,
+ 0,
+ 1,
+ blendType='easeInOut')
+ self.__intro_sequence = Sequence(
+ camera_interval,
+ Func(self.repos))
+ self.__intro_sequence.start()
def __load_img_btn(self, path, col):
img = OnscreenImage('assets/images/buttons/%s.dds' % path)
#+CATEGORY: pmachines
#+TAGS: bug(b) calendar(c) waiting(w)
-* READY intro animation (from target item to start position)
-* BACKLOG buttons of the scenes enabled sequentially
+* DOING buttons of the scenes enabled sequentially
- [ ] each scene has a version
- [ ] when you win save the id + version
- [ ] put an "update" if id is saved and versions are different
+* BACKLOG make the editor
+- [ ] a level file is a list of lines: classname posx posy posz rotx roty rotz scalex scaley scalez mass
+- [ ] if you press e: cycle menu (edit object under cursor - edit scene - hide menu)
* BACKLOG actions: rewind, prev, next
* BACKLOG teeter-tooter with constraints (real teeter tooter), magnet, road cone, bucket
* BACKLOG (when python 3.11) use toml in place of ini