Commit 39240161 authored by 18손재민's avatar 18손재민

이제 공격시 던지는 종이가 뇌 뒤로 지나감

parent df16a77d
......@@ -13,7 +13,8 @@ BackGround.otherCharacters = [];
BackGround.loadImage = function(scene)
{
scene.load.image('brainGround', 'assets/image/background/background_brain.png');
scene.load.image('brain', 'assets/image/background/brain.png');
scene.load.image('gameBackground', 'assets/image/background/background_brain.png');
scene.load.image('menuBackground', 'assets/placeholder/menuBackground.png');
scene.load.image('roomBackground', 'assets/placeholder/roomBackground.png');
}
......@@ -35,9 +36,11 @@ BackGround.drawCharacter = function(scene)
});
}
BackGround.gameBackground = null;
BackGround.drawBrain = function(scene)
{
brains = scene.add.sprite(game.config.width / 2, game.config.height / 2, 'brainGround').setDisplaySize(game.config.width, game.config.height).setDepth(1);
BackGround.gameBackground = scene.add.sprite(game.config.width / 2, game.config.height / 2, 'gameBackground').setDisplaySize(game.config.width, game.config.height).setDepth(1);
}
BackGround.drawMenu = function(scene)
......
......@@ -465,6 +465,7 @@ WordSpace.attack = function(wordText, grade)
WordSpace.makeAttackPaper = function(scene, attackFrom, attackTo)
{
var attackPaper = scene.add.sprite(attackFrom.x, attackFrom.y, 'attackPapaer').setScale(0.5).setDepth(3);
attackPaper.mask = new Phaser.Display.Masks.BitmapMask(scene, BackGround.gameBackground);
attackPaper.throwTarget = attackTo;
attackPaper.follower = { t: 0, vec: new Phaser.Math.Vector2() };
attackPaper.path = new Phaser.Curves.Spline([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment