diff --git a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
index 161e692..f4f07c4 100644
--- a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
+++ b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
@@ -52,7 +52,7 @@
}
-
+
@@ -138,7 +138,8 @@
-
+
+
diff --git a/FlufflParty/Assets/Animations/PenguAnimator.controller b/FlufflParty/Assets/Animations/PenguAnimator.controller
index 34a79de..523f70d 100644
--- a/FlufflParty/Assets/Animations/PenguAnimator.controller
+++ b/FlufflParty/Assets/Animations/PenguAnimator.controller
@@ -1,5 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
+--- !u!1101 &-9039244494196307241
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 2
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 957025389321444311}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.6666666
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
--- !u!1102 &-8981525267910014350
AnimatorState:
serializedVersion: 6
@@ -43,6 +68,8 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: 7614053744492617718}
+ - {fileID: -1099914224773865772}
+ - {fileID: -6777303784791167380}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -83,6 +110,56 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
+--- !u!1101 &-6777303784791167380
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 1
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 1423713061864677287}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.8181819
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
+--- !u!1101 &-5577835132539458708
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 2
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 957025389321444311}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.78571427
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
--- !u!1101 &-4292872927139587900
AnimatorStateTransition:
m_ObjectHideFlags: 1
@@ -170,6 +247,8 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: 1448224064508029569}
+ - {fileID: -5577835132539458708}
+ - {fileID: 4620052325714281977}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -210,6 +289,31 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
+--- !u!1101 &-1099914224773865772
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 2
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 957025389321444311}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.8181819
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
--- !u!1101 &-129466730452059530
AnimatorStateTransition:
m_ObjectHideFlags: 1
@@ -246,7 +350,7 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
- m_Controller: {fileID: 0}
+ m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@@ -389,7 +493,7 @@ AnimatorStateMachine:
m_Position: {x: 390, y: 560, z: 0}
- serializedVersion: 1
m_State: {fileID: 957025389321444311}
- m_Position: {x: 460, y: 320, z: 0}
+ m_Position: {x: 790, y: 370, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
@@ -412,6 +516,8 @@ AnimatorState:
m_CycleOffset: 0
m_Transitions:
- {fileID: -129466730452059530}
+ - {fileID: -9039244494196307241}
+ - {fileID: 3259241568417656217}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@@ -452,6 +558,56 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
+--- !u!1101 &3259241568417656217
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 1
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 1423713061864677287}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.6666666
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
+--- !u!1101 &4620052325714281977
+AnimatorStateTransition:
+ m_ObjectHideFlags: 1
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name:
+ m_Conditions:
+ - m_ConditionMode: 6
+ m_ConditionEvent: value
+ m_EventTreshold: 1
+ m_DstStateMachine: {fileID: 0}
+ m_DstState: {fileID: 1423713061864677287}
+ m_Solo: 0
+ m_Mute: 0
+ m_IsExit: 0
+ serializedVersion: 3
+ m_TransitionDuration: 0.25
+ m_TransitionOffset: 0
+ m_ExitTime: 0.78571427
+ m_HasExitTime: 0
+ m_HasFixedDuration: 1
+ m_InterruptionSource: 0
+ m_OrderedInterruption: 1
+ m_CanTransitionToSelf: 1
--- !u!1101 &6957837359468571303
AnimatorStateTransition:
m_ObjectHideFlags: 1
diff --git a/FlufflParty/Assets/Scripts/Client.cs b/FlufflParty/Assets/Scripts/Client.cs
index 1ee6a55..9454122 100644
--- a/FlufflParty/Assets/Scripts/Client.cs
+++ b/FlufflParty/Assets/Scripts/Client.cs
@@ -318,4 +318,9 @@ public class Client : MonoBehaviour
{
stream.Write(new byte[]{10, index, 0, 0, 0, 0, 0, 0, 0, 0});
}
+
+ private void OnApplicationQuit()
+ {
+ stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0});
+ }
}
\ No newline at end of file
diff --git a/FlufflParty/Assets/Scripts/Start/StartHandler.cs b/FlufflParty/Assets/Scripts/Start/StartHandler.cs
index c5bd6e9..99d2255 100644
--- a/FlufflParty/Assets/Scripts/Start/StartHandler.cs
+++ b/FlufflParty/Assets/Scripts/Start/StartHandler.cs
@@ -1,3 +1,4 @@
+using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
@@ -66,6 +67,8 @@ public class StartHandler : MonoBehaviour
PlayerPrefs.Save();
layout2.GetComponentInChildren().text = "Your room code is: \n" + code;
+
+ stream.Close();
}
public void ButtonJoin()
@@ -152,4 +155,10 @@ public class StartHandler : MonoBehaviour
layout0.SetActive(true);
layout1.SetActive(false);
}
+
+ private void OnApplicationQuit()
+ {
+ Stream stream = client.GetStream();
+ stream.Write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0});
+ }
}
\ No newline at end of file
diff --git a/FlufflParty/ProjectSettings/ProjectSettings.asset b/FlufflParty/ProjectSettings/ProjectSettings.asset
index b210cc7..a38f65e 100644
--- a/FlufflParty/ProjectSettings/ProjectSettings.asset
+++ b/FlufflParty/ProjectSettings/ProjectSettings.asset
@@ -12,7 +12,7 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
- companyName: IO Game Studios
+ companyName: IOGameStudios
productName: FlufflParty
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
@@ -136,8 +136,10 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
- bundleVersion: 0.12
- preloadedAssets: []
+ bundleVersion: 0.13
+ preloadedAssets:
+ - {fileID: -6230802382160794249, guid: 90cd1b71078984c4980fcd1aa03eaaa3, type: 2}
+ - {fileID: 11400000, guid: 48bf7376b3770c44cbfe3f40e77359ab, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
@@ -151,8 +153,8 @@ PlayerSettings:
useHDRDisplay: 0
D3DHDRBitDepth: 0
m_ColorGamuts: 00000000
- targetPixelDensity: 30
- resolutionScalingMode: 0
+ targetPixelDensity: 100
+ resolutionScalingMode: 1
resetResolutionOnWindowResize: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
@@ -164,7 +166,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
- AndroidBundleVersionCode: 2
+ AndroidBundleVersionCode: 3
AndroidMinSdkVersion: 26
AndroidTargetSdkVersion: 31
AndroidPreferredInstallLocation: 2
diff --git a/FlufflParty/UserSettings/EditorUserSettings.asset b/FlufflParty/UserSettings/EditorUserSettings.asset
index bac6747..299540d 100644
--- a/FlufflParty/UserSettings/EditorUserSettings.asset
+++ b/FlufflParty/UserSettings/EditorUserSettings.asset
@@ -12,10 +12,10 @@ EditorUserSettings:
value: 55010d0300055a5a595a592641730d44104e4c287b2e71662c7b186bb3b86069
flags: 0
RecentlyUsedSceneGuid-2:
- value: 0000025f04075d0f0c0a5c7149205a4417154f782e7923357e7a4560e3b4653b
+ value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
flags: 0
RecentlyUsedSceneGuid-3:
- value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
+ value: 0000025f04075d0f0c0a5c7149205a4417154f782e7923357e7a4560e3b4653b
flags: 0
UnityRemoteDevice:
value: 225f4d46245b0d4902070862342649191512
diff --git a/FlufflParty/UserSettings/Layouts/default-2021.dwlt b/FlufflParty/UserSettings/Layouts/default-2021.dwlt
index 83ba0c0..508fb6e 100644
--- a/FlufflParty/UserSettings/Layouts/default-2021.dwlt
+++ b/FlufflParty/UserSettings/Layouts/default-2021.dwlt
@@ -19,7 +19,7 @@ MonoBehaviour:
width: 1920
height: 1117
m_ShowMode: 4
- m_Title: Scene
+ m_Title: Game
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
@@ -118,7 +118,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
- controlID: 614
+ controlID: 32
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -143,7 +143,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
- controlID: 615
+ controlID: 33
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -168,7 +168,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
- controlID: 616
+ controlID: 20
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -193,7 +193,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
- controlID: 617
+ controlID: 21
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -230,7 +230,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
- m_Name: SceneView
+ m_Name: GameView
m_EditorClassIdentifier:
m_Children: []
m_Position:
@@ -241,13 +241,13 @@ MonoBehaviour:
height: 754
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
- m_ActualView: {fileID: 17}
+ m_ActualView: {fileID: 16}
m_Panes:
+ - {fileID: 17}
- {fileID: 15}
- {fileID: 16}
- - {fileID: 17}
m_Selected: 2
- m_LastSelected: 1
+ m_LastSelected: 0
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -258,7 +258,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
- m_Name: ConsoleWindow
+ m_Name: ProjectBrowser
m_EditorClassIdentifier:
m_Children: []
m_Position:
@@ -267,14 +267,14 @@ MonoBehaviour:
y: 754
width: 1405
height: 313
- m_MinSize: {x: 101, y: 121}
- m_MaxSize: {x: 4001, y: 4021}
- m_ActualView: {fileID: 18}
+ m_MinSize: {x: 231, y: 271}
+ m_MaxSize: {x: 10001, y: 10021}
+ m_ActualView: {fileID: 13}
m_Panes:
- {fileID: 13}
- {fileID: 18}
- m_Selected: 1
- m_LastSelected: 0
+ m_Selected: 0
+ m_LastSelected: 1
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -294,8 +294,8 @@ MonoBehaviour:
y: 0
width: 515
height: 1067
- m_MinSize: {x: 275, y: 50}
- m_MaxSize: {x: 4000, y: 4000}
+ m_MinSize: {x: 276, y: 71}
+ m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 19}
m_Panes:
- {fileID: 19}
@@ -343,22 +343,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- - Assets/BlenderFiles/Textures
+ - Assets/Prefabs
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- - Assets/BlenderFiles/Textures
+ - Assets/Prefabs
m_LastFoldersGridSize: -1
- m_LastProjectPath: D:\Unity\flufflparty\flufflparty\FlufflParty
+ m_LastProjectPath: D:\Unity\flufflparty\FlufflParty
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
- scrollPos: {x: 0, y: 0}
- m_SelectedIDs: 56c00000
- m_LastClickedID: 49238
- m_ExpandedIDs: 00000000b0670000ce670000d0670000d4670000d8670000da67000056c0000000ca9a3b
+ scrollPos: {x: 0, y: 48}
+ m_SelectedIDs: 6ea30000
+ m_LastClickedID: 41838
+ m_ExpandedIDs: 0000000064a3000068a3000072a3000074a3000078ad000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -386,7 +386,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
- m_ExpandedIDs: 00000000b0670000
+ m_ExpandedIDs:
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -473,23 +473,23 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
- m_SelectedIDs: 6ec80300
- m_LastClickedID: 247918
- m_ExpandedIDs: f4b5fdff3eb6fdff10bafdff18bcfdff2cc9fdff76c9fdff48cdfdff50cffdff86dbfdffd4dbfdff46defdff46e0fdffc4fcfdff16fdfdffe800fefff002feff700afeffcc0dfeffec10feff8213feff9a16feff6a19feff8a1cfeff2a1efeffc020feff4e28feff402efeff3c31fefff234feffd837feffa63afeff243dfeff0640feff7847feff464afeffa44dfeff7250feff1453feffdc55feffe458feffca5bfeff425efeff1e61feffae63feff7666feff0c69feffda6bfeffe26efeffb071feff3a74feff0877feff3e7afeff6a7dfeff8c80feffae83feffb886feffe489feff9e8cfeff988ffeff5292feff3495feffca97feff989afeff229dfefff09ffeffe8a3feffe6a9feff3cadfeff8cb0feffdeb3feffacb6feff66b9feffd4e9feff52ecfeffe8f6feff66f9feff56fcfeffd4fefeffaa18ffff341bffff021effff8020ffff8a25ffff0828ffffd62affff542dffff2230ffffb832ffff9e35ffff1c38ffff0c3bffff8a3dffff5640ffff2446ffffa248ffff6e4bffffca72ffffcc83ffff20c3ffffdedbffffb2e7ffffd6f5ffff04fbffff3e990000849b00002a9c000008c200008ac20000a4c40000de550100365601005a5601007a5601000e570100ba580100285901004659010010250200ba170300841b030090250300
+ m_SelectedIDs:
+ m_LastClickedID: 0
+ m_ExpandedIDs: aea8fbfffea8fbffb0acfbffbaaefbff86b8fbffd6b8fbff88bcfbff92befbff14cdfbff70cdfbff22d1fbff2cd3fbff36dbfbff12e3fbff6ce3fbff30e7fbff30e9fbff46f3fbffa2f3fbff66f7fbff66f9fbfff008fcff3e09fcff020dfcff020ffcff522cfcffb463fcff32b8fcff22ccfcff32d0fcff82d0fcff22d4fcff22d6fcff6ad5fdffb8d5fdff58d9fdff58dbfdff7eeffdffa671fefffc97feff5a98feffe89bfefff29dfeff80a8feff50b5feffa4b5feffd8b9feffe2bbfefffce6feff72e7feff84ebfeff8eedfeff2a8cffff36b1ffff76b4ffff86b5ffff7ea80000ea0201002a920100b8f4030082f70300a8f703009c3a04002a7f040058ac0400
m_RenameOverlay:
m_UserAcceptedRename: 0
- m_Name: Button
- m_OriginalName: Button
+ m_Name:
+ m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
- m_UserData: 88632
+ m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
- m_OriginalEventType: 0
+ m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 9}
m_SearchString:
@@ -519,10 +519,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
- x: 281
+ x: 285
y: 73
- width: 1093
- height: 534
+ width: 1118
+ height: 733
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
@@ -533,6 +533,7 @@ MonoBehaviour:
- {fileID: -724036225730276578, guid: f2f77a1f959da1044b07ed06d554a69b, type: 2}
- {fileID: 7066694291420368678, guid: 815797d8f652ff44b8dab25ff9a0cde3, type: 2}
- {fileID: 4626693171902715256, guid: 62b28fe48d7491a4db5f941cb066e3ec, type: 2}
+ - {fileID: 1990495500464979279, guid: 9518d5f73cb8c844aa4165b745c672cb, type: 2}
m_ValueSerializationHelper:
- e00: 1
e01: 0
@@ -550,14 +551,14 @@ MonoBehaviour:
e31: 0
e32: 0
e33: 1
- - e00: 1
+ - e00: 0.94549483
e01: 0
e02: 0
- e03: -29
+ e03: 31.649342
e10: 0
- e11: 1
+ e11: 0.94549483
e12: 0
- e13: 180
+ e13: 190.78792
e20: 0
e21: 0
e22: 1
@@ -598,10 +599,26 @@ MonoBehaviour:
e31: 0
e32: 0
e33: 1
+ - e00: 0.94549483
+ e01: 0
+ e02: 0
+ e03: 24.649284
+ e10: 0
+ e11: 0.94549483
+ e12: 0
+ e13: 102.7879
+ e20: 0
+ e21: 0
+ e22: 1
+ e23: 0
+ e30: 0
+ e31: 0
+ e32: 0
+ e33: 1
m_PreviewAnimator: {fileID: 0}
- m_AnimatorController: {fileID: 9100000, guid: 62b28fe48d7491a4db5f941cb066e3ec, type: 2}
+ m_AnimatorController: {fileID: 9100000, guid: 9518d5f73cb8c844aa4165b745c672cb, type: 2}
m_BreadCrumbs:
- - m_Target: {fileID: 4626693171902715256, guid: 62b28fe48d7491a4db5f941cb066e3ec, type: 2}
+ - m_Target: {fileID: 1990495500464979279, guid: 9518d5f73cb8c844aa4165b745c672cb, type: 2}
m_ScrollPosition: {x: 0, y: 0}
stateMachineGraph: {fileID: 0}
stateMachineGraphGUI: {fileID: 0}
@@ -726,8 +743,8 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
- x: -31715
- y: -31970
+ x: 285
+ y: 73
width: 1118
height: 733
m_ViewDataDictionary: {fileID: 0}
@@ -824,12 +841,12 @@ MonoBehaviour:
layout: 4
- dockPosition: 1
containerId: overlay-container--right
- floating: 0
+ floating: 1
collapsed: 0
displayed: 0
- snapOffset: {x: 0, y: 0}
+ snapOffset: {x: -241, y: -173}
snapOffsetDelta: {x: 0, y: 0}
- snapCorner: 0
+ snapCorner: 3
id: Scene View/Camera
index: 1
layout: 4
@@ -964,9 +981,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
- m_Target: {x: 91.277435, y: 6.8132505, z: 128.8896}
+ m_Target: {x: 92.27141, y: 15.105467, z: 140.35686}
speed: 2
- m_Value: {x: 91.277435, y: 6.8132505, z: 128.8896}
+ m_Value: {x: 92.27141, y: 15.105467, z: 140.35686}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -1013,13 +1030,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
- m_Target: {x: -0.044907745, y: -0.954333, z: 0.22779709, w: -0.1883778}
+ m_Target: {x: -0.012345448, y: -0.9739339, z: 0.21983707, w: -0.054695472}
speed: 2
- m_Value: {x: -0.044562746, y: -0.9545449, z: 0.22784756, w: -0.18693246}
+ m_Value: {x: -0.012345327, y: -0.97392434, z: 0.21983492, w: -0.054694936}
m_Size:
m_Target: 1.1898067
speed: 2
- m_Value: 1.189896
+ m_Value: 1.1898067
m_Ortho:
m_Target: 0
speed: 2
@@ -1037,7 +1054,7 @@ MonoBehaviour:
m_FarClip: 10000
m_DynamicClip: 1
m_OcclusionCulling: 0
- m_LastSceneViewRotation: {x: -0.012508444, y: -0.95910054, z: 0.27974868, w: -0.04308273}
+ m_LastSceneViewRotation: {x: -0.0078941835, y: -0.9656885, z: 0.25792852, w: -0.029559806}
m_LastSceneViewOrtho: 0
m_ReplacementShader: {fileID: 0}
m_ReplacementString:
diff --git a/Server/.idea/workspace.xml b/Server/.idea/workspace.xml
index ed3f638..a256311 100644
--- a/Server/.idea/workspace.xml
+++ b/Server/.idea/workspace.xml
@@ -91,7 +91,8 @@
-
+
+
diff --git a/Server/out/artifacts/Server_jar/Server.jar b/Server/out/artifacts/Server_jar/Server.jar
index a974c0d..1c7cd0a 100644
Binary files a/Server/out/artifacts/Server_jar/Server.jar and b/Server/out/artifacts/Server_jar/Server.jar differ
diff --git a/Server/out/production/Server/Room$1.class b/Server/out/production/Server/Room$1.class
index 926e363..1f962e5 100644
Binary files a/Server/out/production/Server/Room$1.class and b/Server/out/production/Server/Room$1.class differ
diff --git a/Server/out/production/Server/Room$2.class b/Server/out/production/Server/Room$2.class
deleted file mode 100644
index edc1ff8..0000000
Binary files a/Server/out/production/Server/Room$2.class and /dev/null differ
diff --git a/Server/out/production/Server/Room.class b/Server/out/production/Server/Room.class
index 25ab52c..8c66bcf 100644
Binary files a/Server/out/production/Server/Room.class and b/Server/out/production/Server/Room.class differ
diff --git a/Server/out/production/Server/Server$1.class b/Server/out/production/Server/Server$1.class
index 95e4757..19bc059 100644
Binary files a/Server/out/production/Server/Server$1.class and b/Server/out/production/Server/Server$1.class differ
diff --git a/Server/out/production/Server/Server.class b/Server/out/production/Server/Server.class
index e5f47dd..554db26 100644
Binary files a/Server/out/production/Server/Server.class and b/Server/out/production/Server/Server.class differ
diff --git a/Server/src/Room.java b/Server/src/Room.java
index 1912a62..b8858c1 100644
--- a/Server/src/Room.java
+++ b/Server/src/Room.java
@@ -48,47 +48,6 @@ public class Room
startPositions[3] = new Vector3(92, 0, 128);
this.server = server;
-
- //calculates a room timeout
- try
- {
- t = new Timer();
- TimerTask tt = new TimerTask()
- {
- @Override
- public void run()
- {
- try
- {
- for (int p = 0; p < players.length; p++)
- {
- if (players[p] != null)
- {
- if (System.currentTimeMillis() - players[p].lastTimeSendTimeOutCheck > 30000 && players[p].lastTimeSendTimeOutCheck != -1)
- {
- server.deleteRoom(roomCode);
- }
-
- players[p].output.write(new byte[]{126, 0, 0, 0, 0, 0, 0, 0, 0, 0});
- }
- }
- } catch (Exception e)
- {
-
- }
-
- if (System.currentTimeMillis() - timeOut > 600000)
- {
- System.out.println("[" + Server.getDateTime() + "] Room " + roomCode + " closed due to timeout!");
- server.deleteRoom(roomCode);
- }
- }
- };
-
- t.scheduleAtFixedRate(tt, 0, 10000);
- } catch (Exception e)
- {
- }
}
/**
@@ -110,7 +69,7 @@ public class Room
playerCount++;
//LOG
- System.out.println("[" + Server.getDateTime() + "] " + client.name.replace(" ", "") + " joined room " + roomCode + " successfully as player " + i);
+ System.out.println(client.name.replace(" ", "") + " joined room " + roomCode + " successfully as player " + i);
//creates a thread for the connection with the joined player
Thread t = new Thread(new Runnable()
@@ -128,7 +87,7 @@ public class Room
input = new DataInputStream(players[player].socket.getInputStream());
} catch (IOException e)
{
- throw new RuntimeException(e);
+ server.deleteRoom(roomCode);
}
while (true)
@@ -267,9 +226,6 @@ public class Room
}
}
break;
- /**
- * //the timeout check action
- */
case 10:
for (int i = 0; i < players.length; i++)
@@ -283,10 +239,8 @@ public class Room
}
}
break;
-
case 126:
- //!!server action!!
- players[player].lastTimeSendTimeOutCheck = System.currentTimeMillis();
+ server.deleteRoom(roomCode);
break;
}
@@ -344,7 +298,7 @@ public class Room
//stop sending the name................................................................................
} catch (IOException e)
{
-
+ server.deleteRoom(roomCode);
}
}
//if the player should be a bot
@@ -366,7 +320,7 @@ public class Room
players[j].output.write(send);
} catch (IOException e)
{
-
+ server.deleteRoom(roomCode);
}
}
}
@@ -384,7 +338,7 @@ public class Room
}
} catch (IOException e)
{
-
+ server.deleteRoom(roomCode);
}
}
}
@@ -448,6 +402,7 @@ public class Room
try
{
threads.get(i).interrupt();
+ System.out.println("thread " + threads.get(i).getName() + " stopped!");
} catch (Exception e)
{
}
diff --git a/Server/src/Server.java b/Server/src/Server.java
index 0a6f139..7edd4ec 100644
--- a/Server/src/Server.java
+++ b/Server/src/Server.java
@@ -19,27 +19,13 @@ public class Server
private final Server server = this;
//A Formatter for date and time log outputs
- private static DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
-
- /**
- * returns a date and time stamp
- * @return
- */
- public static String getDateTime()
- {
- return dtf.format(LocalDateTime.now());
- }
-
- /**
- * tries to delete a room by its roomcode (will be only called by a rooms timeout for now)
- */
public void deleteRoom(String code)
{
rooms.get(code).closeRoom();
rooms.remove(code);
//LOG
- System.out.println("[" + getDateTime() + "] Room" + code + " successfully deleted");
+ System.out.println("Room" + code + " successfully deleted");
}
/**
@@ -54,19 +40,19 @@ public class Server
serverSocket = new ServerSocket(8051);
//LOG
- System.out.println("[" + getDateTime() + "] Server started! IP 185.245.96.48 PORT 8051");
+ System.out.println("Server started! IP 185.245.96.48 PORT 8051");
//a endless loop for accepting new connections
- while(true)
+ while (true)
{
//accept a connection from a client
Socket tempClient = serverSocket.accept();
//LOG
- System.out.println("[" + getDateTime() + "] Client with IP " + tempClient.getInetAddress().getHostName() + " connected!");
+ System.out.println("Client connected!");
//create a new thread for the connected client to free up main thread resources for new connections
- new Thread(new Runnable()
+ Thread t = new Thread(new Runnable()
{
@Override
public void run()
@@ -90,7 +76,7 @@ public class Server
input.read(readData);
//check for the incoming actions
- switch(readData[0])
+ switch (readData[0])
{
/**
* !!!!!!!!!!!!!!!!!!! 0 is not used because of possible empty arrays read in because of inital connection errors !!!!!!!!!!!!!!!!!!!!
@@ -109,7 +95,7 @@ public class Server
rooms.put(new String(code, StandardCharsets.US_ASCII), room);
//LOG
- System.out.println("[" + getDateTime() + "] Room " + new String(code, StandardCharsets.US_ASCII) + " successfully created!");
+ System.out.println("Room " + new String(code, StandardCharsets.US_ASCII) + " successfully created!");
break;
//in this case a player wants to join an existing room (even the room creator will join via this method)
case 1:
@@ -134,31 +120,35 @@ public class Server
name = name.replace("?", " ");
//check if the room exists
- if(rooms.containsKey(roomCode))
+ if (rooms.containsKey(roomCode))
{
//create the reference to the client
Client client1 = new Client(output, input, client, name);
//move the client to the room
rooms.get(roomCode).addClient(client1);
- }
- else
+ } else
{
//room is not available, so the player should automatically go back to the start menu (kick action)
output.write(new byte[]{127, 0, 0, 0, 0, 0, 0, 0, 0, 0});
}
+ break;
+ case 126:
+ Integer.parseInt("crash");
break;
}
- } catch (Exception e){
- //do not end the program on any main thread errors (unwated connection losses), because other players wont be able to connect to the server
+ } catch (Exception e)
+ {
+ System.out.println("Client disconnected!");
}
}
- }).start();
+ });
+ t.start();
}
- }
- catch(Exception e){
+ } catch (Exception e)
+ {
//do not end the program on any main thread errors (unwated connection losses), because other players wont be able to connect to the server
}
}
@@ -166,6 +156,7 @@ public class Server
/**
* Generates a ascii byte[] room code
* please see the ascii table
+ *
* @return
*/
private byte[] generateRoomCode()
@@ -173,17 +164,17 @@ public class Server
//buffer to store the code
byte[] code = new byte[10];
- for(int i = 0; i < code.length; i++)
+ for (int i = 0; i < code.length; i++)
{
//for the first 5 indexes user numbers (1-9)
- if(i < code.length / 2)
+ if (i < code.length / 2)
{
- code[i] = (byte)(Math.random() * 8 + 49);
+ code[i] = (byte) (Math.random() * 8 + 49);
}
//for the last 5 indexes use letters (A-Z)
else
{
- code[i] = (byte)(Math.random() * 25 + 97);
+ code[i] = (byte) (Math.random() * 25 + 97);
}
}
@@ -191,7 +182,7 @@ public class Server
String roomCode = new String(code, StandardCharsets.US_ASCII);
//in case the room code does allready exists, the roomcode generation will be called recursively
- if(rooms.containsKey(roomCode))
+ if (rooms.containsKey(roomCode))
{
code = generateRoomCode();
}