Commit 79aa0c70 authored by 18신대성's avatar 18신대성

Word -> WordObject로 클래스명, 파일명 변경

parent b0014b67
......@@ -5,7 +5,7 @@
<script src="script/phaser.js"></script>
<script src="script/Background.js"></script>
<script src="script/WordSpace.js"></script>
<script src="script/Word.js"></script>
<script src="script/WordObject.js"></script>
</head>
<body>
<script src="script/Main.js"></script>
......
class Word
class WordObject
{
constructor(text)
{
......@@ -21,19 +21,3 @@ class Word
this.wordObj.setPosition(this.physicsObj.x, this.physicsObj.y);
}
}
\ No newline at end of file
/*
function Word()
{
this.wordText = '임시텍스트';
}
Word.prototype.generate = function(scene)
{
myText = scene.add.text(400,300, this.wordText, {fontFamily: '"궁서", 궁서체, serif'}).setBackgroundColor('#FF00FF');
}
Word.prototype.delete = function()
{
}*/
\ No newline at end of file
......@@ -38,7 +38,7 @@ function create()
delay: 2000,
callback: function()
{
word = new Word("솽젠커");
word = new WordObject("솽젠커");
word.generate(this);
WordSpace.wordGroup.push(word);
this.physics.add.collider(word.physicsObj, WordSpace.wordPhysicsGroup);
......@@ -54,6 +54,6 @@ function update()
{
for(i = 0; i < WordSpace.wordGroup.length; i++)
{
WordSpace.wordGroup[i].attract(0.5);
WordSpace.wordGroup[i].attract(0.3);
}
}
\ No newline at end of file
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