java - Rotate effect adding image group (libgdx) -
public void filltablevaluegrid(int[] arr) { grp = new group(); grp.setheight(assetshelper.convertheight(4*187)); grp.setwidth(assetshelper.convertwidth(124)); grp.setposition(680, assetshelper.convertheight(180)); for(int i=0;i<arr.length;i++) { actualpiecearray[i]=imagespiecearray2[set1array[i]]; imagesanswerarray[arr[i]].setvisible(false); actualintarray[i]=arr[i]; } actualpiecearray[0].setposition(assetshelper.convertwidth(0), assetshelper.convertheight(100)); grp.addactor(actualpiecearray[0]); for(int i=1;i<9;i++) { actualpiecearray[i].setposition(assetshelper.convertwidth(0), actualpiecearray[i-1].gety()- actualpiecearray[i-1].getheight()); grp.addactor(actualpiecearray[i]); //system.out.println("trace herer :::"+ grp.gety()); } stage.addactor(grp); mask=new image(assetshelper.mask); mask.setposition(assetshelper.convertwidth(656/2),assetshelper.convertheight((552)/2)); mask1=new image(assetshelper.mask1); mask1.setposition(assetshelper.convertwidth(656/2),0); stage.addactor(mask); stage.addactor(mask1); arrowuper = new image(assetshelper.arrowup); arrowuper.setposition(assetshelper.convertwidth(368),assetshelper.convertheight(280)); stage.addactor(arrowuper); //imagecliked(arrowuper); arrowdowner = new image(assetshelper.arrowdown); arrowdowner.setposition(assetshelper.convertwidth(368),assetshelper.convertheight(14)); stage.addactor(arrowdowner); imagecliked1(arrowdowner); imagecliked(arrowuper); } public void imagecliked(actor actor) { actor.addlistener(new inputlistener() { public boolean touchdown (inputevent event, float x, float y, int pointer, int button) { grp.addaction(actions.sequence( actions.fadeout(0), actions.parallel( actions.fadein(1.0f), actions.moveto(grp.getx(), grp.gety()+assetshelper.convertheight(100/2))))); counter--; enableanddisable(counter); system.out.println("please imageclikeds counter grp.gety() :::"+counter+ grp.gety()); return true; } public void touchup (inputevent event, float x, float y, int pointer, int button) { // return false; } }); } added brief code,where filltablevaluegrid used add images , imageclicked used moving up/down.i new java libgdx;i want rotating effect of group,when clicked down button after last image;first image should come.can resolve .
Comments
Post a Comment