Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Work_it.h
- // Sol
- //
- // Created by Justin Boisvert on 1/15/12.
- // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
- //
- #include "Scene.h"
- #include <iostream>
- #ifndef Sol_Work_it_h
- #define Sol_Work_it_h
- class Work_it : public Scene {
- Sprite* theMan;
- Layer* mainLayer;
- Color4f myColor;
- float strain;
- bool round;
- public:
- void init(){
- strain = 0.0;
- round = false;
- mainLayer = new Layer();
- addLayer(mainLayer);
- theMan = new Sprite();
- theMan->init("dude.png");
- mainLayer->addRenderable(theMan,false);
- backgroundColor = whiteColorf();
- }
- void deinit(){
- }
- void touchDown(const Vector2& loc){
- strain = loc.y + 0.5;
- }
- void touchMoved(const Vector2& prev, const Vector2& loc){
- strain = loc.y + 0.5;
- }
- void touchUp(const Vector2& loc){
- }
- void accelerated(const Vector3& acceleration){
- }
- void update(){
- Scene::update();
- theMan->setAlpha(strain);
- }
- };
- #endif
Add Comment
Please, Sign In to add comment