Guest User

Untitled

a guest
Mar 22nd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. var graphics;
  2. var ball;
  3.  
  4. var graphics1;
  5. var ballHome;
  6.  
  7. function create(){
  8. game.physics.startSystem(Phaser.Physics.ARCADE);
  9.  
  10. graphics=game.add.graphics(500,500); //first circle
  11. game.physics.arcade.enable(graphics);
  12. graphics.enableBody=true;
  13. graphics.beginFill(0xFFFFFF,1);
  14. ball=graphics.drawCircle(10,10,15);
  15. graphics.endFill();
  16.  
  17.  
  18. graphics1=game.add.graphics(500,500); //second circle
  19. game.physics.arcade.enable(graphics1);
  20. graphics1.enableBody = true;
  21. graphics1.beginFill(0xFFF55F,1);
  22. ballHome=graphics1.drawCircle(300,300,500);
  23. graphics1.endFill();
  24.  
  25. }
  26.  
  27. function update() {
  28. game.physics.arcade.collide(ball,ballHome);
  29. }
Add Comment
Please, Sign In to add comment