Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package {
- import flash.display.Sprite;
- public class Block extends MovieClip {
- var walkable:Boolean;
- var interactive:Boolean;
- var frame:uint;
- public function Block(_walkable:Boolean, _interactive:Boolean, _frame:uint) {
- walkable = _walkable;
- interactive = _interactive;
- frame = _frame;
- this.gotoAndStop (frame);
- }
- public function Block () {
- //Default Constructor:
- walkable = true;
- interactive = false;
- frame = 1;
- this.gotoAndStop (frame);
- }
- public function setFrame (_frame:unit):void {
- frame = _frame;
- this.gotoAndStop (frame);
- }
- public function getFrame ():uint {
- return frame;
- }
- public function setWalkable (_walkable:Boolean):void {
- walkable = _walkable;
- }
- public function getWalkable():Boolean {
- return walkable;
- }
- public function setInteractive (_interactive:Boolean):void {
- interactive = _interactive;
- }
- public function getInteractive ():void {
- return interactive;
- }
- }
- }
Add Comment
Please, Sign In to add comment