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
c4a6c63c
Commit
c4a6c63c
authored
Jul 02, 2019
by
15박보승
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
맵에디터에서 서류 가방 생성시 총알 종류를 담을 수 있게 함
parent
3a7c3ccf
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
765 additions
and
62 deletions
+765
-62
2019-07-02-18-55-46.json
Assets/2019-07-02-18-55-46.json
+1
-0
2019-07-02-18-55-46.json.meta
Assets/2019-07-02-18-55-46.json.meta
+7
-0
MapEditorCanvas.prefab
Assets/Prefabs/MapEditor/MapEditorCanvas.prefab
+734
-54
SampleScene.unity
Assets/Scenes/SampleScene.unity
+1
-1
Briefcase.cs
Assets/Scripts/Interactors/Briefcase.cs
+6
-1
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+5
-0
MapEditor.cs
Assets/Scripts/MapEditor.cs
+11
-6
No files found.
Assets/2019-07-02-18-55-46.json
0 → 100644
View file @
c4a6c63c
{
"objects"
:[{
"tag"
:
0
,
"xPos"
:
25.0
,
"yPos"
:
0.0
},{
"tag"
:
2
,
"xPos"
:
-2.0
,
"yPos"
:
1.5
},{
"tag"
:
2
,
"xPos"
:
-1.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
0.0
,
"yPos"
:
1.5
},{
"tag"
:
3
,
"xPos"
:
1.0
,
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os"
:
0.0
},{
"tag"
:
9
,
"xPos"
:
-2.0
,
"yPos"
:
0.0
},{
"tag"
:
1
,
"xPos"
:
-1.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"
:
2.0
},{
"tag"
:
7
,
"xPos"
:
2.0
,
"yPos"
:
1.0
},{
"tag"
:
8
,
"xPos"
:
2.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
0.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-1.0
},{
"tag"
:
5
,
"xPos"
:
1.0
,
"yPos"
:
-2.0
}],
"clears"
:[],
"cases"
:[
3
,
0
,
1
,
2
],
"bullets"
:[
0
,
1
,
2
]}
\ No newline at end of file
Assets/2019-07-02-18-55-46.json.meta
0 → 100644
View file @
c4a6c63c
fileFormatVersion: 2
guid: e4921fa87e2b8fe44b2246f2b275c88a
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/MapEditor/MapEditorCanvas.prefab
View file @
c4a6c63c
This diff is collapsed.
Click to expand it.
Assets/Scenes/SampleScene.unity
View file @
c4a6c63c
...
...
@@ -1138,7 +1138,7 @@ PrefabInstance:
type
:
3
}
propertyPath
:
stage.Array.data[0]
value
:
objectReference
:
{
fileID
:
4900000
,
guid
:
61078fd8d06379c47b9709f2ed3a3290
,
type
:
3
}
objectReference
:
{
fileID
:
4900000
,
guid
:
e4921fa87e2b8fe44b2246f2b275c88a
,
type
:
3
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
11285456de5f1854d947bea83275646f
,
type
:
3
}
---
!u!1001
&7277015660625800392
...
...
Assets/Scripts/Interactors/Briefcase.cs
View file @
c4a6c63c
...
...
@@ -32,7 +32,12 @@ public class Briefcase : MonoBehaviour, IObject, IPlayerInteractor
dropBullet
=
_dropBullet
;
}
public
void
Interact
(
Vector2Int
position
)
private
void
OnDestroy
()
{
PlayerController
.
inst
.
OnPlayerMove
-=
Interact
;
}
public
void
Interact
(
Vector2Int
position
)
{
Debug
.
Log
(
Position
+
" "
+
position
);
if
(
Position
==
position
)
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
c4a6c63c
...
...
@@ -23,6 +23,11 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
MapManager
.
inst
.
currentMap
.
clearConditions
[
GameManager
.
nTurret
].
IsDone
(
1
);
Destroy
(
gameObject
);
}
private
void
OnDestroy
()
{
PlayerController
.
inst
.
OnPlayerMove
-=
Interact
;
}
public
void
Interact
(
Vector2Int
pos
)
{
...
...
Assets/Scripts/MapEditor.cs
View file @
c4a6c63c
...
...
@@ -50,6 +50,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
public
Map
currentMap
;
public
MapEditorTile
tile
;
TileMode
currentMode
;
BulletCode
bulletMode
;
public
Text
modeSign
;
public
GameObject
startSign
,
goalSign
,
mapSizeSetter
,
mapEditorTiles
;
public
Dictionary
<
Floor
,
GameObject
>
startSigns
,
goalSigns
;
...
...
@@ -150,11 +151,16 @@ public class MapEditor : SingletonBehaviour<MapEditor>
mapSizeSetter
.
SetActive
(
true
);
isEditorStarted
=
false
;
}
public
void
SwitchMode
(
int
m
ode
)
public
void
SwitchMode
(
int
_tileM
ode
)
{
currentMode
=
(
TileMode
)
mode
;
currentMode
=
(
TileMode
)
_tileMode
;
if
(
currentMode
!=
TileMode
.
Briefcase
)
SwitchBulletMode
(
3
);
SetModeSign
();
}
public
void
SwitchBulletMode
(
int
_bulletMode
)
{
bulletMode
=
(
BulletCode
)
_bulletMode
;
}
public
void
SetCreateMode
(
bool
mode
)
{
isCreateMode
=
mode
;
...
...
@@ -188,6 +194,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
{
StartMap
(
currentMap
);
SwitchMode
(
0
);
SwitchBulletMode
((
int
)
BulletCode
.
None
);
}
// Update is called once per frame
...
...
@@ -230,9 +237,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
if
(
isCreateMode
)
{
if
(
currentMap
.
startFloors
.
Contains
(
currentMap
.
GetFloorAtPos
(
clickedPos
)))
{
Debug
.
Log
(
"Start floor already exists at : ("
+
clickedPos
.
x
+
", "
+
clickedPos
.
y
+
")"
);
}
else
{
currentMap
.
startFloors
.
Add
(
currentMap
.
GetFloorAtPos
(
clickedPos
));
...
...
@@ -243,9 +248,7 @@ public class MapEditor : SingletonBehaviour<MapEditor>
else
{
if
(!
currentMap
.
startFloors
.
Contains
(
currentMap
.
GetFloorAtPos
(
clickedPos
)))
{
Debug
.
Log
(
"Start floor doesn't exist at : ("
+
clickedPos
.
x
+
", "
+
clickedPos
.
y
+
")"
);
}
else
{
currentMap
.
startFloors
.
Remove
(
currentMap
.
GetFloorAtPos
(
clickedPos
));
...
...
@@ -287,6 +290,8 @@ public class MapEditor : SingletonBehaviour<MapEditor>
Debug
.
Log
(
wallPos
);
if
(
currentMode
==
TileMode
.
BMannequin
)
currentMap
.
CreateObject
(
clickedPos
,
ObjType
.
Mannequin
,
false
);
else
if
(
currentMode
==
TileMode
.
Briefcase
)
currentMap
.
CreateObject
(
clickedPos
,
ObjType
.
Briefcase
,
bulletMode
);
else
currentMap
.
CreateObject
(
clickedPos
,
(
ObjType
)((
int
)
currentMode
-
4
));
}
...
...
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