Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
man-in-the-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MIM
man-in-the-mirror
Commits
fc192fef
Commit
fc192fef
authored
Jul 30, 2019
by
18신대성
Committed by
18손재민
Jul 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
코멘트 생기는거 WIP
이제 맵숫자 1부터 시작
parent
a6dcfb84
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
57 additions
and
5 deletions
+57
-5
stage1.json
Assets/Resources/Stages/stage1.json
+1
-1
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+1
-0
MapManager.cs
Assets/Scripts/Managers/MapManager.cs
+5
-0
Map.cs
Assets/Scripts/Map/Map.cs
+3
-1
MapEditor.cs
Assets/Scripts/MapEditor.cs
+1
-0
StageSelector.cs
Assets/Scripts/StageSelector.cs
+1
-1
BulletUIGenerator.cs
Assets/Scripts/UIs/BulletUIGenerator.cs
+2
-1
ClearUIGenerator.cs
Assets/Scripts/UIs/ClearUIGenerator.cs
+2
-1
CommentUIGenerator.cs
Assets/Scripts/UIs/CommentUIGenerator.cs
+30
-0
CommentUIGenerator.cs.meta
Assets/Scripts/UIs/CommentUIGenerator.cs.meta
+11
-0
No files found.
Assets/Resources/Stages/stage1.json
View file @
fc192fef
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
20.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
1.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
-1.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
4
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[{
"type"
:
0
,
"goal"
:
1
}],
"cases"
:[],
"bullets"
:[]}
\ No newline at end of file
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
20.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
1.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
-1.0
},{
"tag"
:
2
,
"xPos"
:
-0.5
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
0.0
,
"yPos"
:
-2.0
},{
"tag"
:
4
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[{
"type"
:
0
,
"goal"
:
1
}],
"cases"
:[],
"bullets"
:[],
"comments"
:
"hello stage 1"
}
\ No newline at end of file
Assets/Scripts/Managers/GameManager.cs
View file @
fc192fef
...
...
@@ -9,6 +9,7 @@ public class GameManager : SingletonBehaviour<GameManager>
[
Space
(
10
)]
public
ClearUIGenerator
uiGenerator
;
public
BulletUIGenerator
bulletUIGenerator
;
public
CommentUIGenerator
commentUIGenerator
;
public
Image
whiteout
;
[
Space
(
10
)]
...
...
Assets/Scripts/Managers/MapManager.cs
View file @
fc192fef
...
...
@@ -86,6 +86,11 @@ public class MapManager : SingletonBehaviour<MapManager>
PlayerController
.
inst
.
CreatePlayer
(
currentMap
.
startFloors
[
i
]);
for
(
int
i
=
0
;
i
<
loadedMapData
.
bullets
.
Count
;
i
++)
PlayerController
.
inst
.
AddBullet
(
loadedMapData
.
bullets
[
i
]);
if
(
loadedMapData
.
comments
!=
null
)
{
currentMap
.
comments
=
loadedMapData
.
comments
;
GameManager
.
inst
.
commentUIGenerator
.
SetComment
(
currentMap
.
comments
);
}
}
public
IEnumerator
Rebaker
()
...
...
Assets/Scripts/Map/Map.cs
View file @
fc192fef
...
...
@@ -14,9 +14,11 @@ public class Map : MonoBehaviour
public
GameObject
floors
;
public
GameObject
walls
;
public
GameObject
objects
;
[
Header
(
"Stage Data"
)]
public
List
<
Floor
>
startFloors
;
public
List
<
BulletCode
>
initialBullets
;
public
string
comments
;
public
List
<
ClearCondition
>
clearConditions
;
/// <summary>
...
...
Assets/Scripts/MapEditor.cs
View file @
fc192fef
...
...
@@ -31,6 +31,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
public
List
<
clearData
>
clears
;
public
List
<
BulletCode
>
cases
;
public
List
<
BulletCode
>
bullets
;
public
string
comments
=
null
;
public
MapSaveData
()
{
objects
=
new
List
<
objectData
>();
...
...
Assets/Scripts/StageSelector.cs
View file @
fc192fef
...
...
@@ -15,7 +15,7 @@ public class StageSelector : MonoBehaviour
{
if
(
i
<
0
&&
selectedStage
==
0
)
selectedStage
=
totalStageCount
-
1
;
else
selectedStage
=
(
selectedStage
+
i
)
%
totalStageCount
;
stageIndex
.
text
=
"Stage : "
+
selectedStage
;
stageIndex
.
text
=
"Stage : "
+
(
selectedStage
+
1
)
;
}
public
void
StartSelectedStage
()
...
...
Assets/Scripts/UIs/BulletUIGenerator.cs
View file @
fc192fef
...
...
@@ -6,6 +6,7 @@ using UnityEngine.UI;
public
class
BulletUIGenerator
:
MonoBehaviour
{
public
GameObject
bulletUI
;
public
Transform
bulletUIParent
;
public
GameObject
targetBulletUI
;
public
List
<
GameObject
>
uiList
;
...
...
@@ -17,7 +18,7 @@ public class BulletUIGenerator : MonoBehaviour
public
void
GenerateBulletUI
(
BulletCode
code
)
{
GameObject
bulletUIInst
=
Instantiate
(
bulletUI
,
transform
);
GameObject
bulletUIInst
=
Instantiate
(
bulletUI
,
bulletUIParent
);
bulletUIInst
.
transform
.
localPosition
=
new
Vector3
(
posX
,
posY
);
posX
-=
60
;
...
...
Assets/Scripts/UIs/ClearUIGenerator.cs
View file @
fc192fef
...
...
@@ -5,6 +5,7 @@ using UnityEngine;
public
class
ClearUIGenerator
:
MonoBehaviour
{
public
GameObject
clearUI
;
public
Transform
clearUIParent
;
public
List
<
GameObject
>
uiList
;
private
int
nextx
=
-
175
;
...
...
@@ -15,7 +16,7 @@ public class ClearUIGenerator : MonoBehaviour
{
foreach
(
ClearCondition
cond
in
MapManager
.
inst
.
currentMap
.
clearConditions
)
{
GameObject
uiObject
=
Instantiate
(
clearUI
,
transform
);
GameObject
uiObject
=
Instantiate
(
clearUI
,
clearUIParent
);
uiList
.
Add
(
uiObject
);
ClearStatusUI
ui
=
uiObject
.
GetComponent
<
ClearStatusUI
>();
ui
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector2
(
nextx
,
nexty
);
...
...
Assets/Scripts/UIs/CommentUIGenerator.cs
0 → 100644
View file @
fc192fef
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.UI
;
public
class
CommentUIGenerator
:
MonoBehaviour
{
public
GameObject
commentUI
;
public
Text
comment
;
public
string
commentString
=
""
;
public
bool
isViewed
=
false
;
public
void
SetComment
(
string
commentStr
)
{
commentString
=
commentStr
;
comment
.
text
=
commentString
;
commentUI
.
SetActive
(
true
);
}
IEnumerator
FadeOut
()
{
yield
return
new
WaitForSeconds
(
5f
);
float
currentTime
=
Time
.
time
;
for
(;
currentTime
+
5000
>=
Time
.
time
;)
{
yield
return
null
;
}
}
}
Assets/Scripts/UIs/CommentUIGenerator.cs.meta
0 → 100644
View file @
fc192fef
fileFormatVersion: 2
guid: 375ecde44acb181449f97b4269c7f740
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
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