浏览代码

Merge pull request #33 from Unity-Technologies/sfdev

taking sfdev to develop
/main
GitHub 4 年前
当前提交
758dc87d
共有 711 个文件被更改,包括 7475 次插入80 次删除
  1. 1
      .gitignore
  2. 169
      Assets/BossRoom/Prefabs/Player.prefab
  3. 3
      Assets/BossRoom/Scripts/Client/BossRoom.Client.asmdef
  4. 123
      Assets/BossRoom/Scripts/Client/ClientCharacterVisualization.cs
  5. 65
      Assets/BossRoom/Scripts/Client/ClientInputSender.cs
  6. 43
      Assets/BossRoom/Scripts/Server/ServerCharacterMovement.cs
  7. 66
      Assets/BossRoom/Scripts/Shared/NetworkCharacterState.cs
  8. 3
      Packages/manifest.json
  9. 70
      Packages/packages-lock.json
  10. 9
      ProjectSettings/DynamicsManager.asset
  11. 14
      ProjectSettings/EditorBuildSettings.asset
  12. 59
      ProjectSettings/GraphicsSettings.asset
  13. 36
      ProjectSettings/ProjectSettings.asset
  14. 7
      ProjectSettings/TagManager.asset
  15. 8
      Assets/BossRoom/Material.meta
  16. 8
      Assets/BossRoom/Models.meta
  17. 8
      Assets/BossRoom/PostProcessing.meta
  18. 8
      Assets/BossRoom/Prefabs/Character.meta
  19. 8
      Assets/BossRoom/Prefabs/Dungeon.meta
  20. 236
      Assets/BossRoom/Prefabs/Enemy.prefab
  21. 7
      Assets/BossRoom/Prefabs/Enemy.prefab.meta
  22. 8
      Assets/BossRoom/Prefabs/GameCam.meta
  23. 1001
      Assets/BossRoom/Prefabs/Imp.prefab
  24. 7
      Assets/BossRoom/Prefabs/Imp.prefab.meta
  25. 149
      Assets/BossRoom/Prefabs/NetworkingManager.prefab
  26. 7
      Assets/BossRoom/Prefabs/NetworkingManager.prefab.meta
  27. 8
      Assets/BossRoom/Prefabs/State.meta
  28. 707
      Assets/BossRoom/Scenes/CharSelect.unity
  29. 7
      Assets/BossRoom/Scenes/CharSelect.unity.meta
  30. 1001
      Assets/BossRoom/Scenes/Dungeon.unity
  31. 7
      Assets/BossRoom/Scenes/Dungeon.unity.meta
  32. 8
      Assets/BossRoom/Scenes/DungeonTest.meta
  33. 1001
      Assets/BossRoom/Scenes/DungeonTest.unity
  34. 7
      Assets/BossRoom/Scenes/DungeonTest.unity.meta
  35. 1001
      Assets/BossRoom/Scenes/MainMenu.unity
  36. 7
      Assets/BossRoom/Scenes/MainMenu.unity.meta
  37. 8
      Assets/BossRoom/Scripts/Client/Game.meta
  38. 8
      Assets/BossRoom/Scripts/Client/Net.meta
  39. 8
      Assets/BossRoom/Scripts/Client/UI.meta
  40. 8
      Assets/BossRoom/Scripts/Development/dgtest.meta
  41. 8
      Assets/BossRoom/Scripts/Server/Game.meta
  42. 8
      Assets/BossRoom/Scripts/Server/Net.meta
  43. 8
      Assets/BossRoom/Scripts/Shared/Game.meta
  44. 8
      Assets/BossRoom/Scripts/Shared/Net.meta
  45. 8
      Assets/BossRoom/Shaders.meta
  46. 8
      Assets/BossRoom/Textures.meta
  47. 16
      ProjectSettings/BurstAotSettings_StandaloneWindows.json
  48. 167
      ProjectSettings/SceneTemplateSettings.json
  49. 15
      ProjectSettings/TimelineSettings.asset
  50. 77
      Assets/BossRoom/Material/BaseGreen.mat
  51. 8
      Assets/BossRoom/Material/BaseGreen.mat.meta
  52. 8
      Assets/BossRoom/Material/Characters.meta
  53. 8
      Assets/BossRoom/Material/Dungeon.meta
  54. 77
      Assets/BossRoom/Material/Dungeon/deco_dungeon.mat
  55. 8
      Assets/BossRoom/Material/Dungeon/deco_dungeon.mat.meta
  56. 77
      Assets/BossRoom/Material/Dungeon/lava.mat
  57. 8
      Assets/BossRoom/Material/Dungeon/lava.mat.meta
  58. 8
      Assets/BossRoom/Material/FX.meta
  59. 177
      Assets/BossRoom/Material/FX/GroundCircle 1.mat
  60. 8
      Assets/BossRoom/Material/FX/GroundCircle 1.mat.meta
  61. 178
      Assets/BossRoom/Material/FX/GroundCircle.mat
  62. 8
      Assets/BossRoom/Material/FX/GroundCircle.mat.meta
  63. 108
      Assets/BossRoom/Material/lobbymenu_bg_mat.mat
  64. 8
      Assets/BossRoom/Material/lobbymenu_bg_mat.mat.meta
  65. 108
      Assets/BossRoom/Material/mainmenu_bg_mat.mat
  66. 8
      Assets/BossRoom/Material/mainmenu_title.mat.meta
  67. 78
      Assets/BossRoom/Material/mainmenu_title.mat
  68. 8
      Assets/BossRoom/Material/mainmenu_bg_mat.mat.meta
  69. 78
      Assets/BossRoom/Material/Characters/Hero_Eyes_sheet.mat
  70. 8
      Assets/BossRoom/Material/Characters/Hero_Eyes_sheet.mat.meta
  71. 83
      Assets/BossRoom/Material/Characters/Hero_Mouth_sheet.mat
  72. 8
      Assets/BossRoom/Material/Characters/Hero_Mouth_sheet.mat.meta
  73. 8
      Assets/BossRoom/Material/Characters/Standard.meta
  74. 77
      Assets/BossRoom/Material/Characters/Standard/Hair_Archer_Boy.mat
  75. 8
      Assets/BossRoom/Material/Characters/Standard/Hair_Archer_Boy.mat.meta
  76. 77
      Assets/BossRoom/Material/Characters/Standard/Hair_Archer_Girl.mat
  77. 8
      Assets/BossRoom/Material/Characters/Standard/Hair_Archer_Girl.mat.meta
  78. 77
      Assets/BossRoom/Material/Characters/Standard/Hair_Mage_Boy.mat

1
.gitignore


*.mdb
*.opendb
*.VC.db
.vsconfig
# Unity3D generated meta files
*.pidb.meta

169
Assets/BossRoom/Prefabs/Player.prefab


m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1935255767028652502
Transform:
m_ObjectHideFlags: 0

m_Children:
- {fileID: 80535263913599867}
m_Father: {fileID: 4600110157238723791}
m_RootOrder: 0
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4600110157238723781
GameObject:

- component: {fileID: 4600110157238723777}
- component: {fileID: 4600110157238723776}
- component: {fileID: 4600110157238723779}
- component: {fileID: 4093145920273822261}
m_Layer: 0
- component: {fileID: 4602672899881656135}
- component: {fileID: 7690172137830037487}
m_Layer: 3
m_TagString: Untagged
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0

m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6174365277840941608}
- {fileID: 1935255767028652502}
m_Father: {fileID: 0}
m_RootOrder: 0

m_Script: {fileID: 11500000, guid: edb78c1621dad5149bb47b96120d3fbf, type: 3}
m_Name:
m_EditorClassIdentifier:
HitPoints:
InternalValue: 1000000
Mana:
InternalValue: 10
--- !u!114 &4600110157238723776
MonoBehaviour:
m_ObjectHideFlags: 0

m_Script: {fileID: 11500000, guid: fdad0914904cc1e47933ecd7a58514ac, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MovementSpeed: 3
--- !u!114 &4093145920273822261
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9520a47fc61d5ab4ca99cdac2d574909, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ClientVisuals: {fileID: 1935255767028652502}
m_MovementSpeed: 4
--- !u!54 &4470766618279719912
Rigidbody:
m_ObjectHideFlags: 0

m_GameObject: {fileID: 4600110157238723781}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 0
m_Enabled: 1
--- !u!114 &4602672899881656135
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 920a440eb254ba348915767fd046027a, type: 3}
m_Name:
m_EditorClassIdentifier:
IsNPC: 0
DetectRange: 10
--- !u!114 &7690172137830037487
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4600110157238723781}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 797d92969c575574d868e069887e8486, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &7872000410579295758
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4600110157238723791}
m_Modifications:
- target: {fileID: 3736552308919084700, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_Name
value: CharacterSet
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4547385851608601788, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608601791, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608601811, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603402, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603409, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603420, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603422, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603423, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603632, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4547385851608603635, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_ModelIndex
value: 7
objectReference: {fileID: 0}
- target: {fileID: 7943089997373843793, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7943089997373843793, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
propertyPath: MaxZoomDistance
value: 30
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
--- !u!4 &6174365277840941608 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4076098699203836966, guid: d396ab139e993ee43b2eb29978bba8ff, type: 3}
m_PrefabInstance: {fileID: 7872000410579295758}
m_PrefabAsset: {fileID: 0}

3
Assets/BossRoom/Scripts/Client/BossRoom.Client.asmdef


"rootNamespace": "",
"references": [
"GUID:1491147abca9d7d4bb7105af628b223e",
"GUID:16d7768bae8d50d44b658fc9bb9d4a7d"
"GUID:16d7768bae8d50d44b658fc9bb9d4a7d",
"GUID:4307f53044263cf4b835bd812fc161a4"
],
"includePlatforms": [],
"excludePlatforms": [],

123
Assets/BossRoom/Scripts/Client/ClientCharacterVisualization.cs


using BossRoom.Shared;
using Cinemachine;
namespace BossRoom.Client
namespace BossRoom.Visual
[RequireComponent(typeof(NetworkCharacterState))]
private NetworkCharacterState m_NetworkCharacterState;
private NetworkCharacterState m_NetState;
/// <summary>
/// The GameObject which visually represents the character is a child object of the character GameObject. This needs to be the case to support host mode.
/// In host mode <see cref="MonoBehaviour.transform"/> is the transform which is relevant for gameplay.
/// <see cref="m_ClientVisuals"/> is the visual representation on the client side which has interpolated position values.
/// </summary>
private Transform m_ClientVisuals;
private Animator m_ClientVisualsAnimator;
private CinemachineVirtualCamera m_MainCamera;
private Transform m_Parent;
public float MinZoomDistance = 3;
public float MaxZoomDistance = 30;
public float ZoomSpeed = 3;
private const float MAX_VIZ_SPEED = 4; //max speed at which we will chase the parent transform.
private const float MAX_ROT_SPEED = 280; //max angular speed at which we will rotate, in degrees/second.
/// <inheritdoc />
public override void NetworkStart()

enabled = false;
return;
}
m_NetState = this.transform.parent.gameObject.GetComponent<NetworkCharacterState>();
m_NetState.DoActionEventClient += this.PerformActionFX;
//we want to follow our parent on a spring, which means it can't be directly in the transform hierarchy.
m_Parent = transform.parent;
transform.parent = null;
if (IsLocalPlayer)
{
AttachCamera();
void Awake()
private void PerformActionFX(ActionRequestData data )
m_NetworkCharacterState = GetComponent<NetworkCharacterState>();
//TODO: [GOMPS-13] break this method out into its own class, so we can drive multi-frame graphical effects.
//FIXME: [GOMPS-13] hook this up to information in the ActionDescription.
m_ClientVisualsAnimator.SetInteger("AttackID", 1);
m_ClientVisualsAnimator.SetTrigger("BeginAttack");
// TODO [GOMPS-75] Needs core sdk support. This and rotation should grab the interpolated value of network position based on the last received snapshots.
m_ClientVisuals.position = m_NetworkCharacterState.NetworkPosition.Value;
if (m_Parent == null)
{
//since we aren't in the transform hierarchy, we have to explicitly die when our parent dies.
GameObject.Destroy(this.gameObject);
return;
}
SmoothMove();
if (m_ClientVisualsAnimator)
{
// set Animator variables here
m_ClientVisualsAnimator.SetFloat("Speed", m_NetState.NetworkMovementSpeed.Value);
}
float scroll = Input.GetAxis("Mouse ScrollWheel");
if (scroll != 0 && m_MainCamera )
{
ZoomCamera(scroll);
}
}
private void SmoothMove()
{
var pos_diff = m_Parent.transform.position - transform.position;
var angle_diff = Quaternion.Angle(m_Parent.transform.rotation, transform.rotation);
float time_delta = Time.deltaTime;
float pos_diff_mag = pos_diff.magnitude;
if( pos_diff_mag > 0 )
{
float max_move = time_delta * MAX_VIZ_SPEED;
float move_dist = Mathf.Min(max_move, pos_diff_mag);
pos_diff *= (move_dist / pos_diff_mag);
transform.position += pos_diff;
}
if( angle_diff > 0 )
{
float max_angle_move = time_delta * MAX_ROT_SPEED;
float angle_move = Mathf.Min(max_angle_move, angle_diff);
float t = angle_move / angle_diff;
transform.rotation = Quaternion.Slerp(transform.rotation, m_Parent.transform.rotation, t);
}
}
private void AttachCamera()
{
var cameraGO = GameObject.FindGameObjectWithTag("CMCamera");
if( cameraGO == null ) { return; }
m_MainCamera = cameraGO.GetComponent<CinemachineVirtualCamera>();
if (m_MainCamera)
{
m_MainCamera.Follow = transform;
m_MainCamera.LookAt = transform;
}
}
m_ClientVisuals.rotation = Quaternion.Euler(0, m_NetworkCharacterState.NetworkRotationY.Value, 0);
private void ZoomCamera(float scroll)
{
CinemachineComponentBase[] components = m_MainCamera.GetComponentPipeline();
foreach (CinemachineComponentBase component in components)
{
if (component is CinemachineFramingTransposer)
{
CinemachineFramingTransposer c = (CinemachineFramingTransposer)component;
c.m_CameraDistance += -scroll * ZoomSpeed;
if (c.m_CameraDistance < MinZoomDistance)
c.m_CameraDistance = MinZoomDistance;
if (c.m_CameraDistance > MaxZoomDistance)
c.m_CameraDistance = MaxZoomDistance;
}
}
}
}
}

65
Assets/BossRoom/Scripts/Client/ClientInputSender.cs


using BossRoom.Shared;
using MLAPI;
using UnityEngine;

{
private NetworkCharacterState m_NetworkCharacter;
/// <summary>
/// We detect clicks in Update (because you can miss single discrete clicks in FixedUpdate). But we need to
/// raycast in FixedUpdate, because raycasts done in Update won't work reliably.
/// This nullable vector will be set to a screen coordinate when an attack click was made.
/// </summary>
private System.Nullable<Vector3> m_AttackClickRequest;
// TODO [GOMPS-81] Don't use NetworkedBehaviour for just NetworkStart
// TODO Don't use NetworkedBehaviour for just NetworkStart [GOMPS-81]
if (!IsClient || !IsOwner)
{
enabled = false;

void FixedUpdate()
{
// TODO [GOMPS-82] replace with new Unity Input System
// TODO replace with new Unity Input System [GOMPS-81]
if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit))
{
// The MLAPI_INTERNAL channel is a reliable sequenced channel. Inputs should always arrive and be in order that's why this channel is used.

}
if (m_AttackClickRequest != null)
{
RaycastHit hit;
if (Physics.Raycast(Camera.main.ScreenPointToRay(m_AttackClickRequest.Value), out hit) && GetTargetObject(ref hit) != 0)
{
//these two actions will queue one after the other, causing us to run over to our target and take a swing.
var chase_data = new ActionRequestData();
chase_data.ActionTypeEnum = ActionType.GENERAL_CHASE;
chase_data.Amount = ActionData.ActionDescriptions[ActionType.TANK_BASEATTACK][0].Range;
chase_data.TargetIds = new ulong[] { GetTargetObject(ref hit) };
m_NetworkCharacter.ClientSendActionRequest(ref chase_data);
var hit_data = new ActionRequestData();
hit_data.ShouldQueue = true; //wait your turn--don't clobber the chase action.
hit_data.ActionTypeEnum = ActionType.TANK_BASEATTACK;
m_NetworkCharacter.ClientSendActionRequest(ref hit_data);
}
else
{
var data = new ActionRequestData();
data.ActionTypeEnum = ActionType.TANK_BASEATTACK;
m_NetworkCharacter.ClientSendActionRequest(ref data);
}
m_AttackClickRequest = null;
}
}
private void Update()
{
//we do this in "Update" rather than "FixedUpdate" because discrete clicks can be missed in FixedUpdate.
if (Input.GetMouseButtonDown(1))
{
m_AttackClickRequest = Input.mousePosition;
}
}
/// <summary>
/// Gets the Target NetworkId from the Raycast hit, or 0 if Raycast didn't contact a Networked Object.
/// </summary>
private ulong GetTargetObject(ref RaycastHit hit )
{
if (hit.collider == null) { return 0; }
var targetObj = hit.collider.GetComponent<NetworkedObject>();
if (targetObj == null) { return 0; }
return targetObj.NetworkId;
}
}

43
Assets/BossRoom/Scripts/Server/ServerCharacterMovement.cs


using System;
using System.Linq;
using BossRoom.Shared;
using MLAPI;
using UnityEngine;
using UnityEngine.AI;

/// <summary>
/// Component responsible for moving a character on the server side based on inputs.
/// </summary>
[RequireComponent(typeof(NetworkCharacterState), typeof(NavMeshAgent))]
[RequireComponent(typeof(NetworkCharacterState), typeof(NavMeshAgent), typeof(ServerCharacter)), RequireComponent(typeof(Rigidbody))]
private Rigidbody m_Rigidbody;
private ServerCharacter m_CharLogic;
private void Awake()
{
m_NavMeshAgent = GetComponent<NavMeshAgent>();
m_NetworkCharacterState = GetComponent<NetworkCharacterState>();
m_CharLogic = GetComponent<ServerCharacter>();
m_Rigidbody = GetComponent<Rigidbody>();
}
public override void NetworkStart()
{
if (!IsServer)

// On the server enable navMeshAgent and initialize
m_NavMeshAgent.enabled = true;
m_NetworkCharacterState.OnReceivedClientInput += SetMovementTarget;
m_NetworkCharacterState.OnReceivedClientInput += OnReceivedClientInput;
private void SetMovementTarget(Vector3 position)
private void OnReceivedClientInput(Vector3 position )
{
m_CharLogic.ClearActions(); //a fresh movement request trumps whatever we were doing before.
SetMovementTarget(position);
}
/// <summary>
/// Sets a movement target. We will path to this position, avoiding static obstacles.
/// </summary>
/// <param name="position">Position in world space to path to. </param>
public void SetMovementTarget(Vector3 position)
private void Awake()
/// <summary>
/// Cancels any moves that are currently in progress.
/// </summary>
public void CancelMove()
m_NavMeshAgent = GetComponent<NavMeshAgent>();
m_NetworkCharacterState = GetComponent<NetworkCharacterState>();
m_MovementState = MovementState.Idle;
}
private void FixedUpdate()

// Send new position values to the client
m_NetworkCharacterState.NetworkPosition.Value = transform.position;
m_NetworkCharacterState.NetworkRotationY.Value = transform.rotation.eulerAngles.y;
m_NetworkCharacterState.NetworkMovementSpeed.Value = m_MovementState == MovementState.Idle ? 0 : m_MovementSpeed;
}
private void Movement()

m_NavMeshAgent.Move(movementVector);
transform.rotation = Quaternion.LookRotation(movementVector);
//fixme--is this right? If I don't do this the Rigidbody is "left behind", and doesn't move with the GameObject.
//also see ClientCharacterMovement before deleting this comment.
m_Rigidbody.position = transform.position;
m_Rigidbody.rotation = transform.rotation;
m_NavMeshAgent.CalculatePath(corners[corners.Length - 1], m_DesiredMovementPath);
}
}

66
Assets/BossRoom/Scripts/Shared/NetworkCharacterState.cs


using System;
using System.IO;
using MLAPI.Serialization.Pooled;
namespace BossRoom.Shared
namespace BossRoom
/// <summary>
/// Contains all NetworkedVars and RPCs of a character. This component is present on both client and server objects.
/// </summary>

/// The networked rotation of this Character. This reflects the authorative rotation on the server.
/// </summary>
public NetworkedVarFloat NetworkRotationY { get; } = new NetworkedVarFloat();
public NetworkedVarFloat NetworkMovementSpeed { get; } = new NetworkedVarFloat();
public NetworkedVarInt HitPoints;
public NetworkedVarInt Mana;
/// <summary>
/// Gets invoked when inputs are received from the client which own this networked character.

public void SendCharacterInputServerRpc(Vector3 movementTarget)
{
OnReceivedClientInput?.Invoke(movementTarget);
}
// ACTION SYSTEM
/// <summary>
/// This event is raised on the server when an action request arrives
/// </summary>
public event Action<BossRoom.ActionRequestData> DoActionEventServer;
/// <summary>
/// This event is raised on the client when an action is being played back.
/// </summary>
public event Action<BossRoom.ActionRequestData> DoActionEventClient;
/// <summary>
/// Client->Server RPC that sends a request to play an action.
/// </summary>
/// <param name="data">Data about which action to play an dits associated details. </param>
public void ClientSendActionRequest(ref ActionRequestData data)
{
using (PooledBitStream stream = PooledBitStream.Get())
{
data.Write(stream);
InvokeServerRpcPerformance(RecvDoActionServer, stream);
}
}
/// <summary>
/// Server->Client RPC that broadcasts this action play to all clients.
/// </summary>
/// <param name="data">The data associated with this Action, including what action type it is.</param>
public void ServerBroadcastAction(ref ActionRequestData data )
{
using (PooledBitStream stream = PooledBitStream.Get())
{
data.Write(stream);
InvokeClientRpcOnEveryonePerformance(RecvDoActionClient, stream);
}
}
[ClientRPC]
private void RecvDoActionClient(ulong clientId, Stream stream )
{
var data = new ActionRequestData();
data.Read(stream);
DoActionEventClient?.Invoke(data);
}
[ServerRPC]
private void RecvDoActionServer(ulong clientId, Stream stream)
{
var data = new ActionRequestData();
data.Read(stream);
DoActionEventServer?.Invoke(data);
}
}
}

3
Packages/manifest.json


{
"dependencies": {
"com.unity.cinemachine": "2.6.3",
"com.unity.multiplayer.multipie": "https://github.com/Unity-Technologies/com.unity.multiplayer.multipie.git",
"com.unity.postprocessing": "2.3.0",
"com.unity.test-framework": "1.1.19",
"com.unity.textmeshpro": "3.0.1",
"com.unity.timeline": "1.4.3",

70
Packages/packages-lock.json


{
"dependencies": {
"com.unity.burst": {
"version": "1.3.7",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1"
},
"url": "https://packages.unity.com"
},
"com.unity.cinemachine": {
"version": "2.6.3",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.3.9",
"depth": 0,

},
"com.unity.collections": {
"version": "0.14.0-preview.16",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.test-framework.performance": "2.3.1-preview",
"com.unity.burst": "1.3.7"
},
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.5",
"depth": 1,

"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.multiplayer.mlapi": {
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#develop",
"depth": 0,
"source": "git",
"com.unity.mathematics": {
"version": "1.2.1",
"depth": 3,
"source": "registry",
"hash": "8e7e3ca556843794618ab91c6b8334b291ff4e3d"
"url": "https://packages.unity.com"
"com.unity.multiplayer.multipie": {
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.multipie.git",
"com.unity.multiplayer.mlapi": {
"version": "https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#develop",
"dependencies": {},
"hash": "bb86715f2a0144fdced1386eb40edaa6839ff4cd"
"dependencies": {
"com.unity.collections": "0.14.0-preview.16"
},
"hash": "726b77f90f2bb2879303cf72a22048ac0abf4084"
},
"com.unity.multiplayer.transport.litenet": {
"version": "file:com.unity.multiplayer.transport.litenet",

"com.unity.multiplayer.mlapi": "0.0.1-preview.1"
}
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0-preview",
"depth": 3,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.postprocessing": {
"version": "2.3.0",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.1.19",
"depth": 0,

"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework.performance": {
"version": "2.3.1-preview",
"depth": 2,
"source": "registry",
"dependencies": {
"com.unity.test-framework": "1.1.0",
"com.unity.nuget.newtonsoft-json": "2.0.0-preview"
},
"url": "https://packages.unity.com"
},

9
ProjectSettings/DynamicsManager.asset


--- !u!55 &1
PhysicsManager:
m_ObjectHideFlags: 0
serializedVersion: 11
serializedVersion: 13
m_DefaultMaxDepenetrationVelocity: 10
m_SleepThreshold: 0.005
m_DefaultContactOffset: 0.01
m_DefaultSolverIterations: 6

m_ClothInterCollisionStiffness: 0
m_ContactsGeneration: 1
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
m_AutoSimulation: 1
m_AutoSimulation: 0
m_ClothGravity: {x: 0, y: -9.81, z: 0}
m_ContactPairsMode: 0
m_BroadphaseType: 0
m_WorldBounds:

m_FrictionType: 0
m_EnableEnhancedDeterminism: 0
m_EnableUnifiedHeightmaps: 1
m_DefaultMaxAngluarSpeed: 7
m_SolverType: 0
m_DefaultMaxAngularSpeed: 7

14
ProjectSettings/EditorBuildSettings.asset


EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes: []
m_Scenes:
- enabled: 1
path: Assets/BossRoom/Scenes/MainMenu.unity
guid: 4b62455423c0e284f96f7fd6ac947bf9
- enabled: 1
path: Assets/BossRoom/Scenes/CharSelect.unity
guid: 69ca9af1235ffe340a45770dd5771f03
- enabled: 1
path: Assets/BossRoom/Scenes/SampleScene.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab
- enabled: 1
path: Assets/BossRoom/Scenes/DungeonTest.unity
guid: 221dbbcb8b3e1534da77bedcae13e9e6
m_configObjects: {}

59
ProjectSettings/GraphicsSettings.asset


m_LensFlare:
m_Mode: 1
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
m_VideoShadersIncludeMode: 2
m_AlwaysIncludedShaders:
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}

- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_TierSettings: []
m_TierSettings:
- serializedVersion: 5
m_BuildTarget: 1
m_Tier: 0
m_Settings:
standardShaderQuality: 2
renderingPath: 3
hdrMode: 1
realtimeGICPUUsage: 25
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
useHDR: 1
useDetailNormalMap: 1
useCascadedShadowMaps: 1
prefer32BitShadowMaps: 0
enableLPPV: 1
useDitherMaskForAlphaBlendedShadows: 1
m_Automatic: 0
- serializedVersion: 5
m_BuildTarget: 1
m_Tier: 1
m_Settings:
standardShaderQuality: 2
renderingPath: 3
hdrMode: 1
realtimeGICPUUsage: 25
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
useHDR: 1
useDetailNormalMap: 1
useCascadedShadowMaps: 1
prefer32BitShadowMaps: 0
enableLPPV: 1
useDitherMaskForAlphaBlendedShadows: 1
m_Automatic: 0
- serializedVersion: 5
m_BuildTarget: 1
m_Tier: 2
m_Settings:
standardShaderQuality: 2
renderingPath: 3
hdrMode: 1
realtimeGICPUUsage: 50
useReflectionProbeBoxProjection: 1
useReflectionProbeBlending: 1
useHDR: 1
useDetailNormalMap: 1
useCascadedShadowMaps: 1
prefer32BitShadowMaps: 0
enableLPPV: 1
useDitherMaskForAlphaBlendedShadows: 1
m_Automatic: 0
m_LightmapStripping: 0
m_FogStripping: 0
m_InstancingStripping: 0

m_AlbedoSwatchInfos: []
m_LightsUseLinearIntensity: 0
m_LightsUseColorTemperature: 0
m_DefaultRenderingLayerMask: 1
m_AllowEnlightenSupportForUpgradedProject: 0

36
ProjectSettings/ProjectSettings.asset


--- !u!129 &1
PlayerSettings:
m_ObjectHideFlags: 0
serializedVersion: 21
serializedVersion: 22
productGUID: f567921ecfe8011459dca48042d0d565
AndroidProfiler: 0
AndroidFilterTouchesWhenObscured: 0

bakeCollisionMeshes: 0
forceSingleInstance: 0
useFlipModelSwapchain: 1
resizableWindow: 0
resizableWindow: 1
useMacAppStoreValidation: 0
macAppStoreCategory: public.app-category.games
gpuSkinning: 1

xboxEnableFitness: 0
visibleInBackground: 1
allowFullscreenSwitch: 1
fullscreenMode: 1
fullscreenMode: 3
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0

resolutionScalingMode: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier: {}
applicationIdentifier:
Standalone: com.DefaultCompany.com.unity.multiplayer.samples.coop
buildNumber:
Standalone: 0
iPhone: 0

metalEditorSupport: 1
metalAPIValidation: 1
iOSRenderExtraFrameOnPause: 0
iosCopyPluginsCodeInsteadOfSymlink: 0
appleDeveloperTeamID:
iOSManualSigningProvisioningProfileID:
tvOSManualSigningProvisioningProfileID:

iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
shaderPrecisionModel: 0
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
templatePackageId: com.unity.template.3d@5.0.4
templateDefaultScene: Assets/Scenes/SampleScene.unity

webGLLinkerTarget: 1
webGLThreadsSupport: 0
webGLDecompressionFallback: 0
scriptingDefineSymbols: {}
scriptingDefineSymbols:
1: UNITY_POST_PROCESSING_STACK_V2
4: UNITY_POST_PROCESSING_STACK_V2
7: UNITY_POST_PROCESSING_STACK_V2
13: UNITY_POST_PROCESSING_STACK_V2
14: UNITY_POST_PROCESSING_STACK_V2
19: UNITY_POST_PROCESSING_STACK_V2
21: UNITY_POST_PROCESSING_STACK_V2
25: UNITY_POST_PROCESSING_STACK_V2
27: UNITY_POST_PROCESSING_STACK_V2
28: UNITY_POST_PROCESSING_STACK_V2
29: UNITY_POST_PROCESSING_STACK_V2
30: UNITY_POST_PROCESSING_STACK_V2
additionalCompilerArguments: {}
suppressCommonWarnings: 1
allowUnsafeCode: 0
useDeterministicCompilation: 1
useReferenceAssemblies: 1

gcIncremental: 1
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform: {}
apiCompatibilityLevelPerPlatform:
Standalone: 6
metroPackageName: Template_3D
metroPackageVersion:
metroPackageName: Template3D
metroPackageVersion: 1.0.0.0
metroCertificatePath:
metroCertificatePassword:
metroCertificateSubject:

wsaImages: {}
metroTileShortName:
metroTileShortName: com.unity.multiplayer.samples.coop
metroTileShowName: 0
metroMediumTileShowName: 0
metroLargeTileShowName: 0

7
ProjectSettings/TagManager.asset


--- !u!78 &1
TagManager:
serializedVersion: 2
tags: []
tags:
- CMCamera
-
- PCs
-
- NPCs
-
-
-

8
Assets/BossRoom/Material.meta


fileFormatVersion: 2
guid: 4895603bba5052d4591fa582295e3d5b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/Models.meta


fileFormatVersion: 2
guid: f9ac24ebd2ef4c04e82fd29019310ed0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/PostProcessing.meta


fileFormatVersion: 2
guid: e19028929512002428b390ba981267da
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/Prefabs/Character.meta


fileFormatVersion: 2
guid: 2279023f9496c664782aaf2ed13ed494
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/Prefabs/Dungeon.meta


fileFormatVersion: 2
guid: c236398f618a7504187f15da6e8de09a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

236
Assets/BossRoom/Prefabs/Enemy.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4340979889802297118
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 858400412575613041}
- component: {fileID: -3741253011127748524}
- component: {fileID: -7891119379750261840}
- component: {fileID: 4129073990757611390}
- component: {fileID: 3400408442635813738}
- component: {fileID: 1781832246633869541}
- component: {fileID: -7347463593668903068}
- component: {fileID: -2661490869309078486}
- component: {fileID: -3025025970778375211}
m_Layer: 6
m_Name: Enemy
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &858400412575613041
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4818022201665423606}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-3741253011127748524
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
NetworkedInstanceId: 0
PrefabHash: 13972572995013741903
PrefabHashGenerator: Enemy2
AlwaysReplicateAsRoot: 0
DontDestroyWithOwner: 0
--- !u!114 &-7891119379750261840
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edb78c1621dad5149bb47b96120d3fbf, type: 3}
m_Name:
m_EditorClassIdentifier:
HitPoints:
InternalValue: 80
Mana:
InternalValue: 20
--- !u!195 &4129073990757611390
NavMeshAgent:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 0
m_AgentTypeID: 0
m_Radius: 0.5
m_Speed: 3.5
m_Acceleration: 8
avoidancePriority: 50
m_AngularSpeed: 120
m_StoppingDistance: 0
m_AutoTraverseOffMeshLink: 1
m_AutoBraking: 1
m_AutoRepath: 1
m_Height: 2
m_BaseOffset: 0
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
--- !u!54 &3400408442635813738
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
serializedVersion: 2
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &1781832246633869541
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fdad0914904cc1e47933ecd7a58514ac, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MovementSpeed: 3
--- !u!136 &-7347463593668903068
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
m_Radius: 1.3
m_Height: 6
m_Direction: 1
m_Center: {x: 0, y: 3, z: 0}
--- !u!114 &-2661490869309078486
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 920a440eb254ba348915767fd046027a, type: 3}
m_Name:
m_EditorClassIdentifier:
IsNPC: 1
DetectRange: 10
--- !u!114 &-3025025970778375211
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4340979889802297118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 797d92969c575574d868e069887e8486, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &1692449221005613434
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 858400412575613041}
m_Modifications:
- target: {fileID: 2663813019036984750, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_ClientVisualsAnimator
value:
objectReference: {fileID: 1458358683133760140}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6839301660383890230, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
propertyPath: m_Name
value: Boss
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
--- !u!4 &4818022201665423606 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6170428688339538316, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
m_PrefabInstance: {fileID: 1692449221005613434}
m_PrefabAsset: {fileID: 0}
--- !u!95 &1458358683133760140 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 234724737205816310, guid: 1e8ae28d24c5683478548d7e96e5ba55, type: 3}
m_PrefabInstance: {fileID: 1692449221005613434}
m_PrefabAsset: {fileID: 0}

7
Assets/BossRoom/Prefabs/Enemy.prefab.meta


fileFormatVersion: 2
guid: 5f8daaa54415e5e41b5162cd13121359
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/Prefabs/GameCam.meta


fileFormatVersion: 2
guid: 37e096cb557d9e947b6d633300b29645
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1001
Assets/BossRoom/Prefabs/Imp.prefab
文件差异内容过多而无法显示
查看文件

7
Assets/BossRoom/Prefabs/Imp.prefab.meta


fileFormatVersion: 2
guid: 05dc08b301a6f8c4e880a81c69d0b3e9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

149
Assets/BossRoom/Prefabs/NetworkingManager.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &5436007408952557947
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5436007408952557925}
- component: {fileID: 5436007408952557924}
- component: {fileID: 5436007408952557927}
- component: {fileID: 5436007408952557926}
m_Layer: 0
m_Name: NetworkingManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5436007408952557925
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5436007408952557947}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5436007408952557924
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5436007408952557947}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 593a2fe42fa9d37498c96f9a383b6521, type: 3}
m_Name:
m_EditorClassIdentifier:
DontDestroy: 1
RunInBackground: 1
LogLevel: 1
NetworkConfig:
ProtocolVersion: 0
NetworkTransport: {fileID: 5436007408952557927}
RegisteredScenes:
- MainMenu
- CharSelect
- SampleScene
- DungeonTest
AllowRuntimeSceneChanges: 1
NetworkedPrefabs:
- Prefab: {fileID: 4600110157238723781, guid: bb87f9bac2595f8499c048016c4b2e1d, type: 3}
PlayerPrefab: 1
- Prefab: {fileID: 3565665953789623672, guid: 1a58a2c4657fe6d4890d9ad39f43894e, type: 3}
PlayerPrefab: 0
- Prefab: {fileID: 297185343939699586, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
PlayerPrefab: 0
- Prefab: {fileID: 4340979889802297118, guid: 5f8daaa54415e5e41b5162cd13121359, type: 3}
PlayerPrefab: 0
PlayerPrefabHash:
id: 0
CreatePlayerPrefab: 0
ReceiveTickrate: 0
MaxReceiveEventsPerTickRate: 1000
EventTickrate: 30
ClientConnectionBufferTimeout: 10
ConnectionApproval: 1
ConnectionData:
SecondsHistory: 0
EnableTimeResync: 0
TimeResyncInterval: 30
EnableNetworkedVar: 1
EnsureNetworkedVarLengthSafety: 0
EnableSceneManagement: 1
ForceSamePrefabs: 0
UsePrefabSync: 0
RecycleNetworkIds: 1
NetworkIdRecycleDelay: 120
RpcHashSize: 0
LoadSceneTimeOut: 120
EnableMessageBuffering: 0
MessageBufferTimeout: 20
EnableNetworkLogs: 1
EnableEncryption: 0
SignKeyExchange: 0
ServerBase64PfxCertificate:
references:
version: 1
00000000:
type: {class: NullableBoolSerializable, ns: MLAPI.Configuration, asm: Unity.Multiplayer.MLAPI.Runtime}
data:
Value: 1897319656204293034
--- !u!114 &5436007408952557927
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5436007408952557947}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b84c2d8dfe509a34fb59e2b81f8e1319, type: 3}
m_Name:
m_EditorClassIdentifier:
MessageBufferSize: 5120
MaxConnections: 100
MaxSentMessageQueueSize: 128
ConnectAddress: 127.0.0.1
ConnectPort: 7777
ServerListenPort: 7777
ServerWebsocketListenPort: 8887
SupportWebsocket: 0
Channels: []
UseMLAPIRelay: 0
MLAPIRelayAddress: 184.72.104.138
MLAPIRelayPort: 8888
MessageSendMode: 0
--- !u!114 &5436007408952557926
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5436007408952557947}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: db28424c2ae12f64da25c9ecccded6b1, type: 3}
m_Name:
m_EditorClassIdentifier:
Port: 7777
Address: 127.0.0.1
PingInterval: 1
DisconnectTimeout: 5
ReconnectDelay: 0.5
MaxConnectAttempts: 10
channels: []
MessageBufferSize: 5120
SimulatePacketLossChance: 0
SimulateMinLatency: 0
SimulateMaxLatency: 0

7
Assets/BossRoom/Prefabs/NetworkingManager.prefab.meta


fileFormatVersion: 2
guid: 8f5ddd70561bc0b42bbbe5a8a155bb7b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/BossRoom/Prefabs/State.meta


fileFormatVersion: 2
guid: 4f221429a11d0a14298624cbb5dbbc7f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

707
Assets/BossRoom/Scenes/CharSelect.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 12
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &517391266
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 517391268}
- component: {fileID: 517391267}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &517391267
Light:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 517391266}
m_Enabled: 1
serializedVersion: 10
m_Type: 1
m_Shape: 0
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 0
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_UseViewFrustumForShadowCasterCull: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &517391268
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 517391266}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &898781741