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
7e399e25
Commit
7e399e25
authored
Aug 06, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
카메라터렛 파괴 구현
parent
4bfc9450
Changes
14
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
3629 additions
and
322 deletions
+3629
-322
camera_scattered.fbx
Assets/Models/camera_scattered.fbx
+0
-0
camera_scattered.fbx.meta
Assets/Models/camera_scattered.fbx.meta
+95
-0
mirror.prefab
Assets/Prefabs/MapObjects/mirror.prefab
+2
-2
mirror_scattered.prefab
Assets/Prefabs/MapObjects/mirror_scattered.prefab
+101
-101
camera.prefab
Assets/Prefabs/Objects/camera.prefab
+2
-0
camera_scattered.prefab
Assets/Prefabs/Objects/camera_scattered.prefab
+3271
-0
camera_scattered.prefab.meta
Assets/Prefabs/Objects/camera_scattered.prefab.meta
+7
-0
ModelScene.unity
Assets/Scenes/ModelScene.unity
+130
-202
PlayStage.unity
Assets/Scenes/PlayStage.unity
+11
-11
CameraTurret.cs
Assets/Scripts/Interactors/CameraTurret.cs
+4
-1
Scattered.cs
Assets/Scripts/Map/Scattered.cs
+2
-2
Scattered.cs.meta
Assets/Scripts/Map/Scattered.cs.meta
+0
-0
PlayerController.cs
Assets/Scripts/PlayerController.cs
+3
-2
TagManager.asset
ProjectSettings/TagManager.asset
+1
-1
No files found.
Assets/Models/camera_scattered.fbx
0 → 100644
View file @
7e399e25
File added
Assets/Models/camera_scattered.fbx.meta
0 → 100644
View file @
7e399e25
fileFormatVersion: 2
guid: 890eee527f56e734e8227b222686a95f
ModelImporter:
serializedVersion: 26
internalIDToNameTable: []
externalObjects: {}
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 0.2275
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 0.2275
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 0
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Prefabs/MapObjects/mirror.prefab
View file @
7e399e25
...
@@ -299,7 +299,7 @@ PrefabInstance:
...
@@ -299,7 +299,7 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
type
:
3
}
propertyPath
:
ReflectLayers.m_Bits
propertyPath
:
ReflectLayers.m_Bits
value
:
14135
value
:
30519
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
type
:
3
}
...
@@ -414,7 +414,7 @@ PrefabInstance:
...
@@ -414,7 +414,7 @@ PrefabInstance:
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
-
target
:
{
fileID
:
5956712601794644638
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
type
:
3
}
propertyPath
:
ReflectLayers.m_Bits
propertyPath
:
ReflectLayers.m_Bits
value
:
14135
value
:
30519
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
-
target
:
{
fileID
:
5956712601804180398
,
guid
:
6cee9ce2ee605c54c957dc68c69cea90
,
type
:
3
}
type
:
3
}
...
...
Assets/Prefabs/MapObjects/mirror_scattered.prefab
View file @
7e399e25
This diff is collapsed.
Click to expand it.
Assets/Prefabs/Objects/camera.prefab
View file @
7e399e25
...
@@ -807,6 +807,8 @@ MonoBehaviour:
...
@@ -807,6 +807,8 @@ MonoBehaviour:
m_Name
:
m_Name
:
m_EditorClassIdentifier
:
m_EditorClassIdentifier
:
floor
:
{
fileID
:
0
}
floor
:
{
fileID
:
0
}
scatteredTurret
:
{
fileID
:
4194399530101458971
,
guid
:
d6c0cb697ea7bd341a7e3b0968a8a273
,
type
:
3
}
---
!u!208
&7514060783340336889
---
!u!208
&7514060783340336889
NavMeshObstacle
:
NavMeshObstacle
:
m_ObjectHideFlags
:
0
m_ObjectHideFlags
:
0
...
...
Assets/Prefabs/Objects/camera_scattered.prefab
0 → 100644
View file @
7e399e25
This diff is collapsed.
Click to expand it.
Assets/Prefabs/Objects/camera_scattered.prefab.meta
0 → 100644
View file @
7e399e25
fileFormatVersion: 2
guid: d6c0cb697ea7bd341a7e3b0968a8a273
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scenes/ModelScene.unity
View file @
7e399e25
This diff is collapsed.
Click to expand it.
Assets/Scenes/PlayStage.unity
View file @
7e399e25
...
@@ -554,7 +554,7 @@ Camera:
...
@@ -554,7 +554,7 @@ Camera:
m_Depth
:
-1
m_Depth
:
-1
m_CullingMask
:
m_CullingMask
:
serializedVersion
:
2
serializedVersion
:
2
m_Bits
:
12087
m_Bits
:
28471
m_RenderingPath
:
-1
m_RenderingPath
:
-1
m_TargetTexture
:
{
fileID
:
0
}
m_TargetTexture
:
{
fileID
:
0
}
m_TargetDisplay
:
0
m_TargetDisplay
:
0
...
@@ -1344,6 +1344,16 @@ PrefabInstance:
...
@@ -1344,6 +1344,16 @@ PrefabInstance:
m_Modification
:
m_Modification
:
m_TransformParent
:
{
fileID
:
0
}
m_TransformParent
:
{
fileID
:
0
}
m_Modifications
:
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
}
-
target
:
{
fileID
:
2122327709
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
propertyPath
:
uiGenerator
propertyPath
:
uiGenerator
value
:
value
:
...
@@ -1368,16 +1378,6 @@ PrefabInstance:
...
@@ -1368,16 +1378,6 @@ PrefabInstance:
propertyPath
:
currentStage
propertyPath
:
currentStage
value
:
value
:
objectReference
:
{
fileID
:
0
}
objectReference
:
{
fileID
:
0
}
-
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
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
-
target
:
{
fileID
:
52444459818764335
,
guid
:
42247a938bb6e554eb00dc08303a72d6
,
type
:
3
}
type
:
3
}
propertyPath
:
m_LocalPosition.x
propertyPath
:
m_LocalPosition.x
...
...
Assets/Scripts/Interactors/CameraTurret.cs
View file @
7e399e25
...
@@ -8,6 +8,8 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
...
@@ -8,6 +8,8 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
private
Floor
floor
=
null
;
private
Floor
floor
=
null
;
public
Vector2Int
Position
{
get
{
return
floor
!=
null
?
floor
.
mapPos
:
throw
new
UnassignedReferenceException
(
"Floor of Interactor is not assigned"
);
}
}
public
Vector2Int
Position
{
get
{
return
floor
!=
null
?
floor
.
mapPos
:
throw
new
UnassignedReferenceException
(
"Floor of Interactor is not assigned"
);
}
}
[
Space
(
15
)]
public
GameObject
scatteredTurret
;
public
void
Init
(
Floor
floor
)
public
void
Init
(
Floor
floor
)
{
{
this
.
floor
=
floor
;
this
.
floor
=
floor
;
...
@@ -18,6 +20,7 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
...
@@ -18,6 +20,7 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto
public
void
Break
()
public
void
Break
()
{
{
Instantiate
(
scatteredTurret
,
transform
.
position
+
new
Vector3
(
0
,
0.3f
),
transform
.
rotation
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
MapManager
.
inst
.
currentMap
.
RemoveObject
(
Position
);
}
}
...
...
Assets/Scripts/Map/Scattered
Mirror
.cs
→
Assets/Scripts/Map/Scattered.cs
View file @
7e399e25
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
UnityEngine
;
using
UnityEngine
;
public
class
Scattered
Mirror
:
MonoBehaviour
public
class
Scattered
:
MonoBehaviour
{
{
// Start is called before the first frame update
// Start is called before the first frame update
void
Start
()
void
Start
()
...
@@ -16,7 +16,7 @@ public class ScatteredMirror : MonoBehaviour
...
@@ -16,7 +16,7 @@ public class ScatteredMirror : MonoBehaviour
for
(
int
i
=
100
;
i
>
0
;
i
--)
for
(
int
i
=
100
;
i
>
0
;
i
--)
{
{
Vector3
scale
=
new
Vector3
(
i
,
i
,
i
);
Vector3
scale
=
new
Vector3
(
i
,
i
,
i
);
for
(
int
j
=
0
;
j
<
100
;
j
++)
transform
.
GetChild
(
j
).
transform
.
localScale
=
scale
;
for
(
int
j
=
0
;
j
<
transform
.
childCount
;
j
++)
transform
.
GetChild
(
j
).
transform
.
localScale
=
scale
;
yield
return
new
WaitForSeconds
(
0.03f
);
yield
return
new
WaitForSeconds
(
0.03f
);
}
}
Destroy
(
gameObject
);
Destroy
(
gameObject
);
...
...
Assets/Scripts/Map/Scattered
Mirror
.cs.meta
→
Assets/Scripts/Map/Scattered.cs.meta
View file @
7e399e25
File moved
Assets/Scripts/PlayerController.cs
View file @
7e399e25
...
@@ -151,8 +151,9 @@ public class PlayerController : SingletonBehaviour<PlayerController>
...
@@ -151,8 +151,9 @@ public class PlayerController : SingletonBehaviour<PlayerController>
if
(!
GameManager
.
inst
.
isPlayerMoving
&&
!
GameManager
.
inst
.
isPlayerShooting
)
if
(!
GameManager
.
inst
.
isPlayerMoving
&&
!
GameManager
.
inst
.
isPlayerShooting
)
{
{
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
Ray
mouseRay
=
Camera
.
main
.
ScreenPointToRay
(
Input
.
mousePosition
);
int
layerMask
=
(-
1
)
-
(
1
<<
LayerMask
.
NameToLayer
(
"Scattered"
));
RaycastHit
hit
;
RaycastHit
hit
;
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"Player"
))
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
,
float
.
MaxValue
,
layerMask
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"Player"
))
{
{
if
(
currentPlayer
!=
null
)
if
(
currentPlayer
!=
null
)
currentPlayer
.
ResetCurrentPlayer
();
currentPlayer
.
ResetCurrentPlayer
();
...
@@ -161,7 +162,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
...
@@ -161,7 +162,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
StartCoroutine
(
currentPlayer
.
CountPlayerClick
(
Time
.
time
));
StartCoroutine
(
currentPlayer
.
CountPlayerClick
(
Time
.
time
));
//Debug.Log(hit.collider.gameObject.tag);
//Debug.Log(hit.collider.gameObject.tag);
}
}
else
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"floor"
))
else
if
(
Physics
.
Raycast
(
mouseRay
,
out
hit
,
float
.
MaxValue
,
layerMask
)
&&
hit
.
collider
.
gameObject
.
tag
.
Equals
(
"floor"
))
{
{
if
(
currentPlayer
!=
null
)
if
(
currentPlayer
!=
null
)
currentPlayer
.
MovePlayer
(
hit
.
collider
.
gameObject
.
transform
.
position
);
currentPlayer
.
MovePlayer
(
hit
.
collider
.
gameObject
.
transform
.
position
);
...
...
ProjectSettings/TagManager.asset
View file @
7e399e25
...
@@ -24,7 +24,7 @@ TagManager:
...
@@ -24,7 +24,7 @@ TagManager:
-
RenderTexture
-
RenderTexture
-
Head
-
Head
-
Briefcase
-
Briefcase
-
-
Scattered
-
-
-
-
-
-
...
...
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