	task frame{
	obj_f(t_frame,0,0,640,480,cx+96,cy);
	}



	task p_life{
	objset(p_frame,60,0,88,35*(GetPlayerLife-1),cx+223,cy-213);
	}



	task objset(
		let texture,		//元テクスチャ名
		let LX,			//左座標
		let LY,			//上座標
		let RX,			//右座標
		let RY,			//下座標
		let x,			//表示するX座標
		let y			//表示するY座標
	){
	let obj = Obj_Create(OBJ_EFFECT);
	ObjEffect_SetTexture(obj, texture);
	ObjEffect_SetRenderState(obj,ALPHA);
	ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
	ObjEffect_CreateVertex(obj,4);
	ObjEffect_SetLayer(obj,8);
	loop{
	RY=35*(GetPlayerLife-1);
	ObjEffect_SetVertexXY(obj, 0, -(RX-LX)/2,-(RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 1, -(RX-LX)/2, (RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 2,  (RX-LX)/2,-(RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 3,  (RX-LX)/2, (RY-LY)/2);
	ObjEffect_SetVertexUV(obj, 0, LX, LY );
	ObjEffect_SetVertexUV(obj, 1, LX, RY );
	ObjEffect_SetVertexUV(obj, 2, RX, LY );
	ObjEffect_SetVertexUV(obj, 3, RX, RY );
	Obj_SetPosition(obj, x, y+RY/2);
	yield;
	}
	}

	task obj_f(
		let texture,		//元テクスチャ名
		let LX,			//左座標
		let LY,			//上座標
		let RX,			//右座標
		let RY,			//下座標
		let x,			//表示するX座標
		let y			//表示するY座標
	){
	let obj = Obj_Create(OBJ_EFFECT);
	ObjEffect_SetTexture(obj, texture);
	ObjEffect_SetRenderState(obj,ALPHA);
	ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
	ObjEffect_CreateVertex(obj,4);
	ObjEffect_SetLayer(obj,8);
	ObjEffect_SetVertexXY(obj, 0, -(RX-LX)/2,-(RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 1, -(RX-LX)/2, (RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 2,  (RX-LX)/2,-(RY-LY)/2);
	ObjEffect_SetVertexXY(obj, 3,  (RX-LX)/2, (RY-LY)/2);
	ObjEffect_SetVertexUV(obj, 0, LX, LY );
	ObjEffect_SetVertexUV(obj, 1, LX, RY );
	ObjEffect_SetVertexUV(obj, 2, RX, LY );
	ObjEffect_SetVertexUV(obj, 3, RX, RY );
	Obj_SetPosition(obj, x, y);
	}
