RuntimeClass Sample #CustomDataStructure

by 9re
♥0 | Line 26 | Modified 2009-09-16 01:40:06 | MIT License
play

ActionScript3 source code

/**
 * Copyright 9re ( http://wonderfl.net/user/9re )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/rPr2
 */

package  
{
    import Box2D.Common.Math.b2Vec2;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.geom.Rectangle;
    public class Runtime_Sample_CustomDataStructure extends Sprite
    {
        public function Runtime_Sample_CustomDataStructure() 
        {
            trace("version 0");
        }
        
        public function drawBitmap($bitmap:BitmapData, $rect:Rectangle, $color:uint):void {
            $bitmap.fillRect($rect, $color);
        }
        
        public function getRectangle():Rectangle {
            return new Rectangle(100, 20, 20, 20);
        }
        
        public function getColor():uint {
            return 0xff0000ff;
        }
        
        public function getVector():b2Vec2 {
            return new b2Vec2(100, 20);
        }
    }
    
}

Forked