Commit 7f097902 authored by 18손재민's avatar 18손재민

Merge branch 'bullet'

# Conflicts:
#	Assets/Scenes/ModelScene.unity
parents c2df5852 2b36b177
......@@ -9,12 +9,13 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: Mirror
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_ShaderKeywords: _ALPHAPREMULTIPLY_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
m_CustomRenderQueue: 3000
stringTagMap:
RenderType: Transparent
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
......@@ -59,19 +60,19 @@ Material:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.95
- _Glossiness: 0.4
- _GlossyReflections: 1
- _Metallic: 0.9
- _Mode: 0
- _Metallic: 0.5
- _Mode: 3
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 0.9890261, b: 0.82547176, a: 0.11764706}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
......@@ -90,7 +90,7 @@ SphereCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7554112578236620015}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
......
......@@ -1433,6 +1433,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
head: {fileID: 3233955354714130270}
shootingArm: {fileID: 494213313239917623}
shootingFinger: {fileID: 494213313239918045}
--- !u!1 &494213313239918029
GameObject:
m_ObjectHideFlags: 0
......
......@@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 2694312363380670797}
- component: {fileID: 7225251243996645269}
- component: {fileID: 17874052963739924}
m_Layer: 9
m_Layer: 0
m_Name: mirror
m_TagString: wall
m_Icon: {fileID: 0}
......@@ -34,6 +34,7 @@ Transform:
m_Children:
- {fileID: 5893704869078864246}
- {fileID: 8860960064478022773}
- {fileID: 8140320913797834194}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
......@@ -91,7 +92,7 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1244481854748732982}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.0000005, y: 1.0000002, z: 0.080003634}
......@@ -127,6 +128,84 @@ MonoBehaviour:
mapPos: {x: 0, y: 0}
len: 1
type: 2
--- !u!1 &7934147329005783820
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8140320913797834194}
- component: {fileID: 6356281513978508605}
- component: {fileID: 1481348860575063366}
m_Layer: 9
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8140320913797834194
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7934147329005783820}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.6, z: 0}
m_LocalScale: {x: 1, y: 1, z: 0.01}
m_Children: []
m_Father: {fileID: 1244481854748242454}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6356281513978508605
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7934147329005783820}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1481348860575063366
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7934147329005783820}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 6851f27c6c7e7c94990e031ed123bed3, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1001 &243436096608247296
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -134,11 +213,6 @@ 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: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -152,7 +226,7 @@ PrefabInstance:
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.04
value: -0.01
objectReference: {fileID: 0}
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
......@@ -197,18 +271,28 @@ PrefabInstance:
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalScale.x
value: 0.9
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
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: 5956712601794644638, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: TextureSize
value: 768
objectReference: {fileID: 0}
- target: {fileID: 5956712601804180398, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_CullingMask.m_Bits
value: 1335
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cee9ce2ee605c54c957dc68c69cea90, type: 3}
--- !u!4 &5893704869078864246 stripped
......@@ -224,11 +308,6 @@ 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: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalPosition.x
......@@ -242,7 +321,7 @@ PrefabInstance:
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.04
value: 0.01
objectReference: {fileID: 0}
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
......@@ -287,18 +366,28 @@ PrefabInstance:
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_LocalScale.x
value: 0.9
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5956712601805655926, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
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: 5956712601794644638, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: TextureSize
value: 768
objectReference: {fileID: 0}
- target: {fileID: 5956712601804180398, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_CullingMask.m_Bits
value: 1335
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cee9ce2ee605c54c957dc68c69cea90, type: 3}
--- !u!4 &8860960064478022773 stripped
......
......@@ -11,8 +11,8 @@ GameObject:
- component: {fileID: 5956712601805655926}
- component: {fileID: 5956712601794644638}
- component: {fileID: 5956712601806075721}
m_Layer: 0
m_Name: Mirror
m_Layer: 11
m_Name: oneside mirror
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
......@@ -52,7 +52,7 @@ MonoBehaviour:
FarClipPlane: 100
ReflectLayers:
serializedVersion: 2
m_Bits: 4294967295
m_Bits: 1847
AddFlareLayer: 0
NormalIsForward: 1
AspectRatio: 1.5
......@@ -85,7 +85,7 @@ GameObject:
- component: {fileID: 5956712601808049896}
- component: {fileID: 5956712601794709352}
- component: {fileID: 5956712601803703382}
m_Layer: 0
m_Layer: 11
m_Name: MirrorReflection
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -165,6 +165,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
......@@ -189,7 +190,7 @@ GameObject:
- component: {fileID: 5956712601804180398}
- component: {fileID: 5956712601810028292}
- component: {fileID: 5956712601794653076}
m_Layer: 0
m_Layer: 11
m_Name: MirrorCamera
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -222,9 +223,10 @@ Camera:
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
......
......@@ -14,7 +14,7 @@ GameObject:
- component: {fileID: 5992419591198202452}
- component: {fileID: 1788580750165913660}
- component: {fileID: 2953616027608884528}
m_Layer: 9
m_Layer: 0
m_Name: wall
m_TagString: wall
m_Icon: {fileID: 0}
......@@ -68,6 +68,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
......@@ -88,7 +89,7 @@ BoxCollider:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 337530617404887312}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1.0000005, y: 1.0000002, z: 0.080003634}
......
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.040745974, g: 0.050543424, b: 0.08338426, a: 1}
m_IndirectSpecularColor: {r: 0.040508375, g: 0.050361775, b: 0.08322008, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -220,7 +220,6 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 448150610}
- component: {fileID: 448150609}
- component: {fileID: 448150608}
m_Layer: 10
m_Name: Post-process Volume
......@@ -228,7 +227,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &448150608
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -246,19 +245,6 @@ MonoBehaviour:
blendDistance: 0
weight: 1
priority: 0
--- !u!65 &448150609
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 448150607}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &448150610
Transform:
m_ObjectHideFlags: 0
......@@ -378,7 +364,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 534669902}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 948f4100a11a5c24981795d21301da5c, type: 3}
m_Name:
......
......@@ -14,6 +14,7 @@ public class TruthBullet : Bullet
{
other.GetComponent<IBulletInteractor>().Interact(this);
}
Debug.Log(other.name);
Destroy(gameObject);
}
}
......@@ -153,6 +153,37 @@ public class Map : MonoBehaviour
}
}
/// <summary>
/// Change normal wall at position to mirror.
/// </summary>
/// <param name="pos">Position of wall.</param>
public void ChangeToMirror(Vector2 pos)
{
if (((int)pos.x >= 0 ? ((int)pos.x > maxMapSize / 2) : ((int)pos.x < -maxMapSize / 2)) || ((int)pos.y >= 0 ? ((int)pos.y > maxMapSize / 2) : ((int)pos.y < -maxMapSize / 2)))
{
Debug.Log("Input size exceeds map's max size.");
return;
}
if (Mathf.Abs(pos.x * 10) % 5 != 0 || Mathf.Abs(pos.y * 10) % 5 != 0 || (Mathf.Abs(pos.x * 10) % 10 == 5 && Mathf.Abs(pos.y * 10) % 10 == 5) || (Mathf.Abs(pos.x * 10) % 10 != 5 && Mathf.Abs(pos.y * 10) % 10 != 5))
{
Debug.Log("Inappropriate position of wall.");
return;
}
if (wallGrid.ContainsKey(pos))
{
RemoveWall(pos);
wallGrid.Add(pos, Instantiate(MapManager.inst.mirror, new Vector3(pos.x, 0, pos.y), Quaternion.identity, walls.transform).GetComponent<Wall>());
wallGrid[pos].mapPos = pos;
wallGrid[pos].type = WallType.Mirror;
if (Mathf.Abs(pos.x * 10) % 10 == 5)
wallGrid[pos].transform.eulerAngles = new Vector3(0, 90, 0);
else if (Mathf.Abs(pos.y * 10) % 10 == 5)
wallGrid[pos].transform.eulerAngles = new Vector3(0, 0, 0);
StartCoroutine(MapManager.inst.Rebaker());
}
else
Debug.Log("Wall already exists at : " + pos);
}
/// <summary>
/// Remove wall at position.
/// </summary>
/// <param name="pos">Position of wall.</param>
......
......@@ -12,12 +12,7 @@ public class NormalWall : Wall, IBulletInteractor
}
else if (bullet is MirrorBullet)
{
Mirror mirror = gameObject.AddComponent<Mirror>();
GetComponent<Renderer>().material = GameManager.inst.mirrorMaterial;
mirror.mapPos = mapPos;
mirror.len = len;
mirror.type = WallType.Mirror;
Destroy(this);
MapManager.inst.currentMap.ChangeToMirror(mapPos);
}
}
}
......@@ -13,6 +13,7 @@ public class Player : MonoBehaviour
Coroutine playerArrivalCheck;
public GameObject head;
public GameObject shootingArm;
public GameObject shootingFinger;
Animator anim;
public Floor currentFloor;
......@@ -101,6 +102,7 @@ public class Player : MonoBehaviour
public void Shoot(BulletCode bulletCode)
{
Bullet newBullet = MapManager.inst.bulletFactory.MakeBullet(bulletCode);
newBullet.transform.position = shootingFinger.transform.position;
newBullet.Init(transform.forward);
}
......
......@@ -19,7 +19,7 @@ TagManager:
- Player
- Wall
- PostProcessing
-
- RenderTexture
-
-
-
......
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