Show
Ignore:
Timestamp:
07/03/08 15:33:30 (5 months ago)
Author:
suztomo
Message:

lang/actionscript/FPazzle : Implemented rotation for assignment.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/actionscript/FPazzle/trunk/src/net/suztomo/FPazzle/FPiece.as

    r14992 r15097  
    2424                private var idNumber:TextField; 
    2525                private var rotateController:RotateController; 
     26                private var rotateControllers:Array; 
    2627                private var toX:Number, toY:Number; 
    2728 
     
    6566                        addEventListener(MouseEvent.MOUSE_OUT, onOut); 
    6667 
    67                         rotateController = new RotateController(this, p_width, p_height); 
     68                        rotateControllers = new Array(); 
     69                        rotateControllers.push(new RotateController(this, p_width, p_height, 0)); 
     70                        rotateControllers.push(new RotateController(this, p_width, p_height, 1)); 
     71                        rotateControllers.push(new RotateController(this, p_width, p_height, 2)); 
     72                        rotateControllers.push(new RotateController(this, p_width, p_height, 3)); 
    6873                } 
    6974 
     
    183188                public function attachRotateController():void 
    184189                { 
    185                         if (!contains(rotateController)) 
    186                                 addChild(rotateController); 
     190                        for (var i:int; i<rotateControllers.length; i++) { 
     191                                addChild(rotateControllers[i]); 
     192                        } 
    187193                } 
    188194                 
    189195                public function detachRotateController():void 
    190196                { 
    191                         if (contains(rotateController)) 
    192                                 removeChild(rotateController); 
     197                        for (var i:int; i<rotateControllers.length; i++) { 
     198                                if (contains(rotateControllers[i])) removeChild(rotateControllers[i]); 
     199                        } 
    193200                } 
    194201