Difference between revisions of "Script Classes for Adventure Games/Feature Class"

From SCI Wiki
Jump to navigationJump to search
 
(16 intermediate revisions by the same user not shown)
Line 55: Line 55:
 
===<br /> Properties ===
 
===<br /> Properties ===
  
{|
+
<blockquote>
|width= "125" align= "center"|x
+
====x<br />y<br />z====  
|-
+
 
|align= "center"|y
+
The position on the screen.
|-
 
|align= "center"|z ||The position on the screen.
 
|}
 
  
<blockquote>
 
 
The x property should be set to the x coordinate of the object on the screen. The y property should be set to the y coordinate of the objects projection onto the ground if it is elevated, otherwise it's y coordinate on the screen. If the object is elevated above the ground then the amount of elevation should be placed in the z property.
 
The x property should be set to the x coordinate of the object on the screen. The y property should be set to the y coordinate of the objects projection onto the ground if it is elevated, otherwise it's y coordinate on the screen. If the object is elevated above the ground then the amount of elevation should be placed in the z property.
 
</blockquote>
 
</blockquote>

Latest revision as of 23:54, 20 January 2016

Official SCI Documentation

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Index


The Feature Class

Author: Jeff Stephenson

Date: 5 April 1988

 


The Feature Class

The Feature class is simply a location on the the screen that has . handleEvent method. This is used when an object that should have . response to events is drawn into the picture. If the global variable useSortedFeatures is TRUE all elements of the cast and features will receive the event in the order of their proximity to ego.

In file: actor.sc
Inherits from: Object
Inherited by: View
PicView


Properties

x
y
z

The position on the screen.

The x property should be set to the x coordinate of the object on the screen. The y property should be set to the y coordinate of the objects projection onto the ground if it is elevated, otherwise it's y coordinate on the screen. If the object is elevated above the ground then the amount of elevation should be placed in the z property.


Methods


handleEvent:event

All elements of the EventHandler features receive the handleEvent message. If the feature is to receive events it should be added to the current rooms features list via the rooms setFeatures method. (i.e.) (curRoom setFeature:myFeature) This is generally done in the init method of a room. If the global variable useSortedFeatures is TRUE all elements of the features list and the cast will receive the handleEvent message in the order of their proximity to ego.

 

Notes


 

Table of Contents

 

< Previous: The Timer Class Next: The View Class >