import mwpy_gameobject

MWPYGameObject = mwpy_gameobject.MWPYGameObject
MWPYGameObjectType = mwpy_gameobject.MWPYGameObjectType
MWPYGameObjectState = mwpy_gameobject.MWPYGameObjectState


class MWPYFunnel(MWPYGameObject):
	def __init__(self, gameObjectType = MWPYGameObjectType['MWGOT_FUNNEL']):
		MWPYGameObject.__init__(self, gameObjectType)
		self.state = MWPYGameObjectState['AS_NONE']
		self.velocity_factor = 0.01
		self.force_y = 100.0

	def do_update(self, delta, currenttime, world_dict):
		if self.vel_x >= 0:
			self.vel_x =  self.velocity_factor
		else:
			self.vel_x =  -self.velocity_factor
		self.vel_y = 0
		return
