Gameclient #9
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEngine.Rendering.RayTracingAccelerationStructure;
|
using static UnityEngine.Rendering.RayTracingAccelerationStructure;
|
||||||
|
|
||||||
@@ -24,6 +25,7 @@ namespace Subsystems
|
|||||||
private float _range;
|
private float _range;
|
||||||
private List<TaskData> _availableTasks;
|
private List<TaskData> _availableTasks;
|
||||||
public List<GameObject> Stations { get; private set; }
|
public List<GameObject> Stations { get; private set; }
|
||||||
|
public List<GameObject> TaskStations { get; private set; } = new List<GameObject>();
|
||||||
private StationSettings _stationSettings;
|
private StationSettings _stationSettings;
|
||||||
public GameManager_Game(GameClient client, GameObject player, GameObject map, List<TaskData> availableTasks, float range = 20f, StationSettings stationSettings = null)
|
public GameManager_Game(GameClient client, GameObject player, GameObject map, List<TaskData> availableTasks, float range = 20f, StationSettings stationSettings = null)
|
||||||
{
|
{
|
||||||
@@ -52,7 +54,16 @@ namespace Subsystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void InitializeStation(Position pos, StationType type)
|
public void InitializeTaskStations()
|
||||||
|
{
|
||||||
|
for(int i = 0; i < _gameClient.MyTasks.Count; i++)
|
||||||
|
{
|
||||||
|
System.Random rnd = new System.Random();
|
||||||
|
var task = _availableTasks[rnd.Next(0,_availableTasks.Count)];
|
||||||
|
CreateStation(_gameClient.MyTasks[i].Location, StationType.Task, _gameClient.MyTasks[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void CreateStation(Position pos, StationType type)
|
||||||
{
|
{
|
||||||
GameObject stationPrefab = null;
|
GameObject stationPrefab = null;
|
||||||
PlayerRole? reqRole = null;
|
PlayerRole? reqRole = null;
|
||||||
@@ -61,6 +72,7 @@ namespace Subsystems
|
|||||||
case StationType.Task:
|
case StationType.Task:
|
||||||
stationPrefab = _stationSettings.TaskStationPrefab;
|
stationPrefab = _stationSettings.TaskStationPrefab;
|
||||||
reqRole = PlayerRole.Crew;
|
reqRole = PlayerRole.Crew;
|
||||||
|
Debug.LogError("Task station creation not fully implemented, using task station prefab as placeholder");
|
||||||
break;
|
break;
|
||||||
case StationType.Sabotage:
|
case StationType.Sabotage:
|
||||||
stationPrefab = _stationSettings.SabotageStationPrefab;
|
stationPrefab = _stationSettings.SabotageStationPrefab;
|
||||||
@@ -96,6 +108,18 @@ namespace Subsystems
|
|||||||
Stations.Add(station);
|
Stations.Add(station);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
}
|
||||||
|
private void CreateStation(Position pos, StationType type, GameTask taskInfo)
|
||||||
|
{
|
||||||
|
GameObject stationPrefab = _stationSettings.TaskStationPrefab;
|
||||||
|
var station = UnityEngine.Object.Instantiate(stationPrefab);
|
||||||
|
station.transform.position = pos.ToLocalVector3(_gameClient.CurrentLobbyState.MapData.Center);
|
||||||
|
Stations.Add(station);
|
||||||
|
TaskStation interactable = station.GetComponent<TaskStation>();
|
||||||
|
interactable.Location = pos;
|
||||||
|
interactable.InteractionRange = _range;
|
||||||
|
interactable.TaskID = taskInfo.TaskId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckForPlayers()
|
void CheckForPlayers()
|
||||||
|
|||||||
161
ProjectSettings/Packages/com.unity.probuilder/Settings.json
Normal file
161
ProjectSettings/Packages/com.unity.probuilder/Settings.json
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
{
|
||||||
|
"m_Dictionary": {
|
||||||
|
"m_DictionaryValues": [
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.LogLevel, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "log.level",
|
||||||
|
"value": "{\"m_Value\":3}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.LogOutput, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "log.output",
|
||||||
|
"value": "{\"m_Value\":1}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "log.path",
|
||||||
|
"value": "{\"m_Value\":\"ProBuilderLog.txt\"}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "about.identifier",
|
||||||
|
"value": "{\"m_Value\":{\"m_Major\":6,\"m_Minor\":0,\"m_Patch\":9,\"m_Build\":-1,\"m_Type\":\"\",\"m_Metadata\":\"\",\"m_Date\":\"\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.SemVer, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "preferences.version",
|
||||||
|
"value": "{\"m_Value\":{\"m_Major\":6,\"m_Minor\":0,\"m_Patch\":9,\"m_Build\":-1,\"m_Type\":\"\",\"m_Metadata\":\"\",\"m_Date\":\"\"}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "ShapeComponent.ResetSettings",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "mesh.newShapesSnapToGrid",
|
||||||
|
"value": "{\"m_Value\":true}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "mesh.meshColliderIsConvex",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "lightmapping.autoUnwrapLightmapUV",
|
||||||
|
"value": "{\"m_Value\":true}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "editor.autoRecalculateCollisions",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "experimental.enabled",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "meshImporter.quads",
|
||||||
|
"value": "{\"m_Value\":true}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "meshImporter.smoothing",
|
||||||
|
"value": "{\"m_Value\":true}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "editor.autoUpdatePreview",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "ShapeComponent.SettingsEnabled",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "editor.backFaceSelectEnabled",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "editor.showSceneInfo",
|
||||||
|
"value": "{\"m_Value\":false}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Material, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "mesh.userMaterial",
|
||||||
|
"value": "{\"m_Value\":{\"instanceID\":0}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Rendering.ShadowCastingMode, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "mesh.shadowCastingMode",
|
||||||
|
"value": "{\"m_Value\":1}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEditor.StaticEditorFlags, UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "mesh.defaultStaticEditorFlags",
|
||||||
|
"value": "{\"m_Value\":0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.ColliderType, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "mesh.newShapeColliderType",
|
||||||
|
"value": "{\"m_Value\":2}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.UnwrapParameters, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "lightmapping.defaultLightmapUnwrapParameters",
|
||||||
|
"value": "{\"m_Value\":{\"m_HardAngle\":88.0,\"m_PackMargin\":20.0,\"m_AngleError\":8.0,\"m_AreaError\":15.0}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "s_SelectMode",
|
||||||
|
"value": "{\"m_Value\":4}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "meshImporter.smoothingAngle",
|
||||||
|
"value": "{\"m_Value\":1.0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "BevelEdges.size",
|
||||||
|
"value": "{\"m_Value\":0.20000000298023225}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "ShapeBuilder.ActiveShapeIndex",
|
||||||
|
"value": "{\"m_Value\":6}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastSize.Cube",
|
||||||
|
"value": "{\"m_Value\":{\"x\":-1.2792290449142457,\"y\":-15.89394760131836,\"z\":-1.322575569152832}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.LastRotation.Cube",
|
||||||
|
"value": "{\"m_Value\":{\"x\":0.0,\"y\":0.0,\"z\":0.0,\"w\":1.0}}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.PivotLocation, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.PivotLocation.Cube",
|
||||||
|
"value": "{\"m_Value\":0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.Shapes.Shape, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "ShapeBuilder.Cube",
|
||||||
|
"value": "{}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "editor.dragSelectRectMode",
|
||||||
|
"value": "{\"m_Value\":0}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user