Skip to content

Commit

Permalink
v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyght committed Apr 23, 2023
1 parent 3c24307 commit e494405
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ MonoBehaviour:
m_Data:
m_SerializedData: []
m_GUID: 361ba112a57bfc849824b3333856ef41
m_SerializeEntries:
- m_GUID: dccd9b55186e35b48be3c74421d03e44
m_Address: Toggler
m_ReadOnly: 0
m_SerializedLabels: []
m_SerializeEntries: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: b3c7a647880fda7499cea4a472a0beae, type: 2}
m_SchemaSet:
Expand Down
Binary file not shown.
24 changes: 14 additions & 10 deletions Assets/Scenes/Hub.unity
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 451814056}
m_LocalRotation: {x: 0.2588191, y: -0, z: -0, w: 0.9659258}
m_LocalPosition: {x: -6.79, y: 7.4, z: 26.41}
m_LocalPosition: {x: -6.79, y: 7.4, z: 4.51}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -507,7 +507,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 705507993}
m_LocalRotation: {x: 0.3696438, y: -0.23911758, z: 0.099045746, w: 0.89239913}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalPosition: {x: 0, y: 3, z: -39.44}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -602,7 +602,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 707714282}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 24.47}
m_LocalPosition: {x: 0, y: 0, z: -14.969999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -640,7 +640,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8180861435618706049, guid: dccd9b55186e35b48be3c74421d03e44, type: 3}
propertyPath: m_LocalPosition.z
value: 10
value: -29.439999
objectReference: {fileID: 0}
- target: {fileID: 8180861435618706049, guid: dccd9b55186e35b48be3c74421d03e44, type: 3}
propertyPath: m_LocalRotation.w
Expand Down Expand Up @@ -763,7 +763,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1514999894}
m_LocalRotation: {x: 0.09904577, y: 0.89239913, z: -0.36964378, w: 0.23911767}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalPosition: {x: 0, y: 3, z: -39.44}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -807,7 +807,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1720427981}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.7900004, y: 4.4, z: 29.41}
m_LocalPosition: {x: -6.7900004, y: 4.4, z: 7.51}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -902,7 +902,7 @@ RectTransform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1881031605}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 10}
m_LocalPosition: {x: 0, y: 0, z: -29.439999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -1111,7 +1111,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1932291533}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalPosition: {x: 0, y: 0, z: -39.44}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand All @@ -1135,15 +1135,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3164109861140443715, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
propertyPath: m_LocalPosition.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3164109861140443715, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
propertyPath: m_LocalPosition.y
value: -0.178
objectReference: {fileID: 0}
- target: {fileID: 3164109861140443715, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
propertyPath: m_LocalPosition.z
value: -7
value: -46.44
objectReference: {fileID: 0}
- target: {fileID: 3164109861140443715, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
propertyPath: m_LocalRotation.w
Expand Down Expand Up @@ -1173,5 +1173,9 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6920237618264899854, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
propertyPath: _sceneName
value: PrivateRoom
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f1dbf4b9126a2314381e1bfe4b6c5369, type: 3}
22 changes: 11 additions & 11 deletions Assets/Scenes/PrivateRoom.unity
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 412346971}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -4.54, z: 0}
m_LocalPosition: {x: 0, y: -10, z: -55}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -639,7 +639,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1431530361}
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: 0, y: 15.459997, z: 10}
m_LocalPosition: {x: 0, y: 9.799997, z: -44.460003}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -733,7 +733,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1456823131}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 10, y: 15.459997, z: 0}
m_LocalPosition: {x: 10, y: 9.799997, z: -54.460003}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -777,7 +777,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1490782438}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -4.1880007, z: 0}
m_LocalPosition: {x: 0, y: -9.848001, z: -39.83}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -871,7 +871,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1672827673}
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: 0, y: 15.459997, z: -10}
m_LocalPosition: {x: 0, y: 9.799997, z: -64.46001}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -1161,7 +1161,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2040685652}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: -10, y: 15.459997, z: 0}
m_LocalPosition: {x: -10, y: 9.799997, z: -54.460003}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand All @@ -1181,15 +1181,15 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalPosition.x
value: 0
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalPosition.y
value: 0.46
value: -5
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalPosition.z
value: 5.83
value: -60
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalRotation.w
Expand All @@ -1201,7 +1201,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalRotation.z
Expand All @@ -1213,7 +1213,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
value: -90
objectReference: {fileID: 0}
- target: {fileID: 6965805677789641260, guid: 88fdf3a97fed9ab49a7fe24c189bd37e, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scenes/StartScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ MonoBehaviour:
m_GameObject: {fileID: 231620156}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bb8a14c4853bf3c4392769f4740abf88, type: 3}
m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3}
m_Name:
m_EditorClassIdentifier:
dontDestroyOnLoad: 1
Expand Down
3 changes: 3 additions & 0 deletions Assets/Scripts/Animation/PlayerAnimations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

