Advertisement
nordlaender

thick arrows vs thin arrows

Mar 15th, 2013
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(window).load ->
  2.     game.init()
  3.    
  4.  
  5. game=
  6.     gameObjects:[]
  7.     init: ->
  8.         canvas= document.getElementById("Canvas")
  9.         alert(canvas)
  10.         @stage= new createjs.Stage(canvas)
  11.         alert(@stage)
  12.        
  13.         @testshape= new createjs.Shape()
  14.         @testshape.graphics.beginFill("#555")
  15.         @testshape.graphics.rect(50,50,500,500)
  16.        
  17.         @stage.addChild(@testshape)
  18.         @stage.update()
  19.        
  20.         window.onmousedown= (ev)=>
  21.             alert "click"
  22.             mx=ev.screenX
  23.             my=ev.screenY
  24.             @spawn({x:mx,y:my})
  25.            
  26.     spawn: (data)=>
  27.         alert("rpcspawn")
  28.         x=data.x
  29.         y=data.y
  30.         alert(" "+x+" "+y)
  31.         alert(@stage)
  32.        
  33.         shape = new createjs.Shape()
  34.         alert(shape)
  35.         shape.graphics.beginFill("#555")
  36.         shape.graphics.circle(x,y,5)
  37.         @stage.addChild(shape)
  38.         alert(@stage)
  39.         @stage.update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement