Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

statt head.x = bla head.reset

  • Loading branch information...
commit 4f8fa1be42d811e93bf80eb45c1bae8c5c192fcc 1 parent e0a49e0
@thebluber thebluber authored committed
Showing with 2 additions and 5 deletions.
  1. +2 −5 Snake.as
View
7 Snake.as
@@ -35,8 +35,7 @@ package {
private function resurrect():void {
_body.clear();
- _head.x = 160;
- _head.y = 160;
+ _head.reset(160, 160);
_head.facing = FlxObject.RIGHT;
fillBody(_body);
_mps = 8;
@@ -80,10 +79,9 @@ package {
_newPart = null;
}
- for(var i:int = _body.members.length - 1 ; i >= 0; i--){
+ for(var i:int = _body.length - 1 ; i >= 0; i--){
var part:FlxSprite;
part = _body.members[i];
- if(part) {
if(i == 0){
part.x = _head.x;
part.y = _head.y;
@@ -91,7 +89,6 @@ package {
part.x = _body.members[i - 1].x;
part.y = _body.members[i - 1].y;
}
- }
}
var xSpeed:int = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.