namespace Animation
{
/// <summary>
/// Class to control player animations
/// </summary>
public class PlayerAnimations : NetworkBehaviour
{
[SerializeField] private Transform _playerMesh;
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/AssetProvider.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System.Threading.Tasks;
using Network;
using UnityEngine;
using UnityEngine.AddressableAssets;

/// <summary>
/// Class for loading Addressables
/// </summary>
public class AssetProvider : MonoBehaviour
{
private void Awake()
Expand All @@ -19,6 +21,5 @@ public static async Task LoadSceneSingle(string sceneId)
{
var op = Addressables.LoadSceneAsync(sceneId);
await op.Task;
NetMan.singleton.OnServerChangeScene(sceneId);
}
}
12 changes: 0 additions & 12 deletions Assets/Scripts/Buttons/BaseButtonPlayerPerform.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Scripts/Buttons/BaseButtonPlayerPerform.cs.meta

This file was deleted.

6 changes: 5 additions & 1 deletion Assets/Scripts/Buttons/ButtonToNextScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

namespace Buttons
{
/// <summary>
/// Class for navigation between scenes buttons
/// </summary>
public class ButtonToNextScene : MonoBehaviour
{
[SerializeField] private string _sceneName;
private bool _first;

private async void OnTriggerStay(Collider other)
Expand All @@ -14,7 +18,7 @@ private async void OnTriggerStay(Collider other)
{
_first = true;
await Task.Delay(1500);
await AssetProvider.LoadSceneSingle("PrivateRoom");
await AssetProvider.LoadSceneSingle(_sceneName);
}
}
}
Expand Down
17 changes: 11 additions & 6 deletions Assets/Scripts/Buttons/Toggle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,26 @@

namespace Buttons
{
/// <summary>
/// Class for toggling toggler
/// </summary>
public class Toggle : NetworkBehaviour
{
private bool _state;
private bool _first;

private async void OnTriggerStay(Collider other)
{
if (!isClient) return;
if (!other.gameObject.CompareTag("Player")) return;
if (Input.GetKeyDown(KeyCode.F) && !_first)
if (Input.GetKeyDown(KeyCode.F))
{
_first = true;
await Task.Delay(1000);
CmdChangeState(!_state);
_first = false;
if (other.GetComponentInParent<NetworkIdentity>().assetId == NetworkClient.localPlayer.assetId && !_first)
{
_first = true;
await Task.Delay(1000);
CmdChangeState(!_state);
_first = false;
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion Assets/Scripts/Movement/CharacterMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

namespace Movement
{
/// <summary>
/// Class for player movement
/// </summary>
[RequireComponent(typeof(Rigidbody))]
public class CharacterMovement : NetworkBehaviour
{
Expand Down Expand Up @@ -40,7 +43,7 @@ public void Run()
}
public void Walk()
{
if (_movementSpeed > _baseSpeed) _movementSpeed -= Time.deltaTime;
if (_movementSpeed > _baseSpeed) _movementSpeed -= 2* Time.deltaTime;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

namespace Movement
{
public class CatchCamera : NetworkBehaviour
/// <summary>
/// Class for player rotation
/// </summary>
public class CharacterRotation : NetworkBehaviour
{
[SerializeField] private float _sensivity = 1.2f;
[SerializeField] private float _smooth = 10;
Expand All @@ -15,10 +18,8 @@ public class CatchCamera : NetworkBehaviour
private void Start()
{
if (!isLocalPlayer) return;
Cursor.visible = false;
Cursor.lockState = CursorLockMode.Locked;
var maincam = Camera.main;
maincam.transform.SetParent(_cameraTransform);
var mainCam = Camera.main;
if (mainCam != null) mainCam.transform.SetParent(_cameraTransform);
}


Expand Down
File renamed without changes.
8 changes: 0 additions & 8 deletions Assets/Scripts/Network.meta

This file was deleted.

16 changes: 0 additions & 16 deletions Assets/Scripts/Network/NetMan.cs

This file was deleted.

Loading

0 comments on commit e494405

Please sign in to comment.