Guest User

Untitled

a guest
Jan 17th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.87 KB | None | 0 0
  1. /////waves layered ontop and move independently first one has no transparencey second one goes on top of first and does have transparencey
  2.     let path1 = current ~ "img/background4.png";//has no transparency the bottom layer
  3.     let obj1 = ObjPrim_Create(OBJ_SPRITE_2D);
  4.     Obj_SetRenderPriority(obj1, 0.22);
  5.     ObjPrim_SetTexture(obj1, path1);
  6.     ObjSprite2D_SetSourceRect(obj1, 50, 50, 205, 205);
  7.     ObjSprite2D_SetDestRect(obj1, 0, 0, 384, 448);
  8.     //ObjRender_SetBlendType(obj1, BLEND_ALPHA);
  9.  
  10.     let path2 = current ~ "img/new_background1.png";//has transparencey 1 above the bottom
  11.     let obj2 = ObjPrim_Create(OBJ_SPRITE_2D);
  12.     Obj_SetRenderPriority(obj2, 0.23);
  13.     ObjPrim_SetTexture(obj2, path2);
  14.     ObjSprite2D_SetSourceRect(obj2, 50, 50, 205, 205);
  15.     ObjSprite2D_SetDestRect(obj2, 0, 0, 384, 448);
  16.     //ObjRender_SetBlendType(obj2, BLEND_ALPHA);
  17.     ////waves
  18.     let hold="hold";
  19.         CreateRenderTarget(hold);//how does this thing even work
  20.         RenderToTextureA1(hold,0.20,0.24,false);
  21.        
  22.     let path3 = current ~ "img/background1a.png";//floral pattern the flowers them selves are supposed to give way to the next img. will scroll
  23.     let obj3 = ObjPrim_Create(OBJ_SPRITE_2D);
  24.     ObjRender_SetBlendType(obj3, BLEND_ALPHA);
  25.     Obj_SetRenderPriority(obj3, 0.26);
  26.     ObjPrim_SetTexture(obj3, path3);
  27.     //ObjPrim_SetTexture(obj3, hold);
  28.     ObjSprite2D_SetSourceRect(obj3, 63.75, 63.75, 191.25, 191.25);
  29.     ObjSprite2D_SetDestRect(obj3, 0, 0, 384, 448);
  30.     ObjRender_SetBlendType(obj3, BLEND_SUBTRACT);
  31.    
  32.     //Obj_SetVisible(obj3,false);
  33.     CreateRenderTarget(obj3);//still no clue
  34.     RenderToTextureA1(obj3,0.20,0.23,true);
  35.    
  36.     let path4 = current ~ "img/background2.png";//supposed to be seen through the flowers
  37.     let obj4 = ObjPrim_Create(OBJ_SPRITE_2D);
  38.     Obj_SetRenderPriority(obj4, 0.25);
  39.     ObjPrim_SetTexture(obj4, path4);
  40.     ObjSprite2D_SetSourceRect(obj4, 0, 0, 255, 255);
  41.     ObjSprite2D_SetDestRect(obj4, 0, 0, 384, 448);
Add Comment
Please, Sign In to add comment