% File "referesh.tu". % % Written by Phil Edmonds, April 97. % % Refresher is a kind of active object that redraws all other active objects % on the screen at a specified interval. This is necessary because some objects % draw over others. % %+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ unit class Refresher inherit ActiveObject in "active.tu" export InitRefresher %========== INITIALIZE ====================================== %============================================================ % the x,y coords. and colour have no meaning % proc InitRefresher (n : string, freq : int) InitActiveObject (0, 0, n, 0, freq) end InitRefresher %========== PUBLIC FUNCTIONS ================================ %============================================================ body proc DrawImage % does not have an image end DrawImage % creates a new carnivore, then determines when next one should % be created %------------------------------------------------------------ body proc TakeTurn world -> DrawAllDenizens world -> Schedule (self, frequency) end TakeTurn end Refresher