adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] User interface open items


From: StyxD
Subject: Re: [Adonthell-devel] User interface open items
Date: Thu, 9 Feb 2012 01:34:28 +0100

Ok, a little update.

I'm having some more issues with the event architecture. I can't
decide whether I should change my approach or if it's worthy to extend
the event module.

My original idea was as follows: there would be two time events for
every speech bubble. One that would fire periodically and update the
bubble's position on screen (so that it would stay above the speaker
if the player moves) and another, that would close the bubble and
unregister the first event.

The problem I'm hitting now is that the python version of the listener
requires to instantiate a new object on every event occurrence, and
I'd like to pass an existing object (the bubble object remembers its
position and would have an update_position() method to move itself). I
could probably have the moving done by another object (or have an
object that just calls the bubble's update method), but I wonder if it
wouldn't be simpler to make a modified type of python listener for
similar cases, if more stuff is going to be moved to python.

Of course, those bubble events won't need any kind of persistence.

I also wonder, whether there should be some kind of character action
event. Like "on character's movement" or "character reached point x,y
on map". Or is it handled by schedules?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]