public void AddCameraBeind(Vector2 posX, Vector2 posZ) { CameraBeindData ret = new CameraBeindData(posX, posZ); m_CameraBeind.Add(ret); if (m_PosCameraBeind == null && m_PosCameraRoom == null) { m_PosCameraBeind = ret; m_decal = m_FoxPlayer.transform.position - m_FoxPlayer.transform.parent.transform.position; print(m_decal); } }
private void priorityPos() { if (m_CameraBeind.Count + m_CameraPosRoom.Count == 1) { if (m_CameraBeind.Count == 1) { m_PosCameraBeind = m_CameraBeind[0] as CameraBeindData; m_PosCameraRoom = null; m_decal = m_FoxPlayer.transform.position - m_FoxPlayer.transform.parent.transform.position; print(m_decal); } else { m_PosCameraRoom = m_CameraPosRoom[0] as GameObject; m_PosCameraBeind = null; } } else { m_PosCameraRoom = null; m_PosCameraBeind = null; } }