from Thing import *
from Texture import *

class Switch(Thing):
    upTex = None
    downTex = None
    
    def __init__(self):
        self.flipped = 0
        if not Switch.upTex:
            Switch.upTex = Texture("switchUp")
        if not Switch.downTex:
            Switch.downTex = Texture("switchDown")
        
        self.width = 24
        self.height = 24
        self.texture = Switch.upTex

    def flip(self):
        self.flipped = 1
        self.texture = Switch.downTex

    def draw(self):
        self.texture.draw(pos=(self.x,self.y), width=self.width, height=self.height)