What do you mean by connection protocol
Without `scene.clear ()` I can't update the countdown text. How does that work without `scene.clear ()`?__deets__ wrote: ↑
Tue Jan 01, 2019 10:07 amBecause you could introduce a countdown object analogous to a star. And then rename the _stars to _things or something. In the beginning you will only create a countdown object. Its update method is then always called with the elapsed time & modified its text item (or removes it and creates a new one). Of course, scene clear may not be used in this case.
What do you mean by "protocol"?__deets__ wrote: ↑
Tue Jan 01, 2019 10:07 amWhen the countdown is up, remove the object from the list of things and insert the stars. To do this, you may have to expand the protocol a little: Update must return whether the object should continue to live or must be removed. And it must be able to return a new list of objects. So you could return a tuple (True, ) in update.
By "generic" do you mean that the `_update_all ()` method can update both the countdown and the stars?__deets__ wrote: ↑
Tue Jan 01, 2019 10:07 amIn this way you can also do a StarSpawner, for example, which gradually introduces the stars.
The crucial aspect, however, is that the “engine” remains generic.
Why should the method `spawn_stars ()` be in the `countdown` object? I actually viewed the `graphics_window` object as a flow control that created the objects, added them to the list, updated them continuously, etc. Isn't that so?__deets__ wrote: ↑
Tue Jan 01, 2019 22:09Along the way yes, the spawn_stars method should of course give us a countdown object. And usually you collect the objects you want to remove and then do it in one go. In the same way, new ones are only really added at the end & they are only calculated in the next cycle.
@ Sirius3: I implemented your recommendations as well as I could.
Current code (at least the countdown works ):
Code: Select all
- How toxic is beryllium
- Who decides the jersey number of the cricketers
- Who invented long-term evolution
- How did the Kijiji market become so popular
- How is Yamaha F310 for a beginner
- Hinduism respects the atheists
- How are incoming payments calculated
- Lawyers and CPAs are good at business
- Can we change our elective?
- Is a degree necessary for the sport
- How do male rappers address women
- What is RX
- What is the EvoNexus Incubator
- How do I meet Iron Maidens guitarists
- Sergei Lavrov speaks some Armenian
- What nobody admits about life
- What physical properties affect human intelligence
- Are snakes a sign of death
- What is 105 degrees east
- Why is society obsessed with suicide prevention
- What are Powerade bottles made of
- What makes an island uninhabitable?
- Is Nagpur safe for the Kashmiri?
- Are you trying to kill me