Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

em.video.animation

Class EM_NORMALIZED_SPEED


Direct ancestors

EM_TIME_SINGLETON

Features

Invariants

indexing

description

Let yout EM_DRAWABLE inherit from this class so that you can
set it's movement to a constant speed.
The movement is not influenced by the framerate.

date

$Date: 2005/10/23 10:46:16 $

revision

$Revision: 1.4 $

class

EM_NORMALIZED_SPEED

inherit

EM_TIME_SINGLETON

feature -- Access

time: EM_TIME

-- Returns reference to the singleton

-- (From EM_TIME_SINGLETON)

ensure
time_not_void: Result /= Void

feature -- status

get_delta: INTEGER

-- Distance Current has to move to reflect speed

set_speed (a_speed: INTEGER)

-- Set speed to a_speed.

ensure
speed_set: speed = a_speed
speed: INTEGER

-- Speed in distance (i.e. pixels) per second.

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end