Skip to content

Commit

Permalink
statt head.x = bla head.reset
Browse files Browse the repository at this point in the history
  • Loading branch information
thebluber authored and rogerbraun committed Apr 12, 2012
1 parent e0a49e0 commit 4f8fa1b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Snake.as
Expand Up @@ -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;
Expand Down Expand Up @@ -80,18 +79,16 @@ 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;
} else {
part.x = _body.members[i - 1].x;
part.y = _body.members[i - 1].y;
}
}
}

var xSpeed:int = 0;
Expand Down

0 comments on commit 4f8fa1b

Please sign in to comment.