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
9a9a2a69
Commit
9a9a2a69
authored
Aug 19, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
키보드 입력으로 조작가능하게, 탄설명창 크기 키움
parent
945310ae
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
540 additions
and
121 deletions
+540
-121
BulletUI.prefab
Assets/Prefabs/UIs/BulletUI.prefab
+9
-9
키설명.png
Assets/Resources/키설명.png
+0
-0
키설명.png.meta
Assets/Resources/키설명.png.meta
+115
-0
PlayStage.unity
Assets/Scenes/PlayStage.unity
+367
-73
CameraController.cs
Assets/Scripts/CameraController.cs
+3
-0
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+3
-1
IngameManager.cs
Assets/Scripts/Managers/IngameManager.cs
+0
-22
KeyInputManager.cs
Assets/Scripts/Managers/KeyInputManager.cs
+26
-0
KeyInputManager.cs.meta
Assets/Scripts/Managers/KeyInputManager.cs.meta
+1
-1
Mirror.cs
Assets/Scripts/Map/Mirror.cs
+12
-9
Player.cs
Assets/Scripts/Player.cs
+3
-3
BulletHoverUI.cs
Assets/Scripts/UIs/BulletHoverUI.cs
+0
-2
BulletUIGenerator.cs
Assets/Scripts/UIs/BulletUIGenerator.cs
+1
-1
No files found.
Assets/Prefabs/UIs/BulletUI.prefab
View file @
9a9a2a69
...
...
@@ -36,8 +36,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0
,
y
:
0
}
m_AnchorMax
:
{
x
:
1
,
y
:
1
}
m_AnchoredPosition
:
{
x
:
-
115.7
,
y
:
164.7
}
m_SizeDelta
:
{
x
:
231.4
,
y
:
40
}
m_AnchoredPosition
:
{
x
:
-
203.24
,
y
:
216.96
}
m_SizeDelta
:
{
x
:
406.47
,
y
:
144.51
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&2381591747203015850
CanvasRenderer
:
...
...
@@ -111,8 +111,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
-0.
7
,
y
:
-31.03
}
m_SizeDelta
:
{
x
:
260.99
,
y
:
78.64
}
m_AnchoredPosition
:
{
x
:
-0.
000038147
,
y
:
-38.8
}
m_SizeDelta
:
{
x
:
397.51
,
y
:
119.78
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&7654206411380583771
CanvasRenderer
:
...
...
@@ -170,7 +170,7 @@ MonoBehaviour:
m_Name
:
m_EditorClassIdentifier
:
m_EffectColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
0.32941177
}
m_EffectDistance
:
{
x
:
1
,
y
:
-1
}
m_EffectDistance
:
{
x
:
2
,
y
:
-2
}
m_UseGraphicAlpha
:
1
---
!u!1
&5777967798850079087
GameObject
:
...
...
@@ -207,8 +207,8 @@ RectTransform:
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0.5
}
m_AnchoredPosition
:
{
x
:
0.0000
48637
,
y
:
46.5
}
m_SizeDelta
:
{
x
:
131.19
,
y
:
45.79
}
m_AnchoredPosition
:
{
x
:
0.0000
33259
,
y
:
74.8
}
m_SizeDelta
:
{
x
:
212.01
,
y
:
74
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!222
&8579805982136759849
CanvasRenderer
:
...
...
@@ -240,11 +240,11 @@ MonoBehaviour:
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
12800000
,
guid
:
e3afb6123179dd040a1f0d82c85df332
,
type
:
3
}
m_FontSize
:
37
m_FontSize
:
60
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
3
m_MaxSize
:
4
0
m_MaxSize
:
6
0
m_Alignment
:
4
m_AlignByGeometry
:
0
m_RichText
:
1
...
...
Assets/Resources/키설명.png
0 → 100644
View file @
9a9a2a69
6.45 KB
Assets/Resources/키설명.png.meta
0 → 100644
View file @
9a9a2a69
fileFormatVersion: 2
guid: f41fb0346ec0e104c9691b3eff37df33
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/PlayStage.unity
View file @
9a9a2a69
This diff is collapsed.
Click to expand it.
Assets/Scripts/CameraController.cs
View file @
9a9a2a69
...
...
@@ -5,6 +5,7 @@ using UnityEngine;
public
class
CameraController
:
MonoBehaviour
{
public
GameObject
helpUI
;
public
GameObject
helpUI2
;
Vector3
dragOrigin
;
Vector3
moveOrigin
;
...
...
@@ -94,6 +95,7 @@ public class CameraController : MonoBehaviour
float
startTime
=
Time
.
time
;
Vector3
posDiff
=
(
player
.
head
.
transform
.
position
-
transform
.
position
)
/
cameraMoveDuration
;
float
angleDiff
=
-
30f
/
cameraMoveDuration
;
helpUI2
.
SetActive
(
false
);
previousPos
=
transform
.
position
;
previousAngle
=
new
Vector3
(
transform
.
eulerAngles
.
x
>
180
?
transform
.
eulerAngles
.
x
-
360
:
transform
.
eulerAngles
.
x
,
transform
.
eulerAngles
.
y
>
180
?
transform
.
eulerAngles
.
y
-
360
:
transform
.
eulerAngles
.
y
,
...
...
@@ -167,6 +169,7 @@ public class CameraController : MonoBehaviour
GameManager
.
inst
.
isZooming
=
false
;
// Visible mouse cursor
helpUI2
.
SetActive
(
true
);
Cursor
.
visible
=
true
;
Cursor
.
lockState
=
CursorLockMode
.
None
;
}
...
...
Assets/Scripts/Managers/GameManager.cs
View file @
9a9a2a69
...
...
@@ -114,8 +114,10 @@ public class GameManager : SingletonBehaviour<GameManager>
public
void
GameOver
(
bool
onlyRestart
=
false
)
{
if
(!
onlyRestart
)
Debug
.
Log
(
"Game Over!"
);
StageSelector
.
inst
.
SaveClearData
(
stageStrIdx
,
onlyRestart
);
StageSelector
.
inst
.
SaveClearData
(
stageStrIdx
,
false
);
isGameOver
=
true
;
Cursor
.
visible
=
true
;
Cursor
.
lockState
=
CursorLockMode
.
None
;
StopAllCoroutines
();
uiGenerator
.
ResetAllClearUIs
();
StartCoroutine
(
RestartStage
());
...
...
Assets/Scripts/Managers/IngameManager.cs
deleted
100644 → 0
View file @
945310ae
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
IngameManager
:
SingletonBehaviour
<
IngameManager
>
{
private
int
_briefcaseCount
=
0
;
public
int
BriefcaseCount
{
get
{
return
_briefcaseCount
;
}
set
{
for
(
int
i
=
0
;
i
<
value
-
_briefcaseCount
;
++
i
)
{
IngameUIManager
.
inst
.
AddBriefcaseUI
();
}
for
(
int
i
=
0
;
i
<
_briefcaseCount
-
value
;
++
i
)
{
//RemoveBriefcaseUI();
}
_briefcaseCount
=
value
;
}
}
}
Assets/Scripts/Managers/KeyInputManager.cs
0 → 100644
View file @
9a9a2a69
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
KeyInputManager
:
MonoBehaviour
{
// Update is called once per frame
void
LateUpdate
()
{
if
(
Input
.
GetKeyDown
(
KeyCode
.
R
))
{
GameManager
.
inst
.
GameOver
(
true
);
}
if
(
Input
.
GetKeyDown
(
KeyCode
.
Space
)
&&
!
GameManager
.
inst
.
isPlayerMoving
&&
!
GameManager
.
inst
.
isZooming
)
{
if
(
GameManager
.
inst
.
isPlayerShooting
)
{
StartCoroutine
(
Camera
.
main
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
PlayerController
.
inst
.
currentPlayer
));
}
else
if
(
PlayerController
.
inst
.
currentPlayer
!=
null
)
{
StartCoroutine
(
PlayerController
.
inst
.
currentPlayer
.
CountPlayerClick
(
Time
.
time
-
1f
,
true
));
}
}
}
}
Assets/Scripts/Managers/
Ingame
Manager.cs.meta
→
Assets/Scripts/Managers/
KeyInput
Manager.cs.meta
View file @
9a9a2a69
fileFormatVersion: 2
guid:
8995125956e2a254c9d8a0fcd0e7555c
guid:
5eb3cfa4d93a1f94e86c4eee40a7d541
MonoImporter:
externalObjects: {}
serializedVersion: 2
...
...
Assets/Scripts/Map/Mirror.cs
View file @
9a9a2a69
...
...
@@ -92,16 +92,19 @@ public class Mirror : Wall, IBulletInteractor, IBreakable
// start reflection
Debug
.
Log
(
"Start Reflection"
);
Vector2Int
frontFloorPos
=
dir
?
new
Vector2Int
(
Mathf
.
RoundToInt
(
mapPos
.
x
),
Mathf
.
RoundToInt
(
mapPos
.
y
+
0.5f
*
side
))
:
new
Vector2Int
(
Mathf
.
RoundToInt
(
mapPos
.
x
+
0.5f
*
side
),
Mathf
.
RoundToInt
(
mapPos
.
y
));
if
(
floorCountGrid
.
TryGetValue
(
frontFloorPos
,
out
int
frontFloorCount
))
if
(
parRay
.
Count
>
0
)
{
if
(
frontFloorCount
==
0
)
floorCountGrid
[
frontFloorPos
]++;
// have floor
}
else
// no floor on there
{
floorCountGrid
.
Add
(
frontFloorPos
,
-
1
);
Vector2Int
frontFloorPos
=
dir
?
new
Vector2Int
(
Mathf
.
RoundToInt
(
mapPos
.
x
),
Mathf
.
RoundToInt
(
mapPos
.
y
+
0.5f
*
side
))
:
new
Vector2Int
(
Mathf
.
RoundToInt
(
mapPos
.
x
+
0.5f
*
side
),
Mathf
.
RoundToInt
(
mapPos
.
y
));
if
(
floorCountGrid
.
TryGetValue
(
frontFloorPos
,
out
int
frontFloorCount
))
{
if
(
frontFloorCount
==
0
)
floorCountGrid
[
frontFloorPos
]++;
// have floor
}
else
// no floor on there
{
floorCountGrid
.
Add
(
frontFloorPos
,
-
1
);
}
}
for
(;
Mathf
.
Abs
(
i
)
<
(
MapManager
.
inst
.
currentMap
.
maxMapSize
+
1
);
i
+=
side
)
{
...
...
Assets/Scripts/Player.cs
View file @
9a9a2a69
...
...
@@ -101,15 +101,15 @@ public class Player : MonoBehaviour
/// </summary>
/// <param name="startTime">Start time of the timer.</param>
/// <returns></returns>
public
IEnumerator
CountPlayerClick
(
float
startTime
)
public
IEnumerator
CountPlayerClick
(
float
startTime
,
bool
direct
=
false
)
{
float
time
=
Time
.
time
;
float
doubleClickDelay
=
0.2f
;
float
endTime
=
startTime
+
1f
;
bool
doubleClicked
=
false
;
bool
doubleClicked
=
direct
;
bool
isHoldExit
=
false
;
aimLight
.
gameObject
.
SetActive
(
true
);
while
(
time
<=
endTime
)
while
(
time
<=
endTime
&&
!
direct
)
{
yield
return
null
;
aimLight
.
lightMultiplier
+=
10
*
Time
.
deltaTime
;
...
...
Assets/Scripts/UIs/BulletHoverUI.cs
View file @
9a9a2a69
...
...
@@ -11,13 +11,11 @@ public class BulletHoverUI : MonoBehaviour
public
void
OnMouseEnter
()
{
Debug
.
Log
(
"hello"
);
hoverUI
.
SetActive
(
true
);
}
public
void
OnMouseExit
()
{
Debug
.
Log
(
"hello"
);
hoverUI
.
SetActive
(
false
);
}
}
Assets/Scripts/UIs/BulletUIGenerator.cs
View file @
9a9a2a69
...
...
@@ -53,7 +53,7 @@ public class BulletUIGenerator : MonoBehaviour
case
BulletCode
.
Mirror
:
bulletUIInst
.
GetComponent
<
Image
>().
sprite
=
mirrBullet
;
bulletUIInst
.
GetComponent
<
BulletHoverUI
>().
headerText
.
text
=
"거울탄"
;
bulletUIInst
.
GetComponent
<
BulletHoverUI
>().
headerText
.
color
=
Color
.
gray
;
bulletUIInst
.
GetComponent
<
BulletHoverUI
>().
headerText
.
color
=
new
Color
(
0.1f
,
0.1f
,
0.1f
,
1
)
;
bulletUIInst
.
GetComponent
<
BulletHoverUI
>().
bodyText
.
text
=
"일반 벽을 거울로 만듦\n회색 서류가방에서 제공"
;
break
;
default
:
...
...
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