"""
misc.py - general misc type class - do not instantiate
"""

import common
import object
import pygame

class Misc(object.Object):

    def __init__(self,owner,rect):
        object.Object.__init__(self,rect,1)
        self.owner = owner

    def kill(self):
        if hasattr(self,'last_rect'):
            r = self.rect
        else: r = self.rect
        self.hide()
        r = self.optimizeDirtyRect(r)
        pygame.display.update(r)
        self.remove()

    #
    # do overwrite these:
    #
    def remove(self):
        pass  # remove misc object from correct list!

