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

em.goof.object

Class EM_GOOF_CONTAINER


Direct ancestors

EM_GOOF_OBJECT

Known direct descendants

EM_GOOF_XY_TRANSPORT

Features

Invariants

indexing

description

An container for EM_GOOF_OBJECT.

date

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

revision

$Revision: 1.8 $

class

EM_GOOF_CONTAINER

inherit

EM_GOOF_OBJECT

feature -- Initialization

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

-- Make container

-- (From EM_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)

-- (From EM_GOOF_OBJECT)

feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS} -- Drawing

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

-- Draw object (with contained objects)

-- (From EM_GOOF_OBJECT)

require
not_premade: not premade
is_screen: screen /= void

feature -- Operation

add_item (a_item: EM_GOOF_OBJECT)

-- Add 'a_item' to this container

require
a_item_not_void: a_item /= void
ensure
item_added: items.has(a_item)

feature {EM_GOOF_OBJECT, EM_GOOF_PHYSICS} -- Processing

process (time_length: DOUBLE)

-- process this object

-- (From EM_GOOF_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

-- (From EM_GOOF_OBJECT)

image_position: EM_VECTOR_2D

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

-- (From EM_GOOF_OBJECT)

items: DS_LINKED_LIST[EM_GOOF_OBJECT]

-- Contained objects

physics: EM_GOOF_PHYSICS

-- Physics 'parent'

-- (From EM_GOOF_OBJECT)

position: EM_VECTOR_2D

-- Current position

-- (From EM_GOOF_OBJECT)

premade: BOOLEAN

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

-- (From EM_GOOF_OBJECT)

visible: BOOLEAN

-- Is this object visible?

-- (From EM_GOOF_OBJECT)

invariant

items_not_void: items /= void

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