previous chapter contents page top page next chapter

ShadowCoupon

Inherits from Coupon
encodes empty field list;

Class Description

Class ShadowCoupon is a subclass of Coupon that allows the user to change the shadow of an object. Objects of this class work by calling SetShadow on the coupon's target.

Programming information

Instantiate: rarely
Subclass: rarely
Call its methods: never

You might instantiate objects of this class if you wanted to create your own shadow coupons, and you might create subclasses if you wanted to create a coupon for a specialized kind of shadow.

Methods defined by class ShadowCoupon

Class ShadowCoupon defines the following methods:

Method Description
ApplyCoupon Overridden to set the target's shadow with SetShadow.
Draw Overridden to show shadow in coupon instead of text.

Fields defined by class ShadowCoupon

Class ShadowCoupon defines no fields.

Method Descriptions

ApplyCoupon

overrides ApplyCoupon

Call: rarely
Override: sometimes

Magic Cap calls ApplyCoupon when the user drops a coupon into a viewable object. ApplyCoupon should perform the action represented by the coupon. ShadowCoupon_ApplyCoupon sets the target's shadow by calling SetShadow.

Draw

overrides Draw

Call: rarely
Override: sometimes

Magic Cap calls Draw to draw the coupon on the screen. ShadowCoupon_Draw draws the coupon with an image that indicates what the target's shadow will look like when the coupon is applied.

See Viewable_Draw for more information.