Created
June 4, 2014 15:43
-
-
Save wemakeweb/a1c609d3dee5d3beedb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Biene{ | |
int x; | |
int y; | |
int end_x; | |
int end_y; | |
int dx; | |
int dy; | |
boolean flying = true; | |
Biene( int sx, int sy, int ex, int ey){ | |
x = sx; | |
y = sy; | |
end_x = ex; | |
end_y = ey; | |
dx = end_x - start_x; | |
dy = end_y - start_y; | |
} | |
void update(){ | |
if( flying ){ | |
// Biene trifft Blume | |
if( x === end_x && y == end_y ){ | |
flying = false; | |
} else { | |
x += dx; | |
y += dy; | |
} | |
} else { | |
//wait | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment