Commit d5e411e7 authored by 18손재민's avatar 18손재민

Merge branch 'player'

# Conflicts:
#	Assets/Scripts/PlayerController.cs
parents 6c35d722 cd70ab84
This diff is collapsed.
......@@ -288,10 +288,15 @@ PrefabInstance:
propertyPath: TextureSize
value: 768
objectReference: {fileID: 0}
- target: {fileID: 5956712601794644638, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: ReflectLayers.m_Bits
value: 5943
objectReference: {fileID: 0}
- target: {fileID: 5956712601804180398, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_CullingMask.m_Bits
value: 1335
value: 5431
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cee9ce2ee605c54c957dc68c69cea90, type: 3}
......@@ -383,10 +388,15 @@ PrefabInstance:
propertyPath: TextureSize
value: 768
objectReference: {fileID: 0}
- target: {fileID: 5956712601794644638, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: ReflectLayers.m_Bits
value: 5943
objectReference: {fileID: 0}
- target: {fileID: 5956712601804180398, guid: 6cee9ce2ee605c54c957dc68c69cea90,
type: 3}
propertyPath: m_CullingMask.m_Bits
value: 1335
value: 5431
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6cee9ce2ee605c54c957dc68c69cea90, type: 3}
......
......@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 170076734}
m_IndirectSpecularColor: {r: 0.040508375, g: 0.050361775, b: 0.08322008, a: 1}
m_IndirectSpecularColor: {r: 0.040745974, g: 0.050543424, b: 0.08338426, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
......@@ -318,7 +318,7 @@ Camera:
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Bits: 3895
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
......
......@@ -77,22 +77,23 @@ public class CameraController : MonoBehaviour
rotationX = transform.eulerAngles.y;
rotationY = transform.eulerAngles.x;
PlayerController.inst.isZooming = false;
PlayerController.inst.currentPlayer.GetComponent<Animator>().SetBool("isShooting", true);
PlayerController.inst.currentPlayer.GetComponent<Player>().head.SetActive(false);
player.anim.SetBool("isShooting", true);
player.head.transform.Find("Head 19").gameObject.layer = LayerMask.NameToLayer("Head");
}
/// <summary>
/// Zoom out from player.
/// </summary>
/// <returns></returns>
public IEnumerator ZoomOutFromPlayer()
public IEnumerator ZoomOutFromPlayer(Player player)
{
float startTime = Time.time;
Vector3 posDiff = (previousPos - transform.position) / 40;
float fovDiff = (mapFov - shootingFov) / 40f;
PlayerController.inst.isZooming = true;
PlayerController.inst.currentPlayer.GetComponent<Animator>().SetBool("isShooting", false);
PlayerController.inst.currentPlayer.GetComponent<Player>().head.SetActive(true);
player.anim.SetBool("isShooting", false);
player.head.transform.Find("Head 19").gameObject.layer = LayerMask.NameToLayer("Player");
player.head.SetActive(true);
Vector3 tempAngle = new Vector3(transform.eulerAngles.x > 180 ? transform.eulerAngles.x - 360 : transform.eulerAngles.x,
transform.eulerAngles.y > 180 ? transform.eulerAngles.y - 360 : transform.eulerAngles.y,
transform.eulerAngles.z > 180 ? transform.eulerAngles.z - 360 : transform.eulerAngles.z);
......
......@@ -15,7 +15,7 @@ public class Player : MonoBehaviour
public Transform shootingArm;
public GameObject shootingFinger;
public Quaternion armRotation;
Animator anim;
public Animator anim;
public Floor currentFloor;
......
......@@ -141,7 +141,7 @@ public class PlayerController : SingletonBehaviour<PlayerController>
}
else if (Input.GetMouseButtonDown(1) && isPlayerShooting)
{
StartCoroutine(Camera.main.GetComponent<CameraController>().ZoomOutFromPlayer());
StartCoroutine(Camera.main.GetComponent<CameraController>().ZoomOutFromPlayer(currentPlayer));
currentPlayer.shootingArm.rotation = currentPlayer.armRotation;
}
}
......
......@@ -20,7 +20,7 @@ TagManager:
- Wall
- PostProcessing
- RenderTexture
-
- Head
-
-
-
......
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