The minigame's idea is that there is a gauge and mark on it that moves back and forth while button isn't pressed. When it's pressed mark stops and check the conditionals. If mark is on scale's center the player win.
I have questions:
1. Does UDD accept other methods besides __init__, render and event?
Code: Select all
class Displayable(renpy.Displayable):
def __init__(self, child):
super(Displayable, self).__init__()
self.child = renpy.displayable(child)
self.width = 0
self.height = 0
def render(self, width, height, st, at):
t=Transform(child=self.child)
child_render = renpy.Render(t,width,height,st,at)
self.width, self.height = child_render.get_size()
render = renpy.Render(self.width,self.height)
render.blit(child_render, (0,0))
return render
class Mark(Displayable):
def __init__(self, child):
super(Displayable, self).__init__()
self.child = renpy.displayable(child)
self.width = 0
self.height = 0
self.s = [i for i in range(-25,26)]
def render(self, width, height, st, at):
t=Transform(child=self.child)
child_render = renpy.render(t,width,height,st,at)
self.width, self.height = child_render.get_size()
render = renpy.Render(self.width,self.height)
render.blit(child_render, (0,0))
return render
def move(self):
while yalign < 0.5:
yalign +=0.05
Code: Select all
add Mark("mark/mark.png"):
xalign 0.5
yalign 0.15
P.S. If it's still doable on screens (which I doubt), please, let me know.