import mwpy_actor

MWPYActor = mwpy_actor.MWPYActor
MWPYGameObject = mwpy_actor.MWPYGameObject
MWPYGameObjectType = mwpy_actor.MWPYGameObjectType
MWPYGameObjectState = mwpy_actor.MWPYGameObjectState




class MWPYMonstr(MWPYActor):
	def __init__(self, gameObjectType = MWPYGameObjectType['MWGOT_MONSTR']):
		MWPYActor.__init__(self, gameObjectType)
		self.is_actor = False
		self.is_monstr = True

	def do_update(self, delta, currenttime, world_dict):
		if self.vel_x < 0:
			self.state = MWPYGameObjectState['AS_LEFT']
			self.vel_x = -self.velocity_factor
		elif self.vel_x >= 0:
			self.state = MWPYGameObjectState['AS_RIGHT']
			self.vel_x = self.velocity_factor
