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
7f82e9a9
Commit
7f82e9a9
authored
Aug 09, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/polish' into map
parents
818428fc
5cbb69b2
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1538 additions
and
66 deletions
+1538
-66
OutlineEffect.meta
Assets/OutlineEffect.meta
+8
-0
LinkedSet.cs
Assets/OutlineEffect/LinkedSet.cs
+132
-0
LinkedSet.cs.meta
Assets/OutlineEffect/LinkedSet.cs.meta
+12
-0
Outline.cs
Assets/OutlineEffect/Outline.cs
+74
-0
Outline.cs.meta
Assets/OutlineEffect/Outline.cs.meta
+12
-0
OutlineEffect.cs
Assets/OutlineEffect/OutlineEffect.cs
+407
-0
OutlineEffect.cs.meta
Assets/OutlineEffect/OutlineEffect.cs.meta
+12
-0
Resources.meta
Assets/OutlineEffect/Resources.meta
+9
-0
OutlineBufferShader.shader
Assets/OutlineEffect/Resources/OutlineBufferShader.shader
+91
-0
OutlineBufferShader.shader.meta
...s/OutlineEffect/Resources/OutlineBufferShader.shader.meta
+9
-0
OutlineShader.shader
Assets/OutlineEffect/Resources/OutlineShader.shader
+254
-0
OutlineShader.shader.meta
Assets/OutlineEffect/Resources/OutlineShader.shader.meta
+9
-0
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+38
-21
wall.prefab
Assets/Prefabs/MapObjects/wall.prefab
+17
-0
mannequin (4).prefab
Assets/Prefabs/Objects/Mannequin/mannequin (4).prefab
+35
-1
camera.prefab
Assets/Prefabs/Objects/camera.prefab
+35
-1
case.prefab
Assets/Prefabs/Objects/case.prefab
+1
-1
PlayStage.unity
Assets/Scenes/PlayStage.unity
+202
-22
SelectStage.unity
Assets/Scenes/SelectStage.unity
+27
-2
GameManager.cs
Assets/Scripts/Managers/GameManager.cs
+27
-12
ClearCondition.cs
Assets/Scripts/Map/ClearCondition.cs
+1
-1
Player.cs
Assets/Scripts/Player.cs
+118
-1
PlayerController.cs
Assets/Scripts/PlayerController.cs
+2
-1
StageSelector.cs
Assets/Scripts/StageSelector.cs
+3
-3
TagManager.asset
ProjectSettings/TagManager.asset
+3
-0
No files found.
Assets/OutlineEffect.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: 6792f0a2679144d44869e40dbda77883
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/LinkedSet.cs
0 → 100644
View file @
7f82e9a9
using
System
;
using
System.Collections.Generic
;
namespace
cakeslice
{
public
class
LinkedSet
<
T
>
:
IEnumerable
<
T
>
{
private
LinkedList
<
T
>
list
;
private
Dictionary
<
T
,
LinkedListNode
<
T
>>
dictionary
;
public
LinkedSet
()
{
list
=
new
LinkedList
<
T
>();
dictionary
=
new
Dictionary
<
T
,
LinkedListNode
<
T
>>();
}
public
LinkedSet
(
IEqualityComparer
<
T
>
comparer
)
{
list
=
new
LinkedList
<
T
>();
dictionary
=
new
Dictionary
<
T
,
LinkedListNode
<
T
>>(
comparer
);
}
public
bool
Contains
(
T
t
)
{
return
dictionary
.
ContainsKey
(
t
);
}
public
bool
Add
(
T
t
)
{
if
(
dictionary
.
ContainsKey
(
t
))
{
return
false
;
}
LinkedListNode
<
T
>
node
=
list
.
AddLast
(
t
);
dictionary
.
Add
(
t
,
node
);
return
true
;
}
public
void
Clear
()
{
list
.
Clear
();
dictionary
.
Clear
();
}
public
AddType
AddOrMoveToEnd
(
T
t
)
{
LinkedListNode
<
T
>
node
;
if
(
dictionary
.
Comparer
.
Equals
(
t
,
list
.
Last
.
Value
))
{
return
AddType
.
NO_CHANGE
;
}
else
if
(
dictionary
.
TryGetValue
(
t
,
out
node
))
{
list
.
Remove
(
node
);
node
=
list
.
AddLast
(
t
);
dictionary
[
t
]
=
node
;
return
AddType
.
MOVED
;
}
else
{
node
=
list
.
AddLast
(
t
);
dictionary
[
t
]
=
node
;
return
AddType
.
ADDED
;
}
}
public
bool
Remove
(
T
t
)
{
LinkedListNode
<
T
>
node
;
if
(
dictionary
.
TryGetValue
(
t
,
out
node
)
&&
dictionary
.
Remove
(
t
))
{
list
.
Remove
(
node
);
return
true
;
}
else
{
return
false
;
}
}
public
void
ExceptWith
(
IEnumerable
<
T
>
enumerable
)
{
foreach
(
T
t
in
enumerable
)
{
Remove
(
t
);
}
}
public
IEnumerator
<
T
>
GetEnumerator
()
{
return
list
.
GetEnumerator
();
}
System
.
Collections
.
IEnumerator
System
.
Collections
.
IEnumerable
.
GetEnumerator
()
{
return
list
.
GetEnumerator
();
}
public
enum
AddType
{
/// <summary>
/// No changes were made
/// </summary>
NO_CHANGE
,
/// <summary>
/// The value was added
/// </summary>
ADDED
,
/// <summary>
/// The value was moved to the end.
/// </summary>
MOVED
}
}
}
Assets/OutlineEffect/LinkedSet.cs.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: 4bb8010dd287d4dd1b86b997bbaf77f2
timeCreated: 1490858176
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/Outline.cs
0 → 100644
View file @
7f82e9a9
/*
// Copyright (c) 2015 José Guerreiro. All rights reserved.
//
// MIT license, see http://www.opensource.org/licenses/mit-license.php
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
*/
using
UnityEngine
;
using
System.Linq
;
using
System.Collections.Generic
;
namespace
cakeslice
{
[
ExecuteInEditMode
]
[
RequireComponent
(
typeof
(
Renderer
))]
public
class
Outline
:
MonoBehaviour
{
public
Renderer
Renderer
{
get
;
private
set
;
}
public
int
color
;
public
bool
eraseRenderer
;
[
HideInInspector
]
public
int
originalLayer
;
[
HideInInspector
]
public
Material
[]
originalMaterials
;
private
void
Awake
()
{
Renderer
=
GetComponent
<
Renderer
>();
}
void
OnEnable
()
{
IEnumerable
<
OutlineEffect
>
effects
=
Camera
.
allCameras
.
AsEnumerable
()
.
Select
(
c
=>
c
.
GetComponent
<
OutlineEffect
>())
.
Where
(
e
=>
e
!=
null
);
foreach
(
OutlineEffect
effect
in
effects
)
{
effect
.
AddOutline
(
this
);
}
}
void
OnDisable
()
{
IEnumerable
<
OutlineEffect
>
effects
=
Camera
.
allCameras
.
AsEnumerable
()
.
Select
(
c
=>
c
.
GetComponent
<
OutlineEffect
>())
.
Where
(
e
=>
e
!=
null
);
foreach
(
OutlineEffect
effect
in
effects
)
{
effect
.
RemoveOutline
(
this
);
}
}
}
}
\ No newline at end of file
Assets/OutlineEffect/Outline.cs.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: fbf3575480402db40813e763382412fb
timeCreated: 1471429103
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/OutlineEffect.cs
0 → 100644
View file @
7f82e9a9
/*
// Copyright (c) 2015 José Guerreiro. All rights reserved.
//
// MIT license, see http://www.opensource.org/licenses/mit-license.php
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
*/
using
UnityEngine
;
using
System.Collections.Generic
;
using
UnityEngine.Rendering
;
using
UnityEngine.VR
;
namespace
cakeslice
{
[
DisallowMultipleComponent
]
[
RequireComponent
(
typeof
(
Camera
))]
[
ExecuteInEditMode
]
public
class
OutlineEffect
:
MonoBehaviour
{
private
static
OutlineEffect
m_instance
;
public
static
OutlineEffect
Instance
{
get
{
if
(
Equals
(
m_instance
,
null
))
{
return
m_instance
=
FindObjectOfType
(
typeof
(
OutlineEffect
))
as
OutlineEffect
;
}
return
m_instance
;
}
}
private
OutlineEffect
()
{
}
private
readonly
LinkedSet
<
Outline
>
outlines
=
new
LinkedSet
<
Outline
>();
[
Range
(
1.0f
,
6.0f
)]
public
float
lineThickness
=
1.25f
;
[
Range
(
0
,
10
)]
public
float
lineIntensity
=
.
5f
;
[
Range
(
0
,
1
)]
public
float
fillAmount
=
0.2f
;
public
Color
lineColor0
=
Color
.
red
;
public
Color
lineColor1
=
Color
.
green
;
public
Color
lineColor2
=
Color
.
blue
;
public
bool
additiveRendering
=
false
;
public
bool
backfaceCulling
=
true
;
[
Header
(
"These settings can affect performance!"
)]
public
bool
cornerOutlines
=
false
;
public
bool
addLinesBetweenColors
=
false
;
[
Header
(
"Advanced settings"
)]
public
bool
scaleWithScreenSize
=
true
;
[
Range
(
0.1f
,
.
9f
)]
public
float
alphaCutoff
=
.
5f
;
public
bool
flipY
=
false
;
public
Camera
sourceCamera
;
[
HideInInspector
]
public
Camera
outlineCamera
;
Material
outline1Material
;
Material
outline2Material
;
Material
outline3Material
;
Material
outlineEraseMaterial
;
Shader
outlineShader
;
Shader
outlineBufferShader
;
[
HideInInspector
]
public
Material
outlineShaderMaterial
;
[
HideInInspector
]
public
RenderTexture
renderTexture
;
[
HideInInspector
]
public
RenderTexture
extraRenderTexture
;
CommandBuffer
commandBuffer
;
Material
GetMaterialFromID
(
int
ID
)
{
if
(
ID
==
0
)
return
outline1Material
;
else
if
(
ID
==
1
)
return
outline2Material
;
else
return
outline3Material
;
}
List
<
Material
>
materialBuffer
=
new
List
<
Material
>();
Material
CreateMaterial
(
Color
emissionColor
)
{
Material
m
=
new
Material
(
outlineBufferShader
);
m
.
SetColor
(
"_Color"
,
emissionColor
);
m
.
SetInt
(
"_SrcBlend"
,
(
int
)
UnityEngine
.
Rendering
.
BlendMode
.
SrcAlpha
);
m
.
SetInt
(
"_DstBlend"
,
(
int
)
UnityEngine
.
Rendering
.
BlendMode
.
OneMinusSrcAlpha
);
m
.
SetInt
(
"_ZWrite"
,
0
);
m
.
DisableKeyword
(
"_ALPHATEST_ON"
);
m
.
EnableKeyword
(
"_ALPHABLEND_ON"
);
m
.
DisableKeyword
(
"_ALPHAPREMULTIPLY_ON"
);
m
.
renderQueue
=
3000
;
return
m
;
}
private
void
Awake
()
{
m_instance
=
this
;
}
void
Start
()
{
CreateMaterialsIfNeeded
();
UpdateMaterialsPublicProperties
();
if
(
sourceCamera
==
null
)
{
sourceCamera
=
GetComponent
<
Camera
>();
if
(
sourceCamera
==
null
)
sourceCamera
=
Camera
.
main
;
}
if
(
outlineCamera
==
null
)
{
GameObject
cameraGameObject
=
new
GameObject
(
"Outline Camera"
);
cameraGameObject
.
transform
.
parent
=
sourceCamera
.
transform
;
outlineCamera
=
cameraGameObject
.
AddComponent
<
Camera
>();
outlineCamera
.
enabled
=
false
;
}
renderTexture
=
new
RenderTexture
(
sourceCamera
.
pixelWidth
,
sourceCamera
.
pixelHeight
,
16
,
RenderTextureFormat
.
Default
);
extraRenderTexture
=
new
RenderTexture
(
sourceCamera
.
pixelWidth
,
sourceCamera
.
pixelHeight
,
16
,
RenderTextureFormat
.
Default
);
UpdateOutlineCameraFromSource
();
commandBuffer
=
new
CommandBuffer
();
outlineCamera
.
AddCommandBuffer
(
CameraEvent
.
BeforeImageEffects
,
commandBuffer
);
}
public
void
OnPreRender
()
{
if
(
commandBuffer
==
null
)
return
;
CreateMaterialsIfNeeded
();
if
(
renderTexture
==
null
||
renderTexture
.
width
!=
sourceCamera
.
pixelWidth
||
renderTexture
.
height
!=
sourceCamera
.
pixelHeight
)
{
renderTexture
=
new
RenderTexture
(
sourceCamera
.
pixelWidth
,
sourceCamera
.
pixelHeight
,
16
,
RenderTextureFormat
.
Default
);
extraRenderTexture
=
new
RenderTexture
(
sourceCamera
.
pixelWidth
,
sourceCamera
.
pixelHeight
,
16
,
RenderTextureFormat
.
Default
);
outlineCamera
.
targetTexture
=
renderTexture
;
}
UpdateMaterialsPublicProperties
();
UpdateOutlineCameraFromSource
();
outlineCamera
.
targetTexture
=
renderTexture
;
commandBuffer
.
SetRenderTarget
(
renderTexture
);
commandBuffer
.
Clear
();
if
(
outlines
!=
null
)
{
foreach
(
Outline
outline
in
outlines
)
{
LayerMask
l
=
sourceCamera
.
cullingMask
;
if
(
outline
!=
null
&&
l
==
(
l
|
(
1
<<
outline
.
originalLayer
)))
{
for
(
int
v
=
0
;
v
<
outline
.
Renderer
.
sharedMaterials
.
Length
;
v
++)
{
Material
m
=
null
;
if
(
outline
.
Renderer
.
sharedMaterials
[
v
].
mainTexture
!=
null
&&
outline
.
Renderer
.
sharedMaterials
[
v
])
{
foreach
(
Material
g
in
materialBuffer
)
{
if
(
g
.
mainTexture
==
outline
.
Renderer
.
sharedMaterials
[
v
].
mainTexture
)
{
if
(
outline
.
eraseRenderer
&&
g
.
color
==
outlineEraseMaterial
.
color
)
m
=
g
;
else
if
(
g
.
color
==
GetMaterialFromID
(
outline
.
color
).
color
)
m
=
g
;
}
}
if
(
m
==
null
)
{
if
(
outline
.
eraseRenderer
)
m
=
new
Material
(
outlineEraseMaterial
);
else
m
=
new
Material
(
GetMaterialFromID
(
outline
.
color
));
m
.
mainTexture
=
outline
.
Renderer
.
sharedMaterials
[
v
].
mainTexture
;
materialBuffer
.
Add
(
m
);
}
}
else
{
if
(
outline
.
eraseRenderer
)
m
=
outlineEraseMaterial
;
else
m
=
GetMaterialFromID
(
outline
.
color
);
}
if
(
backfaceCulling
)
m
.
SetInt
(
"_Culling"
,
(
int
)
UnityEngine
.
Rendering
.
CullMode
.
Back
);
else
m
.
SetInt
(
"_Culling"
,
(
int
)
UnityEngine
.
Rendering
.
CullMode
.
Off
);
commandBuffer
.
DrawRenderer
(
outline
.
GetComponent
<
Renderer
>(),
m
,
0
,
0
);
MeshFilter
mL
=
outline
.
GetComponent
<
MeshFilter
>();
if
(
mL
)
{
for
(
int
i
=
1
;
i
<
mL
.
sharedMesh
.
subMeshCount
;
i
++)
commandBuffer
.
DrawRenderer
(
outline
.
GetComponent
<
Renderer
>(),
m
,
i
,
0
);
}
SkinnedMeshRenderer
sMR
=
outline
.
GetComponent
<
SkinnedMeshRenderer
>();
if
(
sMR
)
{
for
(
int
i
=
1
;
i
<
sMR
.
sharedMesh
.
subMeshCount
;
i
++)
commandBuffer
.
DrawRenderer
(
outline
.
GetComponent
<
Renderer
>(),
m
,
i
,
0
);
}
}
}
}
}
outlineCamera
.
Render
();
}
private
void
OnEnable
()
{
Outline
[]
o
=
FindObjectsOfType
<
Outline
>();
foreach
(
Outline
oL
in
o
)
{
oL
.
enabled
=
false
;
oL
.
enabled
=
true
;
}
}
void
OnDestroy
()
{
if
(
renderTexture
!=
null
)
renderTexture
.
Release
();
if
(
extraRenderTexture
!=
null
)
extraRenderTexture
.
Release
();
DestroyMaterials
();
}
void
OnRenderImage
(
RenderTexture
source
,
RenderTexture
destination
)
{
outlineShaderMaterial
.
SetTexture
(
"_OutlineSource"
,
renderTexture
);
if
(
addLinesBetweenColors
)
{
Graphics
.
Blit
(
source
,
extraRenderTexture
,
outlineShaderMaterial
,
0
);
outlineShaderMaterial
.
SetTexture
(
"_OutlineSource"
,
extraRenderTexture
);
}
Graphics
.
Blit
(
source
,
destination
,
outlineShaderMaterial
,
1
);
}
private
void
CreateMaterialsIfNeeded
()
{
if
(
outlineShader
==
null
)
outlineShader
=
Resources
.
Load
<
Shader
>(
"OutlineShader"
);
if
(
outlineBufferShader
==
null
)
{
outlineBufferShader
=
Resources
.
Load
<
Shader
>(
"OutlineBufferShader"
);
}
if
(
outlineShaderMaterial
==
null
)
{
outlineShaderMaterial
=
new
Material
(
outlineShader
);
outlineShaderMaterial
.
hideFlags
=
HideFlags
.
HideAndDontSave
;
UpdateMaterialsPublicProperties
();
}
if
(
outlineEraseMaterial
==
null
)
outlineEraseMaterial
=
CreateMaterial
(
new
Color
(
0
,
0
,
0
,
0
));
if
(
outline1Material
==
null
)
outline1Material
=
CreateMaterial
(
new
Color
(
1
,
0
,
0
,
0
));
if
(
outline2Material
==
null
)
outline2Material
=
CreateMaterial
(
new
Color
(
0
,
1
,
0
,
0
));
if
(
outline3Material
==
null
)
outline3Material
=
CreateMaterial
(
new
Color
(
0
,
0
,
1
,
0
));
}
private
void
DestroyMaterials
()
{
foreach
(
Material
m
in
materialBuffer
)
DestroyImmediate
(
m
);
materialBuffer
.
Clear
();
DestroyImmediate
(
outlineShaderMaterial
);
DestroyImmediate
(
outlineEraseMaterial
);
DestroyImmediate
(
outline1Material
);
DestroyImmediate
(
outline2Material
);
DestroyImmediate
(
outline3Material
);
outlineShader
=
null
;
outlineBufferShader
=
null
;
outlineShaderMaterial
=
null
;
outlineEraseMaterial
=
null
;
outline1Material
=
null
;
outline2Material
=
null
;
outline3Material
=
null
;
}
public
void
UpdateMaterialsPublicProperties
()
{
if
(
outlineShaderMaterial
)
{
float
scalingFactor
=
1
;
if
(
scaleWithScreenSize
)
{
// If Screen.height gets bigger, outlines gets thicker
scalingFactor
=
Screen
.
height
/
360.0f
;
}
// If scaling is too small (height less than 360 pixels), make sure you still render the outlines, but render them with 1 thickness
if
(
scaleWithScreenSize
&&
scalingFactor
<
1
)
{
if
(
UnityEngine
.
XR
.
XRSettings
.
isDeviceActive
&&
sourceCamera
.
stereoTargetEye
!=
StereoTargetEyeMask
.
None
)
{
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessX"
,
(
1
/
1000.0f
)
*
(
1.0f
/
UnityEngine
.
XR
.
XRSettings
.
eyeTextureWidth
)
*
1000.0f
);
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessY"
,
(
1
/
1000.0f
)
*
(
1.0f
/
UnityEngine
.
XR
.
XRSettings
.
eyeTextureHeight
)
*
1000.0f
);
}
else
{
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessX"
,
(
1
/
1000.0f
)
*
(
1.0f
/
Screen
.
width
)
*
1000.0f
);
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessY"
,
(
1
/
1000.0f
)
*
(
1.0f
/
Screen
.
height
)
*
1000.0f
);
}
}
else
{
if
(
UnityEngine
.
XR
.
XRSettings
.
isDeviceActive
&&
sourceCamera
.
stereoTargetEye
!=
StereoTargetEyeMask
.
None
)
{
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessX"
,
scalingFactor
*
(
lineThickness
/
1000.0f
)
*
(
1.0f
/
UnityEngine
.
XR
.
XRSettings
.
eyeTextureWidth
)
*
1000.0f
);
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessY"
,
scalingFactor
*
(
lineThickness
/
1000.0f
)
*
(
1.0f
/
UnityEngine
.
XR
.
XRSettings
.
eyeTextureHeight
)
*
1000.0f
);
}
else
{
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessX"
,
scalingFactor
*
(
lineThickness
/
1000.0f
)
*
(
1.0f
/
Screen
.
width
)
*
1000.0f
);
outlineShaderMaterial
.
SetFloat
(
"_LineThicknessY"
,
scalingFactor
*
(
lineThickness
/
1000.0f
)
*
(
1.0f
/
Screen
.
height
)
*
1000.0f
);
}
}
outlineShaderMaterial
.
SetFloat
(
"_LineIntensity"
,
lineIntensity
);
outlineShaderMaterial
.
SetFloat
(
"_FillAmount"
,
fillAmount
);
outlineShaderMaterial
.
SetColor
(
"_LineColor1"
,
lineColor0
*
lineColor0
);
outlineShaderMaterial
.
SetColor
(
"_LineColor2"
,
lineColor1
*
lineColor1
);
outlineShaderMaterial
.
SetColor
(
"_LineColor3"
,
lineColor2
*
lineColor2
);
if
(
flipY
)
outlineShaderMaterial
.
SetInt
(
"_FlipY"
,
1
);
else
outlineShaderMaterial
.
SetInt
(
"_FlipY"
,
0
);
if
(!
additiveRendering
)
outlineShaderMaterial
.
SetInt
(
"_Dark"
,
1
);
else
outlineShaderMaterial
.
SetInt
(
"_Dark"
,
0
);
if
(
cornerOutlines
)
outlineShaderMaterial
.
SetInt
(
"_CornerOutlines"
,
1
);
else
outlineShaderMaterial
.
SetInt
(
"_CornerOutlines"
,
0
);
Shader
.
SetGlobalFloat
(
"_OutlineAlphaCutoff"
,
alphaCutoff
);
}
}
void
UpdateOutlineCameraFromSource
()
{
outlineCamera
.
CopyFrom
(
sourceCamera
);
outlineCamera
.
renderingPath
=
RenderingPath
.
Forward
;
outlineCamera
.
backgroundColor
=
new
Color
(
0.0f
,
0.0f
,
0.0f
,
0.0f
);
outlineCamera
.
clearFlags
=
CameraClearFlags
.
SolidColor
;
outlineCamera
.
rect
=
new
Rect
(
0
,
0
,
1
,
1
);
outlineCamera
.
cullingMask
=
0
;
outlineCamera
.
targetTexture
=
renderTexture
;
outlineCamera
.
enabled
=
false
;
#if UNITY_5_6_OR_NEWER
outlineCamera
.
allowHDR
=
false
;
#else
outlineCamera
.
hdr
=
false
;
#endif
}
public
void
AddOutline
(
Outline
outline
)
{
if
(!
outlines
.
Contains
(
outline
))
outlines
.
Add
(
outline
);
}
public
void
RemoveOutline
(
Outline
outline
)
{
if
(
outlines
.
Contains
(
outline
))
outlines
.
Remove
(
outline
);
}
}
}
\ No newline at end of file
Assets/OutlineEffect/OutlineEffect.cs.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: a78da3f00f3328541b4526c0b0b5ec5c
timeCreated: 1487888760
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/Resources.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: 92af2f7e055854c43af673b453a765c7
folderAsset: yes
timeCreated: 1427406000
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/Resources/OutlineBufferShader.shader
0 → 100644
View file @
7f82e9a9
/*
// Copyright (c) 2015 José Guerreiro. All rights reserved.
//
// MIT license, see http://www.opensource.org/licenses/mit-license.php
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
*/
Shader
"Hidden/OutlineBufferEffect"
{
Properties
{
[
PerRendererData
]
_MainTex
(
"Sprite Texture"
,
2
D
)
=
"white"
{}
_Color
(
"Tint"
,
Color
)
=
(
1
,
1
,
1
,
1
)
[
MaterialToggle
]
PixelSnap
(
"Pixel snap"
,
Float
)
=
0
}
SubShader
{
Tags
{
"Queue"
=
"Transparent"
"IgnoreProjector"
=
"True"
"RenderType"
=
"Transparent"
"PreviewType"
=
"Plane"
"CanUseSpriteAtlas"
=
"True"
}
// Change this stuff in OutlineEffect.cs instead!
//ZWrite Off
//Blend One OneMinusSrcAlpha
Cull
[
_Culling
]
Lighting
Off
CGPROGRAM
#pragma surface surf Lambert vertex:vert nofog noshadow noambient nolightmap novertexlights noshadowmask nometa //keepalpha
#pragma multi_compile _ PIXELSNAP_ON
sampler2D
_MainTex
;
fixed4
_Color
;
float
_OutlineAlphaCutoff
;
struct
Input
{
float2
uv_MainTex
;
//fixed4 color;
};
void
vert
(
inout
appdata_full
v
,
out
Input
o
)
{
#if defined(PIXELSNAP_ON)
v
.
vertex
=
UnityPixelSnap
(
v
.
vertex
);
#endif
UNITY_INITIALIZE_OUTPUT
(
Input
,
o
);
//o.color = v.color;
}
void
surf
(
Input
IN
,
inout
SurfaceOutput
o
)
{
fixed4
c
=
tex2D
(
_MainTex
,
IN
.
uv_MainTex
);
// * IN.color;
if
(
c
.
a
<
_OutlineAlphaCutoff
)
discard
;
float
alpha
=
c
.
a
*
99999999
;
o
.
Albedo
=
_Color
*
alpha
;
o
.
Alpha
=
alpha
;
o
.
Emission
=
o
.
Albedo
;
}
ENDCG
}
Fallback
"Transparent/VertexLit"
}
Assets/OutlineEffect/Resources/OutlineBufferShader.shader.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: 17f3e80406929b64f90154b46d4f453c
timeCreated: 1427550837
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Assets/OutlineEffect/Resources/OutlineShader.shader
0 → 100644
View file @
7f82e9a9
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
/*
// Copyright (c) 2015 José Guerreiro. All rights reserved.
//
// MIT license, see http://www.opensource.org/licenses/mit-license.php
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
*/
Shader
"Hidden/OutlineEffect"
{
Properties
{
_MainTex
(
"Base (RGB)"
,
2
D
)
=
"white"
{}
}
SubShader
{
Pass
{
Tags
{
"RenderType"
=
"Opaque"
}
LOD
200
ZTest
Always
ZWrite
Off
Cull
Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#include "UnityCG.cginc"
sampler2D
_MainTex
;
float4
_MainTex_ST
;
sampler2D
_OutlineSource
;
struct
v2f
{
float4
position
:
SV_POSITION
;
float2
uv
:
TEXCOORD0
;
};
v2f
vert
(
appdata_img
v
)
{
v2f
o
;
o
.
position
=
UnityObjectToClipPos
(
v
.
vertex
);
o
.
uv
=
v
.
texcoord
;
return
o
;
}
float
_LineThicknessX
;
float
_LineThicknessY
;
int
_FlipY
;
uniform
float4
_MainTex_TexelSize
;
half4
frag
(
v2f
input
)
:
COLOR
{
float2
uv
=
input
.
uv
;
if
(
_FlipY
==
1
)
uv
.
y
=
uv
.
y
;
#if UNITY_UV_STARTS_AT_TOP
if
(
_MainTex_TexelSize
.
y
<
0
)
uv
.
y
=
1
-
uv
.
y
;
#endif
//half4 originalPixel = tex2D(_MainTex,input.uv, UnityStereoScreenSpaceUVAdjust(input.uv, _MainTex_ST));
half4
outlineSource
=
tex2D
(
_OutlineSource
,
UnityStereoScreenSpaceUVAdjust
(
uv
,
_MainTex_ST
));
const
float
h
=
.
95
f
;
half4
sample1
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
_LineThicknessX
,
0
.
0
));
half4
sample2
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
-
_LineThicknessX
,
0
.
0
));
half4
sample3
=
tex2D
(
_OutlineSource
,
uv
+
float2
(.
0
,
_LineThicknessY
));
half4
sample4
=
tex2D
(
_OutlineSource
,
uv
+
float2
(.
0
,
-
_LineThicknessY
));
bool
red
=
sample1
.
r
>
h
||
sample2
.
r
>
h
||
sample3
.
r
>
h
||
sample4
.
r
>
h
;
bool
green
=
sample1
.
g
>
h
||
sample2
.
g
>
h
||
sample3
.
g
>
h
||
sample4
.
g
>
h
;
bool
blue
=
sample1
.
b
>
h
||
sample2
.
b
>
h
||
sample3
.
b
>
h
||
sample4
.
b
>
h
;
if
((
red
&&
blue
)
||
(
green
&&
blue
)
||
(
red
&&
green
))
return
float4
(
0
,
0
,
0
,
0
);
else
return
outlineSource
;
}
ENDCG
}
Pass
{
Tags
{
"RenderType"
=
"Opaque"
}
LOD
200
ZTest
Always
ZWrite
Off
Cull
Off
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma target 3.0
#include "UnityCG.cginc"
sampler2D
_MainTex
;
float4
_MainTex_ST
;
sampler2D
_OutlineSource
;
struct
v2f
{
float4
position
:
SV_POSITION
;
float2
uv
:
TEXCOORD0
;
};
v2f
vert
(
appdata_img
v
)
{
v2f
o
;
o
.
position
=
UnityObjectToClipPos
(
v
.
vertex
);
o
.
uv
=
v
.
texcoord
;
return
o
;
}
float
_LineThicknessX
;
float
_LineThicknessY
;
float
_LineIntensity
;
half4
_LineColor1
;
half4
_LineColor2
;
half4
_LineColor3
;
int
_FlipY
;
int
_Dark
;
float
_FillAmount
;
int
_CornerOutlines
;
uniform
float4
_MainTex_TexelSize
;
half4
frag
(
v2f
input
)
:
COLOR
{
float2
uv
=
input
.
uv
;
if
(
_FlipY
==
1
)
uv
.
y
=
1
-
uv
.
y
;
#if UNITY_UV_STARTS_AT_TOP
if
(
_MainTex_TexelSize
.
y
<
0
)
uv
.
y
=
1
-
uv
.
y
;
#endif
half4
originalPixel
=
tex2D
(
_MainTex
,
UnityStereoScreenSpaceUVAdjust
(
input
.
uv
,
_MainTex_ST
));
half4
outlineSource
=
tex2D
(
_OutlineSource
,
UnityStereoScreenSpaceUVAdjust
(
uv
,
_MainTex_ST
));
const
float
h
=
.
95
f
;
half4
outline
=
0
;
bool
hasOutline
=
false
;
half4
sample1
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
_LineThicknessX
,
0
.
0
));
half4
sample2
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
-
_LineThicknessX
,
0
.
0
));
half4
sample3
=
tex2D
(
_OutlineSource
,
uv
+
float2
(.
0
,
_LineThicknessY
));
half4
sample4
=
tex2D
(
_OutlineSource
,
uv
+
float2
(.
0
,
-
_LineThicknessY
));
bool
outside
=
outlineSource
.
a
<
h
;
bool
outsideDark
=
outside
&&
_Dark
;
if
(
_CornerOutlines
)
{
// TODO: Conditional compile
half4
sample5
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
_LineThicknessX
,
_LineThicknessY
));
half4
sample6
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
-
_LineThicknessX
,
-
_LineThicknessY
));
half4
sample7
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
_LineThicknessX
,
-
_LineThicknessY
));
half4
sample8
=
tex2D
(
_OutlineSource
,
uv
+
float2
(
-
_LineThicknessX
,
_LineThicknessY
));
if
(
sample1
.
r
>
h
||
sample2
.
r
>
h
||
sample3
.
r
>
h
||
sample4
.
r
>
h
||
sample5
.
r
>
h
||
sample6
.
r
>
h
||
sample7
.
r
>
h
||
sample8
.
r
>
h
)
{
outline
=
_LineColor1
*
_LineIntensity
*
_LineColor1
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor1
.
a
;
hasOutline
=
true
;
}
else
if
(
sample1
.
g
>
h
||
sample2
.
g
>
h
||
sample3
.
g
>
h
||
sample4
.
g
>
h
||
sample5
.
g
>
h
||
sample6
.
g
>
h
||
sample7
.
g
>
h
||
sample8
.
g
>
h
)
{
outline
=
_LineColor2
*
_LineIntensity
*
_LineColor2
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor2
.
a
;
hasOutline
=
true
;
}
else
if
(
sample1
.
b
>
h
||
sample2
.
b
>
h
||
sample3
.
b
>
h
||
sample4
.
b
>
h
||
sample5
.
b
>
h
||
sample6
.
b
>
h
||
sample7
.
b
>
h
||
sample8
.
b
>
h
)
{
outline
=
_LineColor3
*
_LineIntensity
*
_LineColor3
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor3
.
a
;
hasOutline
=
true
;
}
if
(
!
outside
)
outline
*=
_FillAmount
;
}
else
{
if
(
sample1
.
r
>
h
||
sample2
.
r
>
h
||
sample3
.
r
>
h
||
sample4
.
r
>
h
)
{
outline
=
_LineColor1
*
_LineIntensity
*
_LineColor1
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor1
.
a
;
hasOutline
=
true
;
}
else
if
(
sample1
.
g
>
h
||
sample2
.
g
>
h
||
sample3
.
g
>
h
||
sample4
.
g
>
h
)
{
outline
=
_LineColor2
*
_LineIntensity
*
_LineColor2
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor2
.
a
;
hasOutline
=
true
;
}
else
if
(
sample1
.
b
>
h
||
sample2
.
b
>
h
||
sample3
.
b
>
h
||
sample4
.
b
>
h
)
{
outline
=
_LineColor3
*
_LineIntensity
*
_LineColor3
.
a
;
if
(
outsideDark
)
originalPixel
*=
1
-
_LineColor3
.
a
;
hasOutline
=
true
;
}
if
(
!
outside
)
outline
*=
_FillAmount
;
}
//return outlineSource;
if
(
hasOutline
)
return
lerp
(
originalPixel
+
outline
,
outline
,
_FillAmount
);
else
return
originalPixel
;
}
ENDCG
}
}
FallBack
"Diffuse"
}
\ No newline at end of file
Assets/OutlineEffect/Resources/OutlineShader.shader.meta
0 → 100644
View file @
7f82e9a9
fileFormatVersion: 2
guid: 3c30d1a2a85b9d4499dfc9ebea9ade8b
timeCreated: 1427406003
licenseType: Store
ShaderImporter:
defaultTextures: []
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/MapObjects/mirror.prefab
View file @
7f82e9a9
...
...
@@ -14,9 +14,10 @@ GameObject:
-
component
:
{
fileID
:
2694312363380670797
}
-
component
:
{
fileID
:
7225251243996645269
}
-
component
:
{
fileID
:
17874052963739924
}
-
component
:
{
fileID
:
8506389964569478669
}
m_Layer
:
9
m_Name
:
mirror
m_TagString
:
wall
m_TagString
:
Mirror
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
...
...
@@ -131,6 +132,22 @@ MonoBehaviour:
type
:
2
scatteredMirror
:
{
fileID
:
5067960725721402673
,
guid
:
05802e44cda3ff549a5ed7f4291ea9b8
,
type
:
3
}
---
!u!114
&8506389964569478669
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1244481854748732982
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
---
!u!1
&5218482813292233953
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -216,6 +233,16 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
1244481854748242454
}
m_Modifications
:
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Layer
value
:
11
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -281,16 +308,6 @@ PrefabInstance:
propertyPath
:
m_LocalScale.z
value
:
0.9
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Layer
value
:
11
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
TextureSize
...
...
@@ -331,6 +348,16 @@ PrefabInstance:
m_Modification
:
m_TransformParent
:
{
fileID
:
1244481854748242454
}
m_Modifications
:
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror (1)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Layer
value
:
11
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601805655926
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
@@ -396,16 +423,6 @@ PrefabInstance:
propertyPath
:
m_LocalScale.z
value
:
0.9
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Name
value
:
Mirror (1)
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601806148718
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
m_Layer
value
:
11
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
propertyPath
:
TextureSize
...
...
Assets/Prefabs/MapObjects/wall.prefab
View file @
7f82e9a9
...
...
@@ -14,6 +14,7 @@ GameObject:
-
component
:
{
fileID
:
5992419591198202452
}
-
component
:
{
fileID
:
1788580750165913660
}
-
component
:
{
fileID
:
2953616027608884528
}
-
component
:
{
fileID
:
-2954462191445861457
}
m_Layer
:
9
m_Name
:
wall
m_TagString
:
wall
...
...
@@ -127,3 +128,19 @@ MonoBehaviour:
type
:
1
scatteredWall
:
{
fileID
:
6821036335413188318
,
guid
:
d698ba4b8908f6a43b45d3a4f076ef4a
,
type
:
3
}
---
!u!114
&-2954462191445861457
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
337530617404887312
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
Assets/Prefabs/Objects/Mannequin/mannequin (4).prefab
View file @
7f82e9a9
...
...
@@ -43,6 +43,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
6169104080419485410
}
-
component
:
{
fileID
:
6169104080406308834
}
-
component
:
{
fileID
:
3442017518488906420
}
m_Layer
:
0
m_Name
:
Head
10
m_TagString
:
Untagged
...
...
@@ -168,6 +169,22 @@ SkinnedMeshRenderer:
m_Center
:
{
x
:
-0.0006027669
,
y
:
0.73344266
,
z
:
-0.0011007041
}
m_Extent
:
{
x
:
0.12965965
,
y
:
0.16143739
,
z
:
0.15534574
}
m_DirtyAABB
:
0
---
!u!114
&3442017518488906420
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6169104080419908226
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
---
!u!1
&6169104080419908228
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -673,6 +690,7 @@ GameObject:
m_Component
:
-
component
:
{
fileID
:
6169104080419485316
}
-
component
:
{
fileID
:
6169104080406308832
}
-
component
:
{
fileID
:
2912554426625779174
}
m_Layer
:
0
m_Name
:
MA Body
3
m_TagString
:
Untagged
...
...
@@ -798,6 +816,22 @@ SkinnedMeshRenderer:
m_Center
:
{
x
:
0.0001936853
,
y
:
-0.107884735
,
z
:
0.009609431
}
m_Extent
:
{
x
:
0.4251765
,
y
:
0.7837032
,
z
:
0.17168963
}
m_DirtyAABB
:
0
---
!u!114
&2912554426625779174
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6169104080419908260
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
---
!u!1
&6169104080419908262
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -882,7 +916,7 @@ GameObject:
-
component
:
{
fileID
:
5008880329460952899
}
m_Layer
:
0
m_Name
:
mannequin (4)
m_TagString
:
Untagged
m_TagString
:
Mannequin
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
...
...
Assets/Prefabs/Objects/camera.prefab
View file @
7f82e9a9
...
...
@@ -663,6 +663,7 @@ GameObject:
-
component
:
{
fileID
:
6001025753464593561
}
-
component
:
{
fileID
:
6001025753461693625
}
-
component
:
{
fileID
:
6001025753462824569
}
-
component
:
{
fileID
:
3396112973507563797
}
m_Layer
:
0
m_Name
:
upside
m_TagString
:
Untagged
...
...
@@ -730,6 +731,22 @@ MeshRenderer:
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!114
&3396112973507563797
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6001025753464815801
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
---
!u!1
&6001025753464815805
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -745,7 +762,7 @@ GameObject:
-
component
:
{
fileID
:
1176797860003478902
}
m_Layer
:
0
m_Name
:
camera
m_TagString
:
Untagged
m_TagString
:
CameraTurret
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
...
...
@@ -850,6 +867,7 @@ GameObject:
-
component
:
{
fileID
:
6001025753464593567
}
-
component
:
{
fileID
:
6001025753461693631
}
-
component
:
{
fileID
:
6001025753462824575
}
-
component
:
{
fileID
:
5927633943100064721
}
m_Layer
:
0
m_Name
:
downside
m_TagString
:
Untagged
...
...
@@ -918,6 +936,22 @@ MeshRenderer:
m_SortingLayerID
:
0
m_SortingLayer
:
0
m_SortingOrder
:
0
---
!u!114
&5927633943100064721
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6001025753464815807
}
m_Enabled
:
0
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
fbf3575480402db40813e763382412fb
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
color
:
0
eraseRenderer
:
0
originalLayer
:
0
originalMaterials
:
[]
---
!u!1
&6610984226017906805
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Objects/case.prefab
View file @
7f82e9a9
...
...
@@ -92,7 +92,7 @@ GameObject:
-
component
:
{
fileID
:
-4559840392902712278
}
m_Layer
:
13
m_Name
:
case
m_TagString
:
floor
m_TagString
:
briefcase
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
...
...
Assets/Scenes/PlayStage.unity
View file @
7f82e9a9
...
...
@@ -386,7 +386,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!224
&238561069
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -405,10 +405,10 @@ RectTransform:
m_Father
:
{
fileID
:
158856772
}
m_RootOrder
:
4
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
,
y
:
0
}
m_SizeDelta
:
{
x
:
550
,
y
:
30
0
}
m_AnchorMin
:
{
x
:
0.5
,
y
:
0
}
m_AnchorMax
:
{
x
:
0.5
,
y
:
0
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
75
}
m_SizeDelta
:
{
x
:
1920
,
y
:
15
0
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&238561070
MonoBehaviour
:
...
...
@@ -483,7 +483,7 @@ 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
:
180
,
y
:
-6
0
}
m_AnchoredPosition
:
{
x
:
885
,
y
:
0
}
m_SizeDelta
:
{
x
:
150
,
y
:
150
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&256306797
...
...
@@ -658,6 +658,41 @@ CanvasRenderer:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
342512061
}
m_CullTransparentMesh
:
0
---
!u!84
&447253776
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&448150607
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -719,6 +754,7 @@ GameObject:
-
component
:
{
fileID
:
534669903
}
-
component
:
{
fileID
:
534669906
}
-
component
:
{
fileID
:
534669907
}
-
component
:
{
fileID
:
534669908
}
m_Layer
:
0
m_Name
:
Main Camera
m_TagString
:
MainCamera
...
...
@@ -787,7 +823,8 @@ Transform:
m_LocalRotation
:
{
x
:
0.23911765
,
y
:
0.3696438
,
z
:
-0.09904577
,
w
:
0.89239913
}
m_LocalPosition
:
{
x
:
-12
,
y
:
10
,
z
:
-12
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Children
:
-
{
fileID
:
1548020011
}
m_Father
:
{
fileID
:
0
}
m_RootOrder
:
4
m_LocalEulerAnglesHint
:
{
x
:
30
,
y
:
45
,
z
:
0
}
...
...
@@ -822,7 +859,7 @@ MonoBehaviour:
serializedVersion
:
2
m_Bits
:
1024
stopNaNPropagation
:
1
finalBlitToCameraTarget
:
1
finalBlitToCameraTarget
:
0
antialiasingMode
:
1
temporalAntialiasing
:
jitterSpread
:
0.75
...
...
@@ -865,6 +902,36 @@ MonoBehaviour:
m_BeforeTransparentBundles
:
[]
m_BeforeStackBundles
:
[]
m_AfterStackBundles
:
[]
---
!u!114
&534669908
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
534669902
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
a78da3f00f3328541b4526c0b0b5ec5c
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
lineThickness
:
1.25
lineIntensity
:
0.5
fillAmount
:
0.01
lineColor0
:
{
r
:
0
,
g
:
0.745283
,
b
:
0.2808248
,
a
:
1
}
lineColor1
:
{
r
:
0
,
g
:
1
,
b
:
0
,
a
:
1
}
lineColor2
:
{
r
:
0
,
g
:
0
,
b
:
1
,
a
:
1
}
additiveRendering
:
0
backfaceCulling
:
1
cornerOutlines
:
0
addLinesBetweenColors
:
0
scaleWithScreenSize
:
1
alphaCutoff
:
0.5
flipY
:
0
sourceCamera
:
{
fileID
:
534669904
}
outlineCamera
:
{
fileID
:
1548020010
}
outlineShaderMaterial
:
{
fileID
:
0
}
renderTexture
:
{
fileID
:
855292323
}
extraRenderTexture
:
{
fileID
:
447253776
}
---
!u!1
&666076611
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -900,7 +967,7 @@ 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
,
y
:
-6
0
}
m_AnchoredPosition
:
{
x
:
-885
,
y
:
0
}
m_SizeDelta
:
{
x
:
150
,
y
:
150
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&666076613
...
...
@@ -1031,7 +1098,7 @@ 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
:
-
180
,
y
:
-6
0
}
m_AnchoredPosition
:
{
x
:
-
735
,
y
:
0
}
m_SizeDelta
:
{
x
:
150
,
y
:
150
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&770981481
...
...
@@ -1201,6 +1268,41 @@ RectTransform:
m_AnchoredPosition
:
{
x
:
895
,
y
:
-490
}
m_SizeDelta
:
{
x
:
100
,
y
:
60
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!84
&855292323
RenderTexture
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_Name
:
m_ImageContentsHash
:
serializedVersion
:
2
Hash
:
00000000000000000000000000000000
m_ForcedFallbackFormat
:
4
m_DownscaleFallback
:
0
serializedVersion
:
3
m_Width
:
1920
m_Height
:
1080
m_AntiAliasing
:
1
m_MipCount
:
-1
m_DepthFormat
:
1
m_ColorFormat
:
4
m_MipMap
:
0
m_GenerateMips
:
1
m_SRGB
:
1
m_UseDynamicScale
:
0
m_BindMS
:
0
m_EnableCompatibleFormat
:
1
m_TextureSettings
:
serializedVersion
:
2
m_FilterMode
:
1
m_Aniso
:
1
m_MipBias
:
0
m_WrapU
:
1
m_WrapV
:
1
m_WrapW
:
1
m_Dimension
:
2
m_VolumeDepth
:
1
---
!u!1
&1015578410
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1350,7 +1452,7 @@ 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
,
y
:
76
}
m_AnchoredPosition
:
{
x
:
0
,
y
:
0
}
m_SizeDelta
:
{
x
:
510
,
y
:
100
}
m_Pivot
:
{
x
:
0.5
,
y
:
0.5
}
---
!u!114
&1516940102
...
...
@@ -1470,6 +1572,80 @@ CanvasRenderer:
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1547091489
}
m_CullTransparentMesh
:
0
---
!u!1
&1548020009
GameObject
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
serializedVersion
:
6
m_Component
:
-
component
:
{
fileID
:
1548020011
}
-
component
:
{
fileID
:
1548020010
}
m_Layer
:
0
m_Name
:
Outline Camera
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
---
!u!20
&1548020010
Camera
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1548020009
}
m_Enabled
:
0
serializedVersion
:
2
m_ClearFlags
:
2
m_BackGroundColor
:
{
r
:
0
,
g
:
0
,
b
:
0
,
a
:
0
}
m_projectionMatrixMode
:
1
m_GateFitMode
:
2
m_FOVAxisMode
:
0
m_SensorSize
:
{
x
:
36
,
y
:
24
}
m_LensShift
:
{
x
:
0
,
y
:
0
}
m_FocalLength
:
50
m_NormalizedViewPortRect
:
serializedVersion
:
2
x
:
0
y
:
0
width
:
1
height
:
1
near clip plane
:
0.01
far clip plane
:
1000
field of view
:
40
orthographic
:
0
orthographic size
:
5
m_Depth
:
-1
m_CullingMask
:
serializedVersion
:
2
m_Bits
:
0
m_RenderingPath
:
1
m_TargetTexture
:
{
fileID
:
855292323
}
m_TargetDisplay
:
0
m_TargetEye
:
3
m_HDR
:
0
m_AllowMSAA
:
1
m_AllowDynamicResolution
:
0
m_ForceIntoRT
:
0
m_OcclusionCulling
:
1
m_StereoConvergence
:
10
m_StereoSeparation
:
0.022
---
!u!4
&1548020011
Transform
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
1548020009
}
m_LocalRotation
:
{
x
:
-0
,
y
:
-0
,
z
:
-0
,
w
:
1
}
m_LocalPosition
:
{
x
:
0
,
y
:
0
,
z
:
0
}
m_LocalScale
:
{
x
:
1
,
y
:
1
,
z
:
1
}
m_Children
:
[]
m_Father
:
{
fileID
:
534669905
}
m_RootOrder
:
0
m_LocalEulerAnglesHint
:
{
x
:
0
,
y
:
0
,
z
:
0
}
---
!u!1
&1607829337
GameObject
:
m_ObjectHideFlags
:
0
...
...
@@ -1655,7 +1831,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&1839944656
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1975,6 +2151,16 @@ PrefabInstance:
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
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2122327709
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
uiGenerator
value
:
...
...
@@ -2007,16 +2193,10 @@ PrefabInstance:
propertyPath
:
clearUINextText
value
:
objectReference
:
{
fileID
:
1463021450
}
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_Name
value
:
GameManager
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
52444459818764334
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_IsActive
value
:
1
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
2122327709
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
buttonUIs
value
:
objectReference
:
{
fileID
:
1607829337
}
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
m_LocalPosition.x
...
...
Assets/Scenes/SelectStage.unity
View file @
7f82e9a9
...
...
@@ -480,12 +480,12 @@ PrefabInstance:
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryCounts.Array.size
value
:
3
value
:
4
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryTitles.Array.size
value
:
3
value
:
4
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
...
...
@@ -502,5 +502,30 @@ PrefabInstance:
propertyPath
:
categoryCounts.Array.data[2]
value
:
5
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryCounts.Array.data[3]
value
:
5
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryTitles.Array.data[3]
value
:
V. HARD
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryTitles.Array.data[0]
value
:
EASY
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryTitles.Array.data[1]
value
:
NORMAL
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5996849666618765155
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
propertyPath
:
categoryTitles.Array.data[2]
value
:
HARD
objectReference
:
{
fileID
:
0
}
m_RemovedComponents
:
[]
m_SourcePrefab
:
{
fileID
:
100100000
,
guid
:
8115fd4d1a1025b4fb05e45fc5fa6578
,
type
:
3
}
Assets/Scripts/Managers/GameManager.cs
View file @
7f82e9a9
...
...
@@ -19,6 +19,7 @@ public class GameManager : SingletonBehaviour<GameManager>
public
CommentUIGenerator
commentUIGenerator
;
public
Image
whiteout
;
public
GameObject
clearUI
;
public
GameObject
buttonUIs
;
public
Text
clearUINextText
;
[
Header
(
"Stage Data"
)]
...
...
@@ -88,11 +89,15 @@ public class GameManager : SingletonBehaviour<GameManager>
}
public
IEnumerator
ClearStage
()
{
yield
return
new
WaitForSeconds
(
0.1f
);
if
(
clearCounter
==
0
)
{
if
(
isPlayerShooting
)
yield
return
StartCoroutine
(
Camera
.
main
.
gameObject
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
PlayerController
.
inst
.
currentPlayer
));
yield
return
null
;
clearUINextText
.
text
=
StageSelector
.
nextStage
.
Replace
(
"_"
,
" - "
);
clearUI
.
SetActive
(
true
);
buttonUIs
.
SetActive
(
false
);
Debug
.
Log
(
"Stage Clear!"
);
Cursor
.
visible
=
true
;
...
...
@@ -101,6 +106,7 @@ public class GameManager : SingletonBehaviour<GameManager>
isGameOver
=
true
;
StageSelector
.
inst
.
SaveClearData
(
stageStrIdx
,
true
);
}
}
public
void
GameOver
(
bool
onlyRestart
=
false
)
{
...
...
@@ -128,7 +134,16 @@ public class GameManager : SingletonBehaviour<GameManager>
public
void
LoadNextStage
()
{
StageSelector
.
selectedStage
=
StageSelector
.
nextStage
;
StageSelector
.
nextStage
=
(
StageSelector
.
inst
.
stageIdxs
.
Count
>
StageSelector
.
inst
.
stageIdx
+
1
)
?
StageSelector
.
inst
.
stageIdxs
[
StageSelector
.
inst
.
stageIdx
+
1
]
:
"0-0"
;
if
(
StageSelector
.
inst
.
stageIdxs
.
Count
>
StageSelector
.
inst
.
stageIdx
+
1
)
{
StageSelector
.
nextStage
=
StageSelector
.
inst
.
stageIdxs
[
StageSelector
.
inst
.
stageIdx
+
1
];
StageSelector
.
inst
.
stageIdx
++;
}
else
{
StageSelector
.
nextStage
=
"1_1"
;
StageSelector
.
inst
.
stageIdx
=
0
;
}
StartCoroutine
(
RestartStage
());
}
...
...
Assets/Scripts/Map/ClearCondition.cs
View file @
7f82e9a9
...
...
@@ -28,7 +28,7 @@ public class ClearCondition
{
GameManager
.
inst
.
clearCounter
--;
isDone
=
true
;
//Debug.Log(GameManager.inst.clearCounter)
;
//Debug.Log(GameManager.inst.clearCounter)
if
(
GameManager
.
inst
.
clearCounter
==
0
)
GameManager
.
inst
.
StartCoroutine
(
GameManager
.
inst
.
ClearStage
());
}
...
...
Assets/Scripts/Player.cs
View file @
7f82e9a9
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine.AI
;
using
cakeslice
;
public
class
Player
:
MonoBehaviour
{
...
...
@@ -23,8 +24,10 @@ public class Player : MonoBehaviour
public
GameObject
selectPointer
;
public
VLight
aimLight
;
public
bool
canShoot
=
false
;
private
GameObject
currentBullet
;
private
float
lastShoot
;
private
Collider
beforeRay
=
null
;
/// <summary>
/// Set this player as the current player.
...
...
@@ -47,6 +50,7 @@ public class Player : MonoBehaviour
GetComponent
<
NavMeshAgent
>().
enabled
=
false
;
GetComponent
<
NavMeshObstacle
>().
enabled
=
true
;
selectPointer
.
SetActive
(
false
);
OffAllOutline
();
StartCoroutine
(
MapManager
.
inst
.
Rebaker
());
PlayerController
.
inst
.
currentPlayer
=
null
;
}
...
...
@@ -127,6 +131,7 @@ public class Player : MonoBehaviour
public
void
Shoot
(
BulletCode
bulletCode
)
{
OffAllOutline
();
Bullet
newBullet
=
MapManager
.
inst
.
bulletFactory
.
MakeBullet
(
bulletCode
);
newBullet
.
transform
.
position
=
shootingFinger
.
transform
.
position
;
newBullet
.
transform
.
LookAt
(
shootingArm
.
transform
.
forward
+
newBullet
.
transform
.
position
);
...
...
@@ -138,6 +143,39 @@ public class Player : MonoBehaviour
lastShoot
=
Time
.
time
;
anim
.
SetTrigger
(
"shoot"
);
}
public
void
OffAllOutline
()
{
canShoot
=
false
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
red
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
red
;
if
(
beforeRay
!=
null
)
{
if
(
beforeRay
.
tag
.
Equals
(
"wall"
))
{
beforeRay
.
GetComponent
<
Outline
>().
enabled
=
false
;
}
else
if
(
beforeRay
.
tag
.
Equals
(
"Mirror"
))
{
beforeRay
.
GetComponent
<
Outline
>().
enabled
=
false
;
}
else
if
(
beforeRay
.
tag
.
Equals
(
"CameraTurret"
))
{
foreach
(
var
comp
in
beforeRay
.
GetComponentsInChildren
<
Outline
>())
{
comp
.
enabled
=
false
;
}
}
else
if
(
beforeRay
.
tag
.
Equals
(
"Mannequin"
))
{
foreach
(
var
comp
in
beforeRay
.
GetComponentsInChildren
<
Outline
>())
{
comp
.
enabled
=
false
;
}
}
beforeRay
=
null
;
}
}
// Start is called before the first frame update
void
Start
()
{
...
...
@@ -152,7 +190,86 @@ public class Player : MonoBehaviour
{
laser
.
transform
.
position
=
shootingFinger
.
transform
.
position
;
if
(
currentBullet
==
null
&&
lastShoot
+
1f
<
Time
.
time
)
laser
.
SetActive
(
true
);
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
int
layerMask
=
(-
1
)
-
(
1
<<
LayerMask
.
NameToLayer
(
"Scattered"
));
RaycastHit
hit
;
bool
isHit
=
Physics
.
Raycast
(
mouseRay
,
out
hit
,
float
.
MaxValue
,
layerMask
);
if
(
isHit
&&
PlayerController
.
inst
.
bulletList
.
Count
>
0
&&
beforeRay
!=
hit
.
collider
)
{
OffAllOutline
();
beforeRay
=
hit
.
collider
;
if
(
PlayerController
.
inst
.
bulletList
[
0
]
==
BulletCode
.
True
)
{
if
(
beforeRay
.
tag
.
Equals
(
"Mirror"
))
{
beforeRay
.
GetComponent
<
Outline
>().
enabled
=
true
;
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
else
if
(
beforeRay
.
tag
.
Equals
(
"CameraTurret"
))
{
foreach
(
var
comp
in
beforeRay
.
GetComponentsInChildren
<
Outline
>())
{
comp
.
enabled
=
true
;
}
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
else
if
(
beforeRay
.
tag
.
Equals
(
"Mannequin"
)
&&
beforeRay
.
GetComponent
<
Mannequin
>().
isWhite
==
false
)
{
foreach
(
var
comp
in
beforeRay
.
GetComponentsInChildren
<
Outline
>())
{
comp
.
enabled
=
true
;
}
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
}
else
if
(
PlayerController
.
inst
.
bulletList
[
0
]
==
BulletCode
.
False
)
{
if
(
beforeRay
.
tag
.
Equals
(
"Mirror"
))
{
beforeRay
.
GetComponent
<
Outline
>().
enabled
=
true
;
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
else
if
(
beforeRay
.
tag
.
Equals
(
"Mannequin"
)
&&
beforeRay
.
GetComponent
<
Mannequin
>().
isWhite
==
true
)
{
foreach
(
var
comp
in
beforeRay
.
GetComponentsInChildren
<
Outline
>())
{
comp
.
enabled
=
true
;
}
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
}
else
if
(
PlayerController
.
inst
.
bulletList
[
0
]
==
BulletCode
.
Mirror
)
{
if
(
beforeRay
.
tag
.
Equals
(
"wall"
))
{
beforeRay
.
GetComponent
<
Outline
>().
enabled
=
true
;
canShoot
=
true
;
laser
.
GetComponent
<
LineRenderer
>().
startColor
=
Color
.
green
;
laser
.
GetComponent
<
LineRenderer
>().
endColor
=
Color
.
green
;
}
}
}
else
if
(!
isHit
)
{
OffAllOutline
();
beforeRay
=
null
;
}
}
else
if
(
laser
.
activeSelf
)
{
OffAllOutline
();
laser
.
SetActive
(
false
);
}
else
if
(
laser
.
activeSelf
)
laser
.
SetActive
(
false
);
}
}
Assets/Scripts/PlayerController.cs
View file @
7f82e9a9
...
...
@@ -195,7 +195,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
}
else
if
(
GameManager
.
inst
.
isPlayerShooting
&&
currentPlayer
.
laser
.
activeSelf
)
{
if
(
bulletList
.
Count
>
0
)
if
(
bulletList
.
Count
>
0
&&
currentPlayer
.
canShoot
)
{
currentPlayer
.
Shoot
(
bulletList
[
0
]);
}
...
...
@@ -210,6 +210,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
else
if
(
Input
.
GetMouseButtonDown
(
1
)
&&
GameManager
.
inst
.
isPlayerShooting
)
{
StartCoroutine
(
Camera
.
main
.
GetComponent
<
CameraController
>().
ZoomOutFromPlayer
(
currentPlayer
));
currentPlayer
.
OffAllOutline
();
currentPlayer
.
shootingArm
.
rotation
=
currentPlayer
.
armRotation
;
}
}
...
...
Assets/Scripts/StageSelector.cs
View file @
7f82e9a9
...
...
@@ -54,9 +54,9 @@ public class StageSelector : SingletonBehaviour<StageSelector>
var
uiText
=
uiInst
.
GetComponentInChildren
<
Text
>();
string
uiStage
=
(
i
+
1
)
+
"_"
+
(
j
+
1
);
stageIdxs
.
Add
(
uiStage
);
string
nextStage
=
(
j
+
1
<
categoryCounts
[
i
])
?
((
i
+
1
)
+
"_"
+
(
j
+
2
))
:
((
i
+
2
)
+
"_0"
);
uiInst
.
GetComponent
<
Button
>().
onClick
.
AddListener
(()
=>
StartSelectedStage
(
uiStage
,
nextStage
,
stageIdxCounter
))
;
stageIdxCounter
++
;
string
nextStage
=
(
j
<
categoryCounts
[
i
])
?
((
i
+
1
)
+
"_"
+
(
j
+
2
))
:
((
i
+
2
)
+
"_0"
);
int
_stageidx
=
stageIdxCounter
++
;
uiInst
.
GetComponent
<
Button
>().
onClick
.
AddListener
(()
=>
StartSelectedStage
(
uiStage
,
nextStage
,
_stageidx
))
;
uiInst
.
transform
.
localPosition
=
generatePoint
;
uiText
.
text
=
(
j
+
1
).
ToString
();
if
(
playerData
.
isCleared
.
ContainsKey
(
uiStage
)
&&
playerData
.
isCleared
[
uiStage
])
...
...
ProjectSettings/TagManager.asset
View file @
7f82e9a9
...
...
@@ -9,6 +9,9 @@ TagManager:
-
wallSign
-
briefcase
-
CameraLight
-
CameraTurret
-
Mannequin
-
Mirror
layers
:
-
Default
-
TransparentFX
...
...
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