indexing description: "[ An EM_GOOF_MOVABLE that is accelerable. ]" date: "$Date$" revision: "$Revision$" class EM_GOOF_ACCELERABLE inherit EM_GOOF_MOVABLE redefine process, make end create make feature -- Initialization make(img: EM_BITMAP x: DOUBLE y: DOUBLE phs: EM_GOOF_PHYSICS) is -- Make accelerable do create acceleration.make(0,0) Precursor(img,x,y,phs) end feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS, EM_GOOF_FORCE} -- Properties acceleration: EM_VECTOR_2D -- current acceleration feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS} -- Processing process(time_length: DOUBLE) is -- process this object do acceleration.stretch(time_length, time_length) movement.add(acceleration) acceleration := acceleration.zero Precursor(time_length) end invariant -- TODO: Not satisfied when 'premake' is used (e.g. in EM_GOOF_BALL)! -- acceleration_not_void: acceleration /= void end