Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
860 changes: 194 additions & 666 deletions Assets/Prefabs/GameCam/CMCameraPrefab.prefab

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Assets/Scenes/BossRoom.unity
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Scenes/BossRoom/DungeonBossRoom.unity
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Scenes/BossRoom/DungeonEntrance.unity
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Scenes/BossRoom/DungeonTransition.unity
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Scenes/PostGame.unity
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/Scenes/Startup.unity
Git LFS file not shown
32 changes: 21 additions & 11 deletions Assets/Scripts/CameraUtils/CameraController.cs
Original file line number Diff line number Diff line change
@@ -1,31 +1,41 @@
using Cinemachine;
using Unity.Cinemachine;
using UnityEngine;
using UnityEngine.Assertions;

namespace Unity.BossRoom.CameraUtils
{
public class CameraController : MonoBehaviour
{
private CinemachineFreeLook m_MainCamera;

const string k_CMCameraTag = "CMCamera";
void Start()
{
AttachCamera();
}

private void AttachCamera()
void AttachCamera()
{
m_MainCamera = FindAnyObjectByType<CinemachineFreeLook>();
Assert.IsNotNull(m_MainCamera, "CameraController.AttachCamera: Couldn't find gameplay freelook camera");
var cinemachineCameraGameObject = GameObject.FindGameObjectWithTag(k_CMCameraTag);
Assert.IsNotNull(cinemachineCameraGameObject);

var cinemachineCamera = cinemachineCameraGameObject.GetComponent<CinemachineCamera>();
Assert.IsNotNull(cinemachineCamera, "CameraController.AttachCamera: Couldn't find gameplay CinemachineCamera");

if (m_MainCamera)
if (cinemachineCamera != null)
{
// camera body / aim
m_MainCamera.Follow = transform;
m_MainCamera.LookAt = transform;
cinemachineCamera.Follow = transform;
cinemachineCamera.LookAt = transform;
}

var cinemachineOrbitalFollow = cinemachineCameraGameObject.GetComponent<CinemachineOrbitalFollow>();
Assert.IsNotNull(cinemachineOrbitalFollow, "CameraController.AttachCamera: Couldn't find gameplay CinemachineOrbitalFollow");

if (cinemachineOrbitalFollow != null)
{
// default rotation / zoom
m_MainCamera.m_Heading.m_Bias = 40f;
m_MainCamera.m_YAxis.Value = 0.5f;
cinemachineOrbitalFollow.HorizontalAxis.Value = 40f;
cinemachineOrbitalFollow.VerticalAxis.Value = 0.5f;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Unity.BossRoom.CameraUtils",
"rootNamespace": "",
"references": [
"Cinemachine"
"Unity.Cinemachine"
],
"includePlatforms": [],
"excludePlatforms": [],
Expand All @@ -13,4 +13,4 @@
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ public class MultiplayerServicesFacade : IDisposable, IStartable

bool m_IsTracking;

SessionEventConnectionState m_SessionEventConnectionState = SessionEventConnectionState.Unknown;

public void Start()
{
m_ServiceScope = m_ParentScope.CreateChild(builder =>
Expand Down Expand Up @@ -240,7 +238,7 @@ void SubscribeToJoinedSessionAsync()
CurrentUnitySession.StateChanged += OnSessionStateChanged;
CurrentUnitySession.Deleted += OnSessionDeleted;
CurrentUnitySession.PlayerJoined += OnPlayerJoined;
CurrentUnitySession.PlayerLeft += OnPlayerLeft;
CurrentUnitySession.PlayerHasLeft += OnPlayerHasLeft;
CurrentUnitySession.RemovedFromSession += OnRemovedFromSession;
CurrentUnitySession.PlayerPropertiesChanged += OnPlayerPropertiesChanged;
CurrentUnitySession.SessionPropertiesChanged += OnSessionPropertiesChanged;
Expand All @@ -252,7 +250,7 @@ void UnsubscribeFromJoinedSessionAsync()
CurrentUnitySession.StateChanged -= OnSessionStateChanged;
CurrentUnitySession.Deleted -= OnSessionDeleted;
CurrentUnitySession.PlayerJoined -= OnPlayerJoined;
CurrentUnitySession.PlayerLeft -= OnPlayerLeft;
CurrentUnitySession.PlayerHasLeft -= OnPlayerHasLeft;
CurrentUnitySession.RemovedFromSession -= OnRemovedFromSession;
CurrentUnitySession.PlayerPropertiesChanged -= OnPlayerPropertiesChanged;
CurrentUnitySession.SessionPropertiesChanged -= OnSessionPropertiesChanged;
Expand Down Expand Up @@ -312,9 +310,9 @@ void OnPlayerJoined(string playerId)
Debug.Log($"Player joined: {playerId}");
}

void OnPlayerLeft(string playerId)
void OnPlayerHasLeft(string playerId)
{
Debug.Log($"Player left: {playerId}");
Debug.Log($"Player has left: {playerId}");
}

void OnRemovedFromSession()
Expand Down
Git LFS file not shown
Git LFS file not shown
4 changes: 2 additions & 2 deletions Assets/UniversalRenderPipelineGlobalSettings.asset
Git LFS file not shown
21 changes: 13 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,30 @@ Additional documentation and release notes are available at [Multiplayer Documen

## [Unreleased]
### Added
* Added a welcome dialog to guide users on their first time experience
* Added a Table of Contents with helpful resources, that can be accessed from the `Tutorials > Show Tutorials` menu
* Added the Multiplayer Play Mode package v1.3.1 to the project
* Added a welcome dialog to guide users on their first time experience (#888)
* Added a Table of Contents with helpful resources, that can be accessed from the `Tutorials > Show Tutorials` menu
* Added the Multiplayer Play Mode package v1.3.1 to the project (#890)

### Changed
* Upgraded Boss Room to Netcode for GameObjects v2.0.0
* Upgraded editor version to 6000.0.25f1
* Upgraded editor version to 6000.0.25f1 and upgraded Boss Room to Netcode for GameObjects v2.0.0 (#890)
* Replaced Lobby and Relay standalone packages with the Multiplayer Services package v1.0.2 and the Sessions framework (#892)
* Upgraded editor version to 6000.0.32f1 and Multiplayer Services package to v1.1.0 (#894)
* Removed usage of ISession's deprecated PlayerLeft callback to the new PlayerHasLeft callback
* Upgraded several packages to their recommended versions (#895) They include:
* com.unity.cinemachine from v2.10.3 to v3.1.2. Camera using deprecated CinemachineFreeLook component has been re-implemented with CinemachineCamera component
* com.unity.multiplayer.playmode from v1.3.2 to v1.3.3
* com.unity.multiplayer.tools from v2.2.1 to v2.2.3
* com.unity.netcode.gameobjects from v2.0.0 to v2.1.1

### Cleanup
* Removed ParrelSync from the project
* Removed ParrelSync from the project (#890)

### Fixed
* Fix a Healer ability doesn't work (#893)
* Changed the way characters are oriented when using skills.
* Added the GetTotalDamage API to the IDamagble interface. This number is your maximum health minus your current health.
* Added the GetTotalDamage API to the IDamageable interface. This number is your maximum health minus your current health.
* Changed the way MeleeAction selects a target when there are multiple targets to collide with. The target with the highest GetTotalDamage value (mentioned above) will be selected.


## [2.5.0] - 2024-04-18

### Changed
Expand Down
28 changes: 14 additions & 14 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.ai.navigation": "2.0.4",
"com.unity.cinemachine": "2.10.1",
"com.unity.collab-proxy": "2.5.2",
"com.unity.ide.rider": "3.0.31",
"com.unity.ai.navigation": "2.0.5",
"com.unity.cinemachine": "3.1.2",
"com.unity.collab-proxy": "2.6.0",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.learn.iet-framework": "4.0.2",
"com.unity.learn.iet-framework": "4.0.3",
"com.unity.learn.iet-framework.authoring": "1.2.2",
"com.unity.memoryprofiler": "1.1.1",
"com.unity.memoryprofiler": "1.1.3",
"com.unity.multiplayer.center": "1.0.0",
"com.unity.multiplayer.playmode": "1.3.1",
"com.unity.multiplayer.tools": "2.2.1",
"com.unity.netcode.gameobjects": "2.0.0",
"com.unity.performance.profile-analyzer": "1.2.2",
"com.unity.multiplayer.playmode": "1.3.3",
"com.unity.multiplayer.tools": "2.2.3",
"com.unity.netcode.gameobjects": "2.1.1",
"com.unity.performance.profile-analyzer": "1.2.3",
"com.unity.postprocessing": "3.4.0",
"com.unity.render-pipelines.universal": "17.0.3",
"com.unity.services.authentication": "3.3.3",
"com.unity.services.multiplayer": "1.0.2",
"com.unity.services.authentication": "3.4.0",
"com.unity.services.multiplayer": "1.1.0",
"com.unity.test-framework": "1.4.5",
"com.unity.timeline": "1.8.7",
"com.unity.toolchain.macos-x86_64-linux-x86_64": "2.0.9",
"com.unity.transport": "2.3.0",
"com.unity.toolchain.macos-x86_64-linux-x86_64": "2.0.10",
"com.unity.transport": "2.4.0",
"com.unity.ugui": "2.0.0",
"jp.hadashikick.vcontainer": "1.11.0",
"com.unity.modules.accessibility": "1.0.0",
Expand Down
Loading
Loading