SeqLock
ただ順番に外れていく それだけ
forkでもして勝手に弄ってください
(-1,0,1,2,3,4,5,6,7,8,9,10,11)
(-1,10,0,10,2,10,4,10,6,10,8,10)
/**
* Copyright phi16 ( http://wonderfl.net/user/phi16 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/iOul
*/
// forked from phi16's Template
package {
import flash.accessibility.Accessibility;
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
public class Tp extends Sprite {
public var spr:Sprite=new Sprite();
public var bs:Array=new Array();
public var to:Array=new Array(-1,0,1,2,3,4,5,6,7,8,9,10,11); // ここを変えると挙動が変わる
public function Tp(){
this.addChild(spr);
this.addEventListener(Event.ENTER_FRAME,frame);
for(var i:int=0;i<12;i++){
bs[i]=new Number(0);
}
}
public function frame(e:Event):void{
spr.graphics.clear();
spr.graphics.beginFill(0x000000);
spr.graphics.drawRect(0,0,465,465);
spr.graphics.endFill();
spr.graphics.lineStyle(0,0xffffff);
var px:Number=0,py:Number=0;
for(var i:int=0;i<12;i++){
if(i%2){
spr.graphics.drawRect(px+20-5,py+20-5,bs[i]+10,10);
px+=bs[i];
}else{
spr.graphics.drawRect(px+20-5,py+20-5,10,bs[i]+10);
py+=bs[i];
}
if(to[i]<0 || bs[to[i]] > 69.9){
bs[i]+=(70-bs[i])/2;
}
}
}
}
}