TheGeekTechZone Posted November 7, 2015 Share Posted November 7, 2015 function create () { game.physics.startSystem(Phaser.Physics.ARCADE);enemy = game.add.sprite(103, 325, 'enemy', 'idle.png');enemy.name = 'enemy';game.physics.enable(enemy, Phaser.Physics.ARCADE);enemy.scale.setTo(4, 4.3);// scale sprite imageenemy.anchor.setTo(0.5, 0.9);// move sprite image } function bulletHitEnemy (bullet) {bullet.kill();alert("Hello! I am an alert box!!");} function update () { game.physics.arcade.overlap(Bullet, enemy, bulletHitEnemy, null, this); } Quote Link to comment Share on other sites More sharing options...
WombatTurkey Posted November 8, 2015 Share Posted November 8, 2015 We're going to need more code. Where is Bullet being generated from? Quote Link to comment Share on other sites More sharing options...
TheGeekTechZone Posted November 10, 2015 Author Share Posted November 10, 2015 found out the problem it was on bullet Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.