Commit 81cb57be by alsunj

wait for players to connect and and gameplayingtag to start the game

parent eb4285c5
Showing with 541 additions and 189 deletions
...@@ -6,6 +6,9 @@ public class EntitiesReferencesAuthoring : MonoBehaviour ...@@ -6,6 +6,9 @@ public class EntitiesReferencesAuthoring : MonoBehaviour
{ {
public GameObject playerPrefabGameObject; public GameObject playerPrefabGameObject;
public GameObject RespawnEntity; public GameObject RespawnEntity;
public GameObject RougeEnemyGameObject;
public GameObject SlimeEnemyGameObject;
public GameObject HealthBarPrefab; public GameObject HealthBarPrefab;
public class Baker : Baker<EntitiesReferencesAuthoring> public class Baker : Baker<EntitiesReferencesAuthoring>
...@@ -15,7 +18,9 @@ public class EntitiesReferencesAuthoring : MonoBehaviour ...@@ -15,7 +18,9 @@ public class EntitiesReferencesAuthoring : MonoBehaviour
Entity entity = GetEntity(TransformUsageFlags.Dynamic); Entity entity = GetEntity(TransformUsageFlags.Dynamic);
AddComponent(entity, new EntititesReferences AddComponent(entity, new EntititesReferences
{ {
playerPrefabEntity = GetEntity(authoring.playerPrefabGameObject, TransformUsageFlags.Dynamic), PlayerPrefabEntity = GetEntity(authoring.playerPrefabGameObject, TransformUsageFlags.Dynamic),
RougeEnemyEntity = GetEntity(authoring.RougeEnemyGameObject, TransformUsageFlags.Dynamic),
SlimeEnemyEntity = GetEntity(authoring.SlimeEnemyGameObject, TransformUsageFlags.Dynamic),
RespawnEntity = GetEntity(authoring.RespawnEntity, TransformUsageFlags.None) RespawnEntity = GetEntity(authoring.RespawnEntity, TransformUsageFlags.None)
}); });
AddComponentObject(entity, new UIPrefabs AddComponentObject(entity, new UIPrefabs
...@@ -31,7 +36,10 @@ public class EntitiesReferencesAuthoring : MonoBehaviour ...@@ -31,7 +36,10 @@ public class EntitiesReferencesAuthoring : MonoBehaviour
public struct EntititesReferences : IComponentData public struct EntititesReferences : IComponentData
{ {
public Entity playerPrefabEntity; public Entity PlayerPrefabEntity;
public Entity RougeEnemyEntity;
public Entity SlimeEnemyEntity;
public Entity RespawnEntity; public Entity RespawnEntity;
} }
......
fileFormatVersion: 2
guid: 55b823e47914f9f4fba8b5a443660640
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using Unity.Entities;
using UnityEngine;
public class GameStartPropertiesAuthoring : MonoBehaviour
{
public int gameStartCountDownTime;
public class GameStartPropertiesBaker : Baker<GameStartPropertiesAuthoring>
{
public override void Bake(GameStartPropertiesAuthoring authoring)
{
Entity entity = GetEntity(TransformUsageFlags.None);
AddComponent(entity, new GameStartProperties
{
CountdownTime = authoring.gameStartCountDownTime,
});
AddComponent(entity, new SpawnableEnemiesCounter
{
SlimeEnemyCounter = 0,
RogueEnemyCounter = 0
});
AddComponent<PlayersRemainingToStart>(entity);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 9ad6c4754c599be47b8b5b4400eb8acc
\ No newline at end of file
using Unity.Entities;
using Unity.NetCode;
public struct GamePlayingTag : IComponentData
{
}
public struct GameStartTick : IComponentData
{
public NetworkTick Value;
}
public struct GameStartProperties : IComponentData
{
public int CountdownTime;
public int PlayerAmount;
public int RogueEnemyAmount;
public int SlimeEnemyAmount;
}
public struct PlayerCounter : IComponentData
{
public int Value;
}
public struct SpawnableEnemiesCounter : IComponentData
{
public int SlimeEnemyCounter;
public int RogueEnemyCounter;
}
\ No newline at end of file
fileFormatVersion: 2
guid: 6a4b580d47a4b3643907a89462a3d17f
\ No newline at end of file
using Unity.NetCode; using Unity.NetCode;
using UnityEngine;
public struct GoInGameRequestRpc : IRpcCommand public struct GoInGameRequestRpc : IRpcCommand
{ {
...@@ -9,13 +8,6 @@ public struct ClientConnectionRpc : IRpcCommand ...@@ -9,13 +8,6 @@ public struct ClientConnectionRpc : IRpcCommand
{ {
} }
public struct EnemyAmountRpc : IRpcCommand
{
public int PlayerAmount;
public int RogueEnemyAmount;
public int SlimeEnemyAmount;
}
public struct PlayersRemainingToStart : IRpcCommand public struct PlayersRemainingToStart : IRpcCommand
{ {
public int Value; public int Value;
......
using Unity.Collections; using Unity.Collections;
using Unity.Entities; using Unity.Entities;
using Unity.Mathematics;
using Unity.NetCode; using Unity.NetCode;
using Unity.Transforms;
using UnityEngine; using UnityEngine;
...@@ -16,7 +14,6 @@ public partial struct ClientRequestGameEntrySystem : ISystem ...@@ -16,7 +14,6 @@ public partial struct ClientRequestGameEntrySystem : ISystem
.WithNone<NetworkStreamInGame>(); .WithNone<NetworkStreamInGame>();
state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder)); state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder));
entityQueryBuilder.Dispose(); entityQueryBuilder.Dispose();
state.RequireForUpdate<ClientConnectionRpc>();
} }
public void OnUpdate(ref SystemState state) public void OnUpdate(ref SystemState state)
...@@ -37,8 +34,8 @@ public partial struct ClientRequestGameEntrySystem : ISystem ...@@ -37,8 +34,8 @@ public partial struct ClientRequestGameEntrySystem : ISystem
FollowPlayer followScript = playerCameraGO.AddComponent<FollowPlayer>(); FollowPlayer followScript = playerCameraGO.AddComponent<FollowPlayer>();
followScript.networkId = networkId.ValueRO.Value; // Store networkId instead of dire followScript.networkId = networkId.ValueRO.Value; // Store networkId instead of dire
entityCommandBuffer.AddComponent(requestGameConnection, new GoInGameRequestRpc()); entityCommandBuffer.AddComponent<GoInGameRequestRpc>(requestGameConnection);
entityCommandBuffer.AddComponent(requestGameConnection, new SendRpcCommandRequest()); entityCommandBuffer.AddComponent<SendRpcCommandRequest>(requestGameConnection);
} }
entityCommandBuffer.Playback(state.EntityManager); entityCommandBuffer.Playback(state.EntityManager);
...@@ -55,7 +52,6 @@ public partial struct ThinClientRequestGameEntrySystem : ISystem ...@@ -55,7 +52,6 @@ public partial struct ThinClientRequestGameEntrySystem : ISystem
.WithNone<NetworkStreamInGame>(); .WithNone<NetworkStreamInGame>();
state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder)); state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder));
entityQueryBuilder.Dispose(); entityQueryBuilder.Dispose();
state.RequireForUpdate<ClientConnectionRpc>();
} }
public void OnUpdate(ref SystemState state) public void OnUpdate(ref SystemState state)
...@@ -72,8 +68,8 @@ public partial struct ThinClientRequestGameEntrySystem : ISystem ...@@ -72,8 +68,8 @@ public partial struct ThinClientRequestGameEntrySystem : ISystem
var requestGameConnection = entityCommandBuffer.CreateEntity(); var requestGameConnection = entityCommandBuffer.CreateEntity();
entityCommandBuffer.AddComponent(requestGameConnection, new GoInGameRequestRpc()); entityCommandBuffer.AddComponent<GoInGameRequestRpc>(requestGameConnection);
entityCommandBuffer.AddComponent(requestGameConnection, new SendRpcCommandRequest()); entityCommandBuffer.AddComponent<SendRpcCommandRequest>(requestGameConnection);
} }
entityCommandBuffer.Playback(state.EntityManager); entityCommandBuffer.Playback(state.EntityManager);
......
using System;
using Unity.Burst; using Unity.Burst;
using Unity.Collections;
using Unity.Entities; using Unity.Entities;
using Unity.NetCode;
partial struct ClientStartGameSystem : ISystem [WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation)]
public partial class ClientStartGameSystem : SystemBase
{ {
[BurstCompile] public Action<int> OnUpdatePlayersRemainingToStart;
public void OnCreate(ref SystemState state) public Action OnStartGameCountdown;
{
}
[BurstCompile] protected override void OnUpdate()
public void OnUpdate(ref SystemState state)
{ {
var ecb = new EntityCommandBuffer(Allocator.Temp);
}
[BurstCompile] foreach (var (playersRemainingToStart, entity) in SystemAPI.Query<PlayersRemainingToStart>()
public void OnDestroy(ref SystemState state) .WithAll<ReceiveRpcCommandRequest>().WithEntityAccess())
{ {
ecb.DestroyEntity(entity);
OnUpdatePlayersRemainingToStart?.Invoke(playersRemainingToStart.Value);
}
foreach (var (gameStartTick, entity) in SystemAPI.Query<GameStartTickRpc>()
.WithAll<ReceiveRpcCommandRequest>().WithEntityAccess())
{
ecb.DestroyEntity(entity);
OnStartGameCountdown?.Invoke();
var gameStartEntity = ecb.CreateEntity();
//creates the entity about when the game has started on client side
ecb.AddComponent(gameStartEntity, new GameStartTick
{
Value = gameStartTick.Value
});
}
ecb.Playback(EntityManager);
} }
} }
\ No newline at end of file
using System;
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity.NetCode;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup))]
public partial class CountdownToGameStartSystem : SystemBase
{
public Action<int> OnUpdateCountdownText;
public Action OnCountdownEnd;
protected override void OnCreate()
{
RequireForUpdate<NetworkTime>();
}
protected override void OnUpdate()
{
var networkTime = SystemAPI.GetSingleton<NetworkTime>();
if (!networkTime.IsFirstTimeFullyPredictingTick) return;
var currentTick = networkTime.ServerTick;
var ecb = new EntityCommandBuffer(Allocator.Temp);
foreach (var (gameStartTick, entity) in SystemAPI.Query<GameStartTick>().WithAll<Simulate>().WithEntityAccess())
{
if (currentTick.Equals(gameStartTick.Value) || currentTick.IsNewerThan(gameStartTick.Value))
{
var gamePlayingEntity = ecb.CreateEntity();
ecb.SetName(gamePlayingEntity, "GamePlayingEntity");
ecb.AddComponent<GamePlayingTag>(gamePlayingEntity);
ecb.DestroyEntity(entity);
OnCountdownEnd?.Invoke();
}
else
{
var ticksToStart = gameStartTick.Value.TickIndexForValidTick - currentTick.TickIndexForValidTick;
var simulationTickRate = NetCodeConfig.Global.ClientServerTickRate.SimulationTickRate;
var secondsToStart = (int)math.ceil((float)ticksToStart / simulationTickRate);
OnUpdateCountdownText?.Invoke(secondsToStart);
}
}
ecb.Playback(EntityManager);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: a3d2365e397acb8428489444c6f254fe
\ No newline at end of file
using Unity.Burst; // using Unity.Burst;
using Unity.Collections; // using Unity.Collections;
using Unity.Entities; // using Unity.Entities;
using Unity.NetCode; // using Unity.NetCode;
using UnityEngine; // using UnityEngine;
//
// [WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation | WorldSystemFilterFlags.ThinClientSimulation)]
// partial struct GoInGameClientSystem : ISystem
// {
// [BurstCompile]
// public void OnCreate(ref SystemState state)
// {
// EntityQueryBuilder entityQueryBuilder = new EntityQueryBuilder(Allocator.Temp)
// .WithAll<NetworkId>()
// .WithNone<NetworkStreamInGame>();
// state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder));
// entityQueryBuilder.Dispose();
// }
//
// public void OnUpdate(ref SystemState state)
// {
// EntityCommandBuffer entityCommandBuffer = new EntityCommandBuffer(Unity.Collections.Allocator.Temp);
// foreach ((
// RefRO<NetworkId> networkId,
// Entity entity)
// in SystemAPI.Query
// <RefRO<NetworkId>>().WithNone<NetworkStreamInGame>().WithEntityAccess())
// {
// entityCommandBuffer.AddComponent<NetworkStreamInGame>(entity);
//
// Entity rpcEntity = entityCommandBuffer.CreateEntity();
// GameObject playerCameraGO = new GameObject($"Camera{networkId.ValueRO.Value}");
// playerCameraGO.AddComponent<Camera>();
//
// // Assign the player entity to FollowPlayer script
// FollowPlayer followScript = playerCameraGO.AddComponent<FollowPlayer>();
// followScript.networkId = networkId.ValueRO.Value; // Store networkId instead of dire
//
// entityCommandBuffer.AddComponent<GoInGameRequestRpc>(rpcEntity);
// entityCommandBuffer.AddComponent<SendRpcCommandRequest>(rpcEntity);
// }
//
// entityCommandBuffer.Playback(state.EntityManager);
// }
//
// [BurstCompile]
// public void OnDestroy(ref SystemState state)
// {
// }
// }
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation | WorldSystemFilterFlags.ThinClientSimulation)]
partial struct GoInGameClientSystem : ISystem
{
[BurstCompile]
public void OnCreate(ref SystemState state)
{
EntityQueryBuilder entityQueryBuilder = new EntityQueryBuilder(Allocator.Temp)
.WithAll<NetworkId>()
.WithNone<NetworkStreamInGame>();
state.RequireForUpdate(state.GetEntityQuery(entityQueryBuilder));
entityQueryBuilder.Dispose();
}
public void OnUpdate(ref SystemState state)
{
EntityCommandBuffer entityCommandBuffer = new EntityCommandBuffer(Unity.Collections.Allocator.Temp);
foreach ((
RefRO<NetworkId> networkId,
Entity entity)
in SystemAPI.Query
<RefRO<NetworkId>>().WithNone<NetworkStreamInGame>().WithEntityAccess())
{
entityCommandBuffer.AddComponent<NetworkStreamInGame>(entity);
Entity rpcEntity = entityCommandBuffer.CreateEntity();
GameObject playerCameraGO = new GameObject($"Camera{networkId.ValueRO.Value}");
playerCameraGO.AddComponent<Camera>();
// Assign the player entity to FollowPlayer script
FollowPlayer followScript = playerCameraGO.AddComponent<FollowPlayer>();
followScript.networkId = networkId.ValueRO.Value; // Store networkId instead of dire
entityCommandBuffer.AddComponent<GoInGameRequestRpc>(rpcEntity);
entityCommandBuffer.AddComponent<SendRpcCommandRequest>(rpcEntity);
}
entityCommandBuffer.Playback(state.EntityManager);
}
[BurstCompile]
public void OnDestroy(ref SystemState state)
{
}
}
\ No newline at end of file
...@@ -11,6 +11,7 @@ partial struct GoInGameServerSystem : ISystem ...@@ -11,6 +11,7 @@ partial struct GoInGameServerSystem : ISystem
[BurstCompile] [BurstCompile]
public void OnCreate(ref SystemState state) public void OnCreate(ref SystemState state)
{ {
state.RequireForUpdate<PlayerCounter>();
state.RequireForUpdate<EntititesReferences>(); state.RequireForUpdate<EntititesReferences>();
state.RequireForUpdate<NetworkId>(); state.RequireForUpdate<NetworkId>();
state.RequireForUpdate<GoInGameRequestRpc>(); state.RequireForUpdate<GoInGameRequestRpc>();
...@@ -21,7 +22,12 @@ partial struct GoInGameServerSystem : ISystem ...@@ -21,7 +22,12 @@ partial struct GoInGameServerSystem : ISystem
{ {
EntityCommandBuffer entityCommandBuffer = new EntityCommandBuffer(Unity.Collections.Allocator.Temp); EntityCommandBuffer entityCommandBuffer = new EntityCommandBuffer(Unity.Collections.Allocator.Temp);
EntititesReferences entititesReferences = SystemAPI.GetSingleton<EntititesReferences>(); EntititesReferences entititesReferences = SystemAPI.GetSingleton<EntititesReferences>();
Entity gameStartPropertiesEntity = SystemAPI.GetSingletonEntity<PlayerCounter>();
PlayerCounter playerCounter = SystemAPI.GetComponent<PlayerCounter>(gameStartPropertiesEntity);
GameStartProperties gameStartProperties =
SystemAPI.GetComponent<GameStartProperties>(gameStartPropertiesEntity);
foreach (( foreach ((
RefRO<ReceiveRpcCommandRequest> receiveRpcCommandRequest, RefRO<ReceiveRpcCommandRequest> receiveRpcCommandRequest,
Entity entity) in Entity entity) in
...@@ -36,7 +42,7 @@ partial struct GoInGameServerSystem : ISystem ...@@ -36,7 +42,7 @@ partial struct GoInGameServerSystem : ISystem
// Instantiate player entity and place randomly on the x axis -+10 // Instantiate player entity and place randomly on the x axis -+10
Entity playerEntity = entityCommandBuffer.Instantiate(entititesReferences.playerPrefabEntity); Entity playerEntity = entityCommandBuffer.Instantiate(entititesReferences.PlayerPrefabEntity);
entityCommandBuffer.SetComponent(playerEntity, LocalTransform.FromPosition(new float3( entityCommandBuffer.SetComponent(playerEntity, LocalTransform.FromPosition(new float3(
UnityEngine.Random.Range(-10, +10), 0, 0))); UnityEngine.Random.Range(-10, +10), 0, 0)));
...@@ -51,9 +57,41 @@ partial struct GoInGameServerSystem : ISystem ...@@ -51,9 +57,41 @@ partial struct GoInGameServerSystem : ISystem
{ {
Value = playerEntity Value = playerEntity
}); });
playerCounter.Value++;
int playersRemainingToStart = gameStartProperties.PlayerAmount - playerCounter.Value;
var gameStartRpc = entityCommandBuffer.CreateEntity();
if (playersRemainingToStart <= 0 && !SystemAPI.HasSingleton<GamePlayingTag>())
{
var simulationTickRate = NetCodeConfig.Global.ClientServerTickRate.SimulationTickRate;
var ticksUntilStart = (uint)(simulationTickRate * gameStartProperties.CountdownTime);
var gameStartTick = SystemAPI.GetSingleton<NetworkTime>().ServerTick;
gameStartTick.Add(ticksUntilStart);
// sends data to client about on what tick the game should start.
entityCommandBuffer.AddComponent(gameStartRpc, new GameStartTickRpc
{
Value = gameStartTick
});
//creates the entity about when the game has started on server side
var gameStartEntity = entityCommandBuffer.CreateEntity();
entityCommandBuffer.AddComponent(gameStartEntity, new GameStartTick
{
Value = gameStartTick
});
}
else
{
entityCommandBuffer.AddComponent(gameStartRpc,
new PlayersRemainingToStart { Value = playersRemainingToStart });
}
entityCommandBuffer.AddComponent<SendRpcCommandRequest>(gameStartRpc);
} }
entityCommandBuffer.Playback(state.EntityManager); entityCommandBuffer.Playback(state.EntityManager);
SystemAPI.SetSingleton(playerCounter);
} }
[BurstCompile] [BurstCompile]
......
using Unity.Burst; using Unity.Burst;
using Unity.Collections;
using Unity.Entities; using Unity.Entities;
using Unity.NetCode;
[WorldSystemFilter(WorldSystemFilterFlags.ServerSimulation)]
partial struct ServerStartGameSystem : ISystem partial struct ServerStartGameSystem : ISystem
{ {
[BurstCompile]
public void OnCreate(ref SystemState state) public void OnCreate(ref SystemState state)
{ {
state.RequireForUpdate<NetworkTime>();
state.RequireForUpdate<GameStartProperties>();
state.RequireForUpdate<EntititesReferences>();
state.RequireForUpdate<GamePlayingTag>(); // var builder = new EntityQueryBuilder(Allocator.Temp).WithAll<MobaTeamRequest, ReceiveRpcCommandRequest>();
// state.RequireForUpdate(state.GetEntityQuery(builder));
} }
}
[BurstCompile] \ No newline at end of file
public void OnUpdate(ref SystemState state)
{
}
[BurstCompile]
public void OnDestroy(ref SystemState state)
{
}
}
...@@ -49,10 +49,10 @@ public partial class RespawnPlayerSystem : SystemBase ...@@ -49,10 +49,10 @@ public partial class RespawnPlayerSystem : SystemBase
{ {
if (isServer) if (isServer)
{ {
var networkId = SystemAPI.GetComponent<NetworkId>(curRespawn.NetworkEntity).Value; int networkId = SystemAPI.GetComponent<NetworkId>(curRespawn.NetworkEntity).Value;
var playerPrefab = SystemAPI.GetSingleton<EntititesReferences>().playerPrefabEntity; Entity playerPrefab = SystemAPI.GetSingleton<EntititesReferences>().PlayerPrefabEntity;
var newPlayer = ecb.Instantiate(playerPrefab); Entity newPlayer = ecb.Instantiate(playerPrefab);
ecb.SetComponent(newPlayer, new GhostOwner { NetworkId = networkId }); ecb.SetComponent(newPlayer, new GhostOwner { NetworkId = networkId });
ecb.SetComponent(newPlayer, ecb.SetComponent(newPlayer,
......
...@@ -15,7 +15,11 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -15,7 +15,11 @@ public class ClientConnectionManager : MonoBehaviour
[SerializeField] private TMP_InputField _playerAmountField; [SerializeField] private TMP_InputField _playerAmountField;
[SerializeField] private TMP_InputField _RogueEnemyAmountField; [SerializeField] private TMP_InputField _RogueEnemyAmountField;
[SerializeField] private TMP_InputField _SlimeEnemyAmountField; [SerializeField] private TMP_InputField _SlimeEnemyAmountField;
[SerializeField] private GameObject LobbyAmountContainer;
[SerializeField] private GameObject RangerAmountContainer;
[SerializeField] private GameObject SlimeAmountContainer;
[SerializeField] private Button _connectButton; [SerializeField] private Button _connectButton;
[SerializeField] private int _gameStartCountDownTime;
private ushort Port => ushort.Parse(_portField.text); private ushort Port => ushort.Parse(_portField.text);
private int PlayerAmount => int.Parse(_playerAmountField.text); private int PlayerAmount => int.Parse(_playerAmountField.text);
...@@ -45,12 +49,15 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -45,12 +49,15 @@ public class ClientConnectionManager : MonoBehaviour
{ {
case 0: case 0:
buttonLabel = "Start Host"; buttonLabel = "Start Host";
LobbyAmountContainer.SetActive(true);
RangerAmountContainer.SetActive(true);
SlimeAmountContainer.SetActive(true);
break; break;
case 1: case 1:
buttonLabel = "Start Server";
break;
case 2:
buttonLabel = "Start Client"; buttonLabel = "Start Client";
LobbyAmountContainer.SetActive(false);
RangerAmountContainer.SetActive(false);
SlimeAmountContainer.SetActive(false);
break; break;
default: default:
buttonLabel = "<ERROR>"; buttonLabel = "<ERROR>";
...@@ -62,6 +69,7 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -62,6 +69,7 @@ public class ClientConnectionManager : MonoBehaviour
buttonText.text = buttonLabel; buttonText.text = buttonLabel;
} }
private void OnButtonConnect() private void OnButtonConnect()
{ {
DestroyLocalSimulationWorld(); DestroyLocalSimulationWorld();
...@@ -74,9 +82,6 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -74,9 +82,6 @@ public class ClientConnectionManager : MonoBehaviour
StartClient(); StartClient();
break; break;
case 1: case 1:
StartServer();
break;
case 2:
StartClient(); StartClient();
break; break;
default: default:
...@@ -107,14 +112,21 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -107,14 +112,21 @@ public class ClientConnectionManager : MonoBehaviour
serverWorld.EntityManager.CreateEntityQuery(ComponentType.ReadWrite<NetworkStreamDriver>()); serverWorld.EntityManager.CreateEntityQuery(ComponentType.ReadWrite<NetworkStreamDriver>());
networkDriverQuery.GetSingletonRW<NetworkStreamDriver>().ValueRW.Listen(serverEndpoint); networkDriverQuery.GetSingletonRW<NetworkStreamDriver>().ValueRW.Listen(serverEndpoint);
} }
var enemyAmountEntity = serverWorld.EntityManager.CreateEntity(); // Create the entity and add components directly.
var configEntity = serverWorld.EntityManager.CreateEntity();
serverWorld.EntityManager.AddComponentData(enemyAmountEntity, new EnemyAmountRpc serverWorld.EntityManager.AddComponentData(configEntity, new GameStartProperties
{ {
CountdownTime = _gameStartCountDownTime,
PlayerAmount = PlayerAmount, PlayerAmount = PlayerAmount,
RogueEnemyAmount = RogueEnemyAmount, RogueEnemyAmount = RogueEnemyAmount,
SlimeEnemyAmount = SlimeEnemyAmount SlimeEnemyAmount = SlimeEnemyAmount
}); });
serverWorld.EntityManager.AddComponentData(configEntity, new SpawnableEnemiesCounter
{
SlimeEnemyCounter = 0,
RogueEnemyCounter = 0
});
serverWorld.EntityManager.AddComponentData(configEntity, new PlayerCounter { Value = 0 });
} }
private void StartClient() private void StartClient()
......
using System.Collections;
using TMPro;
using Unity.Entities;
using Unity.NetCode;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class GameStartUIController : MonoBehaviour
{
[SerializeField] private GameObject _beginGamePanel;
[SerializeField] private GameObject _confirmQuitPanel;
[SerializeField] private GameObject _countdownPanel;
[SerializeField] private Button _quitWaitingButton;
[SerializeField] private Button _confirmQuitButton;
[SerializeField] private Button _cancelQuitButton;
[SerializeField] private TextMeshProUGUI _waitingText;
[SerializeField] private TextMeshProUGUI _countdownText;
private EntityQuery _networkConnectionQuery;
private EntityManager _entityManager;
private void OnEnable()
{
_beginGamePanel.SetActive(true);
_quitWaitingButton.onClick.AddListener(AttemptQuitWaiting);
_confirmQuitButton.onClick.AddListener(ConfirmQuit);
_cancelQuitButton.onClick.AddListener(CancelQuit);
if (World.DefaultGameObjectInjectionWorld == null) return;
_entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
_networkConnectionQuery = _entityManager.CreateEntityQuery(typeof(NetworkStreamConnection));
var startGameSystem = World.DefaultGameObjectInjectionWorld.GetExistingSystemManaged<ClientStartGameSystem>();
if (startGameSystem != null)
{
startGameSystem.OnUpdatePlayersRemainingToStart += UpdatePlayerRemainingText;
startGameSystem.OnStartGameCountdown += BeginCountdown;
}
var countdownSystem = World.DefaultGameObjectInjectionWorld
.GetExistingSystemManaged<CountdownToGameStartSystem>();
if (countdownSystem != null)
{
countdownSystem.OnUpdateCountdownText += UpdateCountdownText;
countdownSystem.OnCountdownEnd += EndCountdown;
}
}
private void OnDisable()
{
_quitWaitingButton.onClick.RemoveAllListeners();
_confirmQuitButton.onClick.RemoveAllListeners();
_cancelQuitButton.onClick.RemoveAllListeners();
if (World.DefaultGameObjectInjectionWorld == null) return;
var startGameSystem = World.DefaultGameObjectInjectionWorld.GetExistingSystemManaged<ClientStartGameSystem>();
if (startGameSystem != null)
{
startGameSystem.OnUpdatePlayersRemainingToStart -= UpdatePlayerRemainingText;
startGameSystem.OnStartGameCountdown -= BeginCountdown;
}
var countdownSystem = World.DefaultGameObjectInjectionWorld
.GetExistingSystemManaged<CountdownToGameStartSystem>();
if (countdownSystem != null)
{
countdownSystem.OnUpdateCountdownText -= UpdateCountdownText;
countdownSystem.OnCountdownEnd -= EndCountdown;
}
}
private void UpdatePlayerRemainingText(int playersRemainingToStart)
{
var playersText = playersRemainingToStart == 1 ? "player" : "players";
_waitingText.text = $"Waiting for {playersRemainingToStart.ToString()} more {playersText} to join...";
}
private void UpdateCountdownText(int countdownTime)
{
_countdownText.text = countdownTime.ToString();
}
private void AttemptQuitWaiting()
{
_beginGamePanel.SetActive(false);
_confirmQuitPanel.SetActive(true);
}
private void ConfirmQuit()
{
StartCoroutine(DisconnectDelay());
}
IEnumerator DisconnectDelay()
{
yield return new WaitForSeconds(1f);
if (_networkConnectionQuery.TryGetSingletonEntity<NetworkStreamConnection>(out var networkConnectionEntity))
{
World.DefaultGameObjectInjectionWorld.EntityManager.AddComponent<NetworkStreamRequestDisconnect>(
networkConnectionEntity);
}
World.DisposeAllWorlds();
SceneManager.LoadScene(0);
}
private void CancelQuit()
{
_confirmQuitPanel.SetActive(false);
_beginGamePanel.SetActive(true);
}
private void BeginCountdown()
{
_beginGamePanel.SetActive(false);
_confirmQuitPanel.SetActive(false);
_countdownPanel.SetActive(true);
}
private void EndCountdown()
{
_countdownPanel.SetActive(false);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: acd1a90c6b93e8a4ebf28b99386b7892
\ No newline at end of file
...@@ -1285,7 +1285,7 @@ MonoBehaviour: ...@@ -1285,7 +1285,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: "7979\u200B" m_text: "1\u200B"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -1421,7 +1421,7 @@ MonoBehaviour: ...@@ -1421,7 +1421,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: Ranger Enemy m_text: 'Ranger Amount:'
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -1557,7 +1557,7 @@ MonoBehaviour: ...@@ -1557,7 +1557,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: 'Connection Port:' m_text: 'Slime Amount:'
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -2178,9 +2178,6 @@ MonoBehaviour: ...@@ -2178,9 +2178,6 @@ MonoBehaviour:
- m_Text: Host (Client + Server) - m_Text: Host (Client + Server)
m_Image: {fileID: 0} m_Image: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_Text: Server (Server Only)
m_Image: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_Text: Client (Client Only) - m_Text: Client (Client Only)
m_Image: {fileID: 0} m_Image: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
...@@ -2625,7 +2622,7 @@ MonoBehaviour: ...@@ -2625,7 +2622,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: "7979\u200B" m_text: "100\u200B"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -2709,7 +2706,7 @@ GameObject: ...@@ -2709,7 +2706,7 @@ GameObject:
- component: {fileID: 7879318744620076301} - component: {fileID: 7879318744620076301}
- component: {fileID: 3534326167216121825} - component: {fileID: 3534326167216121825}
m_Layer: 5 m_Layer: 5
m_Name: PortInputField (TMP) m_Name: PlayerInputField (TMP)
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -2859,7 +2856,7 @@ MonoBehaviour: ...@@ -2859,7 +2856,7 @@ MonoBehaviour:
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0 m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text: 7979 m_Text: 1
m_CaretBlinkRate: 0.85 m_CaretBlinkRate: 0.85
m_CaretWidth: 1 m_CaretWidth: 1
m_ReadOnly: 0 m_ReadOnly: 0
...@@ -3003,7 +3000,7 @@ MonoBehaviour: ...@@ -3003,7 +3000,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: "7979\u200B" m_text: "10\u200B"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
...@@ -3214,7 +3211,7 @@ GameObject: ...@@ -3214,7 +3211,7 @@ GameObject:
- component: {fileID: 7912536268569717590} - component: {fileID: 7912536268569717590}
- component: {fileID: 8650075725555599494} - component: {fileID: 8650075725555599494}
m_Layer: 5 m_Layer: 5
m_Name: PortInputField (TMP) m_Name: RangerInputField (TMP)
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -3364,7 +3361,7 @@ MonoBehaviour: ...@@ -3364,7 +3361,7 @@ MonoBehaviour:
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0 m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text: 7979 m_Text: 10
m_CaretBlinkRate: 0.85 m_CaretBlinkRate: 0.85
m_CaretWidth: 1 m_CaretWidth: 1
m_ReadOnly: 0 m_ReadOnly: 0
...@@ -4640,7 +4637,7 @@ GameObject: ...@@ -4640,7 +4637,7 @@ GameObject:
- component: {fileID: 1920909873846200060} - component: {fileID: 1920909873846200060}
- component: {fileID: 5105218363004495263} - component: {fileID: 5105218363004495263}
m_Layer: 5 m_Layer: 5
m_Name: PortInputField (TMP) m_Name: SlimeInputField (TMP)
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
...@@ -4790,7 +4787,7 @@ MonoBehaviour: ...@@ -4790,7 +4787,7 @@ MonoBehaviour:
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0 m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text: 7979 m_Text: 100
m_CaretBlinkRate: 0.85 m_CaretBlinkRate: 0.85
m_CaretWidth: 1 m_CaretWidth: 1
m_ReadOnly: 0 m_ReadOnly: 0
......
...@@ -119,6 +119,17 @@ NavMeshSettings: ...@@ -119,6 +119,17 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!114 &42035500 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5105218363004495263, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &167584907 --- !u!1 &167584907
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -471,8 +482,36 @@ MonoBehaviour: ...@@ -471,8 +482,36 @@ MonoBehaviour:
_addressField: {fileID: 393054154} _addressField: {fileID: 393054154}
_portField: {fileID: 723240685} _portField: {fileID: 723240685}
_connectionModeDropdown: {fileID: 746543760} _connectionModeDropdown: {fileID: 746543760}
_teamDropdown: {fileID: 0} _playerAmountField: {fileID: 1789477738}
_RogueEnemyAmountField: {fileID: 1734898360}
_SlimeEnemyAmountField: {fileID: 42035500}
LobbyAmountContainer: {fileID: 7438304585132253663}
RangerAmountContainer: {fileID: 7438304585132253662}
SlimeAmountContainer: {fileID: 7438304585132253661}
_connectButton: {fileID: 661734915} _connectButton: {fileID: 661734915}
_gameStartCountDownTime: 10
--- !u!114 &1734898360 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8650075725555599494, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1789477738 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3534326167216121825, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &7438304585132253660 --- !u!1001 &7438304585132253660
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -589,10 +628,6 @@ PrefabInstance: ...@@ -589,10 +628,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2786951246866498643, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_text
value: 'Ranger Amount:'
objectReference: {fileID: 0}
- target: {fileID: 3040996727634378079, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} - target: {fileID: 3040996727634378079, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
...@@ -685,10 +720,6 @@ PrefabInstance: ...@@ -685,10 +720,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5105218363004495263, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_Text
value: 100
objectReference: {fileID: 0}
- target: {fileID: 5331613406234217351, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} - target: {fileID: 5331613406234217351, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
...@@ -737,10 +768,6 @@ PrefabInstance: ...@@ -737,10 +768,6 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5823486262143737526, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_text
value: 'Slime Amount:'
objectReference: {fileID: 0}
- target: {fileID: 5897803869160389310, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} - target: {fileID: 5897803869160389310, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
...@@ -857,10 +884,6 @@ PrefabInstance: ...@@ -857,10 +884,6 @@ PrefabInstance:
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 8650075725555599494, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_Text
value: 10
objectReference: {fileID: 0}
- target: {fileID: 8875326252354947531, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} - target: {fileID: 8875326252354947531, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
value: 0 value: 0
...@@ -946,6 +969,21 @@ PrefabInstance: ...@@ -946,6 +969,21 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
--- !u!1 &7438304585132253661 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 7340525383002667710, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7438304585132253662 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 856385695763539090, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7438304585132253663 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6840826048180085601, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
m_PrefabInstance: {fileID: 7438304585132253660}
m_PrefabAsset: {fileID: 0}
--- !u!1660057539 &9223372036854775807 --- !u!1660057539 &9223372036854775807
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -380,18 +380,10 @@ PrefabInstance: ...@@ -380,18 +380,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: HUDCanvas value: HUDCanvas
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1033715538230118892, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3} - target: {fileID: 1792365681371560561, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: 'm_ActiveFontFeatures.Array.data[0]'
value: 1801810542
objectReference: {fileID: 0}
- target: {fileID: 1796973617372691604, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_Enabled propertyPath: m_Enabled
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1828345383611332528, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2274541876267278006, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3} - target: {fileID: 2274541876267278006, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
value: 0 value: 0
...@@ -472,38 +464,8 @@ PrefabInstance: ...@@ -472,38 +464,8 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3459062252518051838, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: 'm_ActiveFontFeatures.Array.data[0]'
value: 1801810542
objectReference: {fileID: 0}
- target: {fileID: 4313165332373534701, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: 'm_ActiveFontFeatures.Array.data[0]'
value: 1801810542
objectReference: {fileID: 0}
- target: {fileID: 4776685628420966923, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4973084550295746815, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5706297442706245628, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6766818103523215656, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8914969948828194284, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: m_RemovedGameObjects: []
- {fileID: 4776685628420966923, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
- {fileID: 6766818103523215656, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3} m_SourcePrefab: {fileID: 100100000, guid: dc695439125c44a4190bdc008aa5a0fc, type: 3}
......
...@@ -171,6 +171,10 @@ PrefabInstance: ...@@ -171,6 +171,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -228,6 +232,10 @@ PrefabInstance: ...@@ -228,6 +232,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -393,6 +401,10 @@ PrefabInstance: ...@@ -393,6 +401,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -412,7 +424,7 @@ PrefabInstance: ...@@ -412,7 +424,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -511,6 +523,10 @@ PrefabInstance: ...@@ -511,6 +523,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -530,7 +546,7 @@ PrefabInstance: ...@@ -530,7 +546,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -633,6 +649,10 @@ PrefabInstance: ...@@ -633,6 +649,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -690,6 +710,10 @@ PrefabInstance: ...@@ -690,6 +710,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -709,7 +733,7 @@ PrefabInstance: ...@@ -709,7 +733,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -770,7 +794,7 @@ PrefabInstance: ...@@ -770,7 +794,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -916,6 +940,10 @@ PrefabInstance: ...@@ -916,6 +940,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
...@@ -935,7 +963,7 @@ PrefabInstance: ...@@ -935,7 +963,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -996,7 +1024,7 @@ PrefabInstance: ...@@ -996,7 +1024,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -1095,6 +1123,10 @@ PrefabInstance: ...@@ -1095,6 +1123,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7946462240341238627, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3} - target: {fileID: 7946462240341238627, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: DamageOnTrigger propertyPath: DamageOnTrigger
value: 50 value: 50
...@@ -1118,7 +1150,7 @@ PrefabInstance: ...@@ -1118,7 +1150,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3} - target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
...@@ -1217,6 +1249,10 @@ PrefabInstance: ...@@ -1217,6 +1249,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Slime value: Slime
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment