Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var graphics;
- var ball;
- var graphics1;
- var ballHome;
- function create(){
- game.physics.startSystem(Phaser.Physics.ARCADE);
- graphics=game.add.graphics(500,500); //first circle
- game.physics.arcade.enable(graphics);
- graphics.enableBody=true;
- graphics.beginFill(0xFFFFFF,1);
- ball=graphics.drawCircle(10,10,15);
- graphics.endFill();
- graphics1=game.add.graphics(500,500); //second circle
- game.physics.arcade.enable(graphics1);
- graphics1.enableBody = true;
- graphics1.beginFill(0xFFF55F,1);
- ballHome=graphics1.drawCircle(300,300,500);
- graphics1.endFill();
- }
- function update() {
- game.physics.arcade.collide(ball,ballHome);
- }
Add Comment
Please, Sign In to add comment