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
3a7c3ccf
Commit
3a7c3ccf
authored
Jul 02, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 서류 가방 생성자로 가지는 총알을 담음
parent
81b44dfa
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
113 additions
and
17 deletions
+113
-17
2019-07-02-17-37-38.json
Assets/2019-07-02-17-37-38.json
+1
-0
2019-07-02-17-37-38.json.meta
Assets/2019-07-02-17-37-38.json.meta
+7
-0
case.prefab
Assets/Prefabs/Objects/case.prefab
+1
-0
MapEditor.unity
Assets/Scenes/MapEditor.unity
+70
-1
SampleScene.unity
Assets/Scenes/SampleScene.unity
+10
-5
BulletFactory.cs
Assets/Scripts/Bullets/BulletFactory.cs
+0
-7
Enums.cs
Assets/Scripts/Generals/Enums.cs
+8
-0
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+4
-3
MapManager.cs
Assets/Scripts/Managers/MapManager.cs
+2
-1
Map.cs
Assets/Scripts/Map/Map.cs
+5
-0
MapEditor.cs
Assets/Scripts/MapEditor.cs
+5
-0
No files found.
Assets/2019-07-02-17-37-38.json
0 → 100644
View file @
3a7c3ccf
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
25.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
0.5
},{
"tag"
:
2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"
:
-2.0
,
"yPos"
:
-1.0
},{
"tag"
:
1
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
1
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
4
,
"xPos"
:
-2.0
,
"yPos"
:
-2.0
},{
"tag"
:
4
,
"xPos"
:
-1.0
,
"yPos"
:
-2.0
},{
"tag"
:
6
,
"xPos"
:
2.0
,
"yPos"
:
-1.0
},{
"tag"
:
7
,
"xPos"
:
2.0
,
"yPos"
:
-2.0
},{
"tag"
:
8
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
0.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
-1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
2.0
,
"yPos"
:
0.0
}],
"clears"
:[],
"cases"
:[
1
,
2
,
3
,
0
],
"bullets"
:[
0
,
1
,
2
]}
\ No newline at end of file
Assets/2019-07-02-17-37-38.json.meta
0 → 100644
View file @
3a7c3ccf
fileFormatVersion: 2
guid: 61078fd8d06379c47b9709f2ed3a3290
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/Objects/case.prefab
View file @
3a7c3ccf
...
...
@@ -108,3 +108,4 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
floor
:
{
fileID
:
0
}
dropBullet
:
3
Assets/Scenes/MapEditor.unity
View file @
3a7c3ccf
...
...
@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity
:
1
m_CustomReflection
:
{
fileID
:
0
}
m_Sun
:
{
fileID
:
0
}
m_IndirectSpecularColor
:
{
r
:
0.18028334
,
g
:
0.225713
28
,
b
:
0.3069217
,
a
:
1
}
m_IndirectSpecularColor
:
{
r
:
0.18028334
,
g
:
0.225713
4
,
b
:
0.30692226
,
a
:
1
}
m_UseRadianceAmbientProbe
:
0
---
!u!157
&3
LightmapSettings
:
...
...
@@ -255,6 +255,75 @@ PrefabInstance:
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
06619682524bc5149b5c3092da0722f2
,
type
:
3
}
---
!u!1001
&463381731
PrefabInstance
:
m_ObjectHideFlags
:
0
serializedVersion
:
2
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_Name
value
:
GameManager
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalRotation.w
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_RootOrder
value
:
6
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.x
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.y
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
---
!u!1
&797716766
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Scenes/SampleScene.unity
View file @
3a7c3ccf
...
...
@@ -1134,6 +1134,11 @@ PrefabInstance:
propertyPath
:
surface
value
:
objectReference
:
{
fileID
:
2102809461
}
-
target
:
{
fileID
:
3268100033343711389
,
guid
:
11285456de5f1854d947bea83275646f
,
type
:
3
}
propertyPath
:
stage.Array.data[0]
value
:
objectReference
:
{
fileID
:
4900000
,
guid
:
61078fd8d06379c47b9709f2ed3a3290
,
type
:
3
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
11285456de5f1854d947bea83275646f
,
type
:
3
}
---
!u!1001
&7277015660625800392
...
...
@@ -1143,6 +1148,11 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
-
target
:
{
fileID
:
7277015661519863741
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_NavMeshData
value
:
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
7277015661519863740
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_Name
...
...
@@ -1208,10 +1218,5 @@ PrefabInstance:
propertyPath
:
m_LocalEulerAnglesHint.z
value
:
0
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
7277015661519863741
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
propertyPath
:
m_NavMeshData
value
:
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
20dee07e28273f049a9093ae4453912f
,
type
:
3
}
Assets/Scripts/Bullets/BulletFactory.cs
View file @
3a7c3ccf
...
...
@@ -2,13 +2,6 @@
using
System.Collections.Generic
;
using
UnityEngine
;
public
enum
BulletCode
{
True
,
False
,
Mirror
}
public
class
BulletFactory
{
private
GameObject
truthBulletPrefab
=
null
,
fakeBulletPrefab
=
null
,
mirrorBulletPrefab
=
null
;
...
...
Assets/Scripts/Generals/Enums.cs
View file @
3a7c3ccf
...
...
@@ -24,6 +24,14 @@ public enum WallType
Mirror
}
public
enum
BulletCode
{
True
,
False
,
Mirror
,
None
}
public
enum
ObjType
{
NULL
,
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
3a7c3ccf
...
...
@@ -6,7 +6,7 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
{
[
SerializeField
]
private
Floor
floor
=
null
;
p
rivate
BulletCode
dropBullet
;
p
ublic
BulletCode
dropBullet
;
public
Vector2Int
Position
{
get
{
return
floor
!=
null
?
floor
.
mapPos
:
throw
new
UnassignedReferenceException
(
"Floor of Interactor is not assigned"
);
}
}
public
GameObject
GetObject
()
...
...
@@ -35,9 +35,10 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
public
void
Interact
(
Vector2Int
position
)
{
Debug
.
Log
(
Position
+
" "
+
position
);
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
if
(
Position
==
position
)
{
if
(
dropBullet
!=
BulletCode
.
None
)
PlayerController
.
inst
.
AddBullet
(
dropBullet
);
if
(
GameManager
.
aCase
>=
0
)
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
aCase
].
IsDone
(
1
);
if
(
GameManager
.
nCase
>=
0
)
...
...
Assets/Scripts/Managers/MapManager.cs
View file @
3a7c3ccf
...
...
@@ -34,6 +34,7 @@ public class MapManager : SingletonBehaviour<MapManager>
currentMap
=
Instantiate
(
currentMap
,
new
Vector3
(
0
,
0
,
0
),
Quaternion
.
identity
);
currentMap
.
InitiateMap
();
currentMap
.
maxMapSize
=
(
int
)
loadedMapData
.
objects
[
0
].
xPos
;
int
casesIndex
=
0
;
for
(
int
i
=
1
;
i
<
loadedMapData
.
objects
.
Count
;
i
++)
{
var
temp
=
loadedMapData
.
objects
[
i
];
...
...
@@ -52,7 +53,7 @@ public class MapManager : SingletonBehaviour<MapManager>
currentMap
.
startFloors
.
Add
(
currentMap
.
GetFloorAtPos
(
new
Vector2Int
((
int
)
temp
.
xPos
,
(
int
)
temp
.
yPos
)));
break
;
case
TileMode
.
Briefcase
:
currentMap
.
CreateObject
(
new
Vector2Int
((
int
)
temp
.
xPos
,
(
int
)
temp
.
yPos
),
ObjType
.
Briefcase
);
currentMap
.
CreateObject
(
new
Vector2Int
((
int
)
temp
.
xPos
,
(
int
)
temp
.
yPos
),
ObjType
.
Briefcase
,
loadedMapData
.
cases
[
casesIndex
++]
);
break
;
case
TileMode
.
Camera
:
currentMap
.
CreateObject
(
new
Vector2Int
((
int
)
temp
.
xPos
,
(
int
)
temp
.
yPos
),
ObjType
.
Camera
);
...
...
Assets/Scripts/Map/Map.cs
View file @
3a7c3ccf
...
...
@@ -242,6 +242,11 @@ public class Map : MonoBehaviour
else
Debug
.
Log
(
"Object already exists at : ("
+
pos
.
x
+
", "
+
pos
.
y
+
")"
);
}
public
void
CreateObject
(
Vector2Int
pos
,
ObjType
objType
,
BulletCode
_dropBullet
)
{
CreateObject
(
pos
,
objType
);
GetObjectAtPos
(
pos
).
GetObject
().
GetComponent
<
Briefcase
>().
dropBullet
=
_dropBullet
;
}
/// <summary>
/// Remove Object at position.
/// </summary>
...
...
Assets/Scripts/MapEditor.cs
View file @
3a7c3ccf
...
...
@@ -29,11 +29,13 @@ public class MapEditor : SingletonBehaviour<MapEditor>
{
public
List
<
objectData
>
objects
;
public
List
<
clearData
>
clears
;
public
List
<
BulletCode
>
cases
;
public
List
<
BulletCode
>
bullets
;
public
MapSaveData
()
{
objects
=
new
List
<
objectData
>();
clears
=
new
List
<
clearData
>();
cases
=
new
List
<
BulletCode
>();
bullets
=
new
List
<
BulletCode
>();
}
public
void
AddObject
(
TileMode
_tag
,
Vector2
_pos
)
...
...
@@ -101,7 +103,10 @@ public class MapEditor : SingletonBehaviour<MapEditor>
{
IObject
temp
=
child
.
GetComponent
<
IObject
>();
if
(
temp
.
GetType
()
==
ObjType
.
Briefcase
)
{
mapSaveData
.
cases
.
Add
(
temp
.
GetObject
().
GetComponent
<
Briefcase
>().
dropBullet
);
mapSaveData
.
AddObject
(
TileMode
.
Briefcase
,
temp
.
GetPos
());
}
else
if
(
temp
.
GetType
()
==
ObjType
.
Camera
)
mapSaveData
.
AddObject
(
TileMode
.
Camera
,
temp
.
GetPos
());
else
if
(
temp
.
GetType
()
==
ObjType
.
Mannequin
)
...
...
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