Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package  {
  2.    
  3.     import flash.display.Sprite;
  4.    
  5.     public class Block extends MovieClip {
  6.  
  7.         var walkable:Boolean;
  8.         var interactive:Boolean;
  9.         var frame:uint;
  10.        
  11.         public function Block(_walkable:Boolean, _interactive:Boolean, _frame:uint) {
  12.             walkable = _walkable;
  13.             interactive = _interactive;
  14.             frame = _frame;
  15.             this.gotoAndStop (frame);
  16.         }
  17.        
  18.         public function Block () {
  19.             //Default Constructor:
  20.             walkable = true;
  21.             interactive = false;
  22.             frame = 1;
  23.             this.gotoAndStop (frame);
  24.         }
  25.        
  26.         public function setFrame (_frame:unit):void {
  27.             frame = _frame;
  28.             this.gotoAndStop (frame);
  29.         }
  30.        
  31.         public function getFrame ():uint {
  32.             return frame;
  33.         }
  34.        
  35.         public function setWalkable (_walkable:Boolean):void {
  36.             walkable = _walkable;
  37.         }
  38.        
  39.         public function getWalkable():Boolean {
  40.             return walkable;
  41.         }
  42.        
  43.         public function setInteractive (_interactive:Boolean):void {
  44.             interactive = _interactive;
  45.         }
  46.        
  47.         public function getInteractive ():void {
  48.             return interactive;
  49.         }
  50.  
  51.     }
  52.    
  53. }
Add Comment
Please, Sign In to add comment