Guest User

Untitled

a guest
May 24th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. //
  2. // Work_it.h
  3. // Sol
  4. //
  5. // Created by Justin Boisvert on 1/15/12.
  6. // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
  7. //
  8. #include "Scene.h"
  9. #include <iostream>
  10. #ifndef Sol_Work_it_h
  11. #define Sol_Work_it_h
  12. class Work_it : public Scene {
  13. Sprite* theMan;
  14. Layer* mainLayer;
  15. Color4f myColor;
  16. float strain;
  17. bool round;
  18. public:
  19. void init(){
  20. strain = 0.0;
  21. round = false;
  22. mainLayer = new Layer();
  23. addLayer(mainLayer);
  24. theMan = new Sprite();
  25. theMan->init("dude.png");
  26. mainLayer->addRenderable(theMan,false);
  27. backgroundColor = whiteColorf();
  28.  
  29.  
  30. }
  31. void deinit(){
  32. }
  33. void touchDown(const Vector2& loc){
  34. strain = loc.y + 0.5;
  35. }
  36. void touchMoved(const Vector2& prev, const Vector2& loc){
  37. strain = loc.y + 0.5;
  38. }
  39.  
  40. void touchUp(const Vector2& loc){
  41.  
  42. }
  43.  
  44. void accelerated(const Vector3& acceleration){
  45.  
  46. }
  47.  
  48. void update(){
  49. Scene::update();
  50. theMan->setAlpha(strain);
  51. }
  52. };
  53.  
  54. #endif
Add Comment
Please, Sign In to add comment