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

em.goof.object

Class EM_GOOF_OBJECT


Known direct descendants

EM_GOOF_COLLIDABLE, EM_GOOF_MOVABLE, EM_GOOF_DESTRUCTABLE, EM_GOOF_OBSTACLE, EM_GOOF_CONTAINER, EM_GOOF_ROTATABLE

Creation

Features

Invariants

indexing

description

EM_GOOF_OBJECT is the root object for EM_GOOF.

date

$Date: 2005/10/23 09:48:58 $

revision

$Revision: 1.12 $

class

EM_GOOF_OBJECT

create

make (img: EM_DRAWABLE x: DOUBLE y: DOUBLE phs: EM_GOOF_PHYSICS)

-- Make goof_object

require
image_not_void: img /= void
phs_not_void: phs /= void

feature -- Initialization

make (img: EM_DRAWABLE x: DOUBLE y: DOUBLE phs: EM_GOOF_PHYSICS)

-- Make goof_object

require
image_not_void: img /= void
phs_not_void: phs /= void
premake

-- Premake 'rotatable'
-- Must be followed by a real 'make' (or 'make_multiple_picture' in case of rotatable)

feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS} -- Drawing

draw (screen: EM_VIDEO_SURFACE at: EM_VECTOR_2D at_angle: DOUBLE)

-- Draw object

require
not_premade: not premade
is_screen: screen /= void

feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS} -- Processing

process (time_length: DOUBLE)

-- Process this object

require
not_premade: not premade

feature {EM_GOOF_LEVEL_SCENE, EM_GOOF_OBJECT, EM_GOOF_PHYSICS, EM_GOOF_FORCE, EM_GOOF_LOADER_NODE_PROCESSOR} -- Properties

image: EM_DRAWABLE

-- Image of this object

image_position: EM_VECTOR_2D

-- Image positiion correcture (typically= -height/2, -width/2)

physics: EM_GOOF_PHYSICS

-- Physics 'parent'

position: EM_VECTOR_2D

-- Current position

premade: BOOLEAN

-- Is this 'object' premade and not yet really made

visible: BOOLEAN

-- Is this object visible?

invariant

has_image: premade or image /= void
has_position: premade or position /= void

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

end