Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void beginState2() {
- //movie = new Movie(this, "movie.mp4");
- // movie.play();
- }
- int speed = 0;
- int delayer = 0;
- void updateState2(){
- delayer++;
- // --------------------------------------------
- // Do something with input
- // --------------------------------------------
- //println(delayer);
- //if (delayer > 75){
- if (keyPressed){
- if (key == '1') currentState = 1;
- if (key == '3') currentState = 3;
- }
- // }
- // --------------------------------------------
- // Do something with output
- // --------------------------------------------
- image(movie, 0, 0, width, height);
- textSize(32);
- text("State: " + currentState + " Attraction!", 10, 30);
- text("Press 1,3 to switch to other state", 10, 70);
- background(0, 0, 255);
- //image(mimg, 0, 0);
- speed-=4;
- for(int i = 0;i < camImageArray.length;i++){
- if(camImageArray[i] != null){
- image(camImageArray[i], speed + i * 250, 100,250,200);
- }
- }
- }
- void endState2() {
- movie.stop();
- delayer = 0;
- speed=0;
- }
- // movieEvent needed for play back
- // we could place this also in the main code, but this is the only state with
- // video so I've decided to put it here.
- //void movieEvent(Movie m) {
- // m.read();
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement