Permalink
Browse files

rename

  • Loading branch information...
1 parent 15ed256 commit 817b58c06a1d1cb369f26ec633dd58146f7325fe Juha Paananen committed Aug 29, 2011
Showing with 6 additions and 6 deletions.
  1. +2 −2 5.js
  2. +4 −4 6.js
View
@@ -2,6 +2,6 @@ $(function() {
var startPos = new Vector2D(50, 50)
var controller = GameController(startPos)
var raphael = Raphael(document.getElementById('arena'), 200, 200);
- var man = raphael.image("images/man-left-1.png", startPos.x, startPos.y, 40, 40)
- controller.position.Subscribe(function (pos) { man.attr({x : pos.x, y : pos.y}) })
+ var player = raphael.image("images/man-left-1.png", startPos.x, startPos.y, 40, 40)
+ controller.position.Subscribe(function (pos) { player.attr({x : pos.x, y : pos.y}) })
})
View
@@ -2,17 +2,17 @@ $(function() {
var startPos = Point(50, 50)
var controller = GameController(startPos)
var r = Raphael(document.getElementById('arena'), 200, 200);
- var man = r.image("images/man-left-1.png", startPos.x, startPos.y, 40, 40)
- controller.position.Subscribe(function (pos) { man.attr({x : pos.x, y : pos.y}) })
+ var player = r.image("images/man-left-1.png", startPos.x, startPos.y, 40, 40)
+ controller.position.Subscribe(function (pos) { player.attr({x : pos.x, y : pos.y}) })
var animation = controller.position
.Scan(1, function(prev, _) { return prev % 2 + 1})
animation.Subscribe(function (index) {
- man.attr({src : "images/man-left-" + index + ".png"})})
+ player.attr({src : "images/man-left-" + index + ".png"})})
var angle = controller.direction
.Where(id)
.Select(function(vec) { return vec.getAngleDeg()})
- angle.Subscribe(function(angle) { man.rotate(angle + 180, true) })
+ angle.Subscribe(function(angle) { player.rotate(angle + 180, true) })
})

0 comments on commit 817b58c

Please sign in to comment.