-
-
Save drakeirving/1f0ea18bcd28fcfa044c to your computer and use it in GitHub Desktop.
Blur Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#TouhouDanmakufu | |
#ScriptVersion[3] | |
#Title["blur test"] | |
@Initialize{ | |
Init(); | |
TMain(); | |
} | |
@MainLoop{ yield; } | |
@Event{ | |
alternative(GetEventType()) | |
case(EV_REQUEST_LIFE){ | |
SetScriptResult(1); | |
} | |
} | |
let dir = GetCurrentScriptDirectory(); | |
let test = dir~"blurtest.png"; | |
let obj; | |
function Init(){ | |
obj = ObjEnemy_Create(OBJ_ENEMY_BOSS); | |
ObjEnemy_Regist(obj); | |
} | |
task TMain(){ | |
ObjPrim_SetTexture(obj, test); | |
ObjSprite2D_SetSourceRect(obj, 0, 0, 64, 80); | |
ObjSprite2D_SetDestRect(obj, 0, 0, 64, 80); | |
loop(30){yield;} | |
//BlurPosition(0.5, 0); | |
BlurMove(0.5, 135); | |
} | |
function BlurPosition(left, top){ | |
ObjMove_SetPosition(obj, left, top); | |
//ObjSprite2D_SetDestRect(obj, left, top, 64+left, 80+top); | |
} | |
task BlurMove(speed, angle){ | |
ObjMove_SetSpeed(obj, speed); | |
ObjMove_SetAngle(obj, angle); | |
loop{ | |
// fix at (0,0) | |
ObjSprite2D_SetDestRect(obj, -ObjMove_GetX(obj), -ObjMove_GetY(obj), -ObjMove_GetX(obj)+64, -ObjMove_GetY(obj)+80); | |
yield; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment