Commit 7e399e25 authored by 18신대성's avatar 18신대성

카메라터렛 파괴 구현

parent 4bfc9450
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:
...@@ -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}
......
...@@ -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
......
This diff is collapsed.
fileFormatVersion: 2
guid: d6c0cb697ea7bd341a7e3b0968a8a273
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
...@@ -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
......
...@@ -8,7 +8,9 @@ public class CameraTurret : MonoBehaviour, IObject, IBreakable, IPlayerInteracto ...@@ -8,7 +8,9 @@ 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"); } }
public void Init(Floor floor) [Space(15)]
public GameObject scatteredTurret;
public void Init(Floor floor)
{ {
this.floor = floor; this.floor = floor;
floor.objOnFloor = this; floor.objOnFloor = this;
...@@ -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);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class ScatteredMirror : 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);
......
...@@ -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);
......
...@@ -24,7 +24,7 @@ TagManager: ...@@ -24,7 +24,7 @@ TagManager:
- RenderTexture - RenderTexture
- Head - Head
- Briefcase - Briefcase
- - Scattered
- -
- -
- -
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment