IAT 167 Final: IAT167-Map Example.docx

69 views4 pages

Document Summary

Main. as package import flash. display. sprite; import flash. events. event; public class main extends sprite. // properties go here private var o:int = mapblock. mapblock_road; private var w:int = mapblock. mapblock_grass; private var blocktype:int; private var mwidth:int = mapblock. mapblock_width; private var mheight:int = mapblock. mapblock_height; // the overall size should be 16 columns and 10 rows public static const map_rows :int = 10; public static const map_columns:int = 16; // make an array to hold the pattern private var maparray:array = [w, w, w, w, w, w, w, w, w, w, w, w, w, w, w, w, W, w, w, w, w, w, w, w, w, w, w, w, w, w, w, w]; Map. as package import flash. display. movieclip; import flash. geom. rectangle; public class mapblock extends movieclip. // size of the block in pixels public static const mapblock_width:int = 25; public static const mapblock_height:int = 25; // color of block in hex code public static const road_color:number = 0xe8e7b0; public static const grass_color:number = 0x038960;

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents

Related Questions