Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sejong25
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Tear of Sejong
sejong25
Commits
52fb28f4
Commit
52fb28f4
authored
Jul 14, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 호패를 먹으면 이동한 후 쌓임. 현재 콜라이더가 안꺼지는 이슈가 있음
parent
99c6acbb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
ScenesData.js
js/ScenesData.js
+4
-0
WordObject.js
js/WordObject.js
+32
-2
WordSpace.js
js/WordSpace.js
+2
-0
No files found.
js/ScenesData.js
View file @
52fb28f4
...
...
@@ -84,6 +84,10 @@ var gameScene = new Phaser.Class(
{
element
.
attract
();
});
WordSpace
.
nameGroup
.
forEach
(
function
(
element
)
{
element
.
attract
();
})
let
tempNames
=
''
;
WordSpace
.
nameGroup
.
forEach
(
function
(
element
)
{
...
...
js/WordObject.js
View file @
52fb28f4
...
...
@@ -10,6 +10,7 @@ class WordObject
//console.log("wordTyping : " + this.wordTyping + '\n' + "wordGrade : " + this.wordGrade + '\n' + "wordWeight : " + this.wordWeight + '\n');
this
.
wordSpeed
=
0.5
;
this
.
isNameWord
=
isNameWord
;
this
.
collider
=
null
;
}
instantiate
(
scene
,
lenRate
)
...
...
@@ -181,6 +182,13 @@ class NameWord extends WordObject
attract
()
{
if
(
this
.
isActive
)
super
.
attract
();
else
{
this
.
path
.
getPoint
(
this
.
follower
.
t
,
this
.
follower
.
vec
);
this
.
physicsObj
.
setPosition
(
this
.
follower
.
vec
.
x
,
this
.
follower
.
vec
.
y
);
this
.
wordObj
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
this
.
physicsObj
.
angle
=
90
*
this
.
follower
.
t
;
this
.
wordObj
.
angle
=
this
.
physicsObj
.
angle
;
}
}
destroy
()
{
...
...
@@ -188,10 +196,32 @@ class NameWord extends WordObject
WordSpace
.
nameGroup
.
push
(
this
);
this
.
isActive
=
false
;
this
.
physicsObj
.
setVelocity
(
0
,
0
);
this
.
physicsObj
.
setPosition
(
500
+
WordSpace
.
nameGroup
.
length
*
25
,
650
).
setDepth
(
2
);
this
.
physicsObj
.
angle
=
90
;
//this.physicsObj.setPosition(500 + WordSpace.nameGroup.length * 25, 650).setDepth(2);
//this.physicsObj.angle = 90;
this
.
physicsObj
.
setDepth
(
2
);
this
.
wordObj
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
).
setDepth
(
2
);
this
.
wordObj
.
angle
=
90
;
WordSpace
.
gameSceneForTest
.
physics
.
world
.
removeCollider
(
this
.
physicsObj
);
this
.
follower
=
{
t
:
0
,
vec
:
new
Phaser
.
Math
.
Vector2
()
};
this
.
path
=
new
Phaser
.
Curves
.
Spline
([
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
,
(
this
.
physicsObj
.
x
+
500
+
WordSpace
.
nameGroup
.
length
*
25
)
/
2
,
this
.
physicsObj
.
y
-
50
,
500
+
WordSpace
.
nameGroup
.
length
*
25
,
650
]);
WordSpace
.
gameSceneForTest
.
tweens
.
add
({
targets
:
this
.
follower
,
t
:
1
,
ease
:
'
Sine.easeInOut
'
,
duration
:
4000
,
repeat
:
0
});
var
graphics
=
WordSpace
.
gameSceneForTest
.
add
.
graphics
();
graphics
.
lineStyle
(
2
,
0xffffff
,
1
);
this
.
path
.
draw
(
graphics
);
super
.
destroy
();
}
}
js/WordSpace.js
View file @
52fb28f4
...
...
@@ -237,6 +237,8 @@ WordSpace.loadImage = function(scene)
WordSpace
.
gameSceneForTest
=
scene
;
// for test
WordSpace
.
weightTextObjForTest
=
scene
.
add
.
text
(
100
,
75
,
'
뇌의 무게: (현재) 0 / 100 (전체)
'
).
setDepth
(
10
).
setColor
(
'
#000000
'
);
scene
.
load
.
image
(
'
test
'
,
'
assets/placeholder/attackalert1.png
'
)
}
WordSpace
.
generateWord
=
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment