import plus
import random
from AI import vector3

import Arenas

class Hazard(object):
    def __init__(self, location):
        self.location = location
        

class Spinner(Hazard):
    
    def __init__(self, a_hinge, location = (0, 0, 0)):
        Hazard.__init__(self, location)
        #statuses: 0=waiting, 1=firing
        self.status = 0
        self.hinge = a_hinge
        self.hinge.SetAutoLocks(False, False)
        self.hinge.Lock(True)

        
    def __del__(self):
        plus.removeSound(self.soundHandle)
        

                
    def Spin(self):
        self.hinge.SetPowerSettings(35,150000)
        self.hinge.Lock(False)
        self.hinge.SetDirection(100)
	self.hinge.ApplyTorque(10)



