Commit b8fdcb7a by alsunj

test build

Configure spawn points
Enemies use collisions instead of triggers
Add enemy spawner that is configured through menu
Create aspect components on server creation
parent bdeef7a1
Showing with 765 additions and 151 deletions
...@@ -55,7 +55,17 @@ MonoBehaviour: ...@@ -55,7 +55,17 @@ MonoBehaviour:
- rid: 8327060090184532221 - rid: 8327060090184532221
- rid: 8327060090184532222 - rid: 8327060090184532222
m_RuntimeSettings: m_RuntimeSettings:
m_List: [] m_List:
- rid: 8327060090184532203
- rid: 8327060090184532205
- rid: 8327060090184532207
- rid: 8327060090184532208
- rid: 8327060090184532210
- rid: 8327060090184532211
- rid: 8327060090184532212
- rid: 8327060090184532214
- rid: 8327060090184532218
- rid: 8327060090184532221
m_AssetVersion: 8 m_AssetVersion: 8
m_ObsoleteDefaultVolumeProfile: {fileID: 0} m_ObsoleteDefaultVolumeProfile: {fileID: 0}
m_RenderingLayerNames: m_RenderingLayerNames:
......
...@@ -3,17 +3,7 @@ guid: e8747e16efffd7a47afd2563a3a381bd ...@@ -3,17 +3,7 @@ guid: e8747e16efffd7a47afd2563a3a381bd
ModelImporter: ModelImporter:
serializedVersion: 22200 serializedVersion: 22200
internalIDToNameTable: [] internalIDToNameTable: []
externalObjects: externalObjects: {}
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: Glow
second: {fileID: 2100000, guid: f6302e761ef5d1640934bc5d9d008ff2, type: 2}
- first:
type: UnityEngine:Material
assembly: UnityEngine.CoreModule
name: skeleton
second: {fileID: 2100000, guid: bc07391a2b9d8aa41ba5374abc9bcdc2, type: 2}
materials: materials:
materialImportMode: 2 materialImportMode: 2
materialName: 0 materialName: 0
...@@ -2766,7 +2756,7 @@ ModelImporter: ...@@ -2766,7 +2756,7 @@ ModelImporter:
maskType: 3 maskType: 3
maskSource: {instanceID: 0} maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0 additiveReferencePoseFrame: 0
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
...@@ -2812,7 +2802,7 @@ ModelImporter: ...@@ -2812,7 +2802,7 @@ ModelImporter:
blendShapeNormalImportMode: 1 blendShapeNormalImportMode: 1
normalSmoothingSource: 0 normalSmoothingSource: 0
referencedClips: [] referencedClips: []
importAnimation: 1 importAnimation: 0
humanDescription: humanDescription:
serializedVersion: 3 serializedVersion: 3
human: [] human: []
...@@ -2831,7 +2821,7 @@ ModelImporter: ...@@ -2831,7 +2821,7 @@ ModelImporter:
skeletonHasParents: 1 skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0} lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1 autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2 animationType: 0
humanoidOversampling: 1 humanoidOversampling: 1
avatarSetup: 0 avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1 addHumanoidExtraRootOnlyWhenUsingAvatar: 1
......
...@@ -30,7 +30,7 @@ ModelImporter: ...@@ -30,7 +30,7 @@ ModelImporter:
extraExposedTransformPaths: [] extraExposedTransformPaths: []
extraUserProperties: [] extraUserProperties: []
clipAnimations: [] clipAnimations: []
isReadable: 0 isReadable: 1
meshes: meshes:
lODScreenPercentages: [] lODScreenPercentages: []
globalScale: 1 globalScale: 1
...@@ -76,7 +76,7 @@ ModelImporter: ...@@ -76,7 +76,7 @@ ModelImporter:
blendShapeNormalImportMode: 1 blendShapeNormalImportMode: 1
normalSmoothingSource: 0 normalSmoothingSource: 0
referencedClips: [] referencedClips: []
importAnimation: 1 importAnimation: 0
humanDescription: humanDescription:
serializedVersion: 3 serializedVersion: 3
human: [] human: []
......
using Unity.Collections;
using Unity.Entities; using Unity.Entities;
using Unity.Mathematics;
using UnityEngine; using UnityEngine;
public class GameStartPropertiesAuthoring : MonoBehaviour public class EnemySpawnAuthoring : MonoBehaviour
{ {
public int gameStartCountDownTime; public Transform[] spawnPoints;
public class GameStartPropertiesBaker : Baker<GameStartPropertiesAuthoring> public class EnemySpawnPointsBaker : Baker<EnemySpawnAuthoring>
{ {
public override void Bake(GameStartPropertiesAuthoring authoring) public override void Bake(EnemySpawnAuthoring authoring)
{ {
Entity entity = GetEntity(TransformUsageFlags.None); Entity entity = GetEntity(TransformUsageFlags.None);
AddComponent(entity, new GameStartProperties DynamicBuffer<EnemySpawnPoints> dynamicBuffer = AddBuffer<EnemySpawnPoints>(entity);
foreach (Transform spawnPoint in authoring.spawnPoints)
{ {
CountdownTime = authoring.gameStartCountDownTime, dynamicBuffer.Add(new EnemySpawnPoints
}); {
AddComponent(entity, new SpawnableEnemiesCounter SpawnPoint = new float3(spawnPoint.position)
{ });
SlimeEnemyCounter = 0, }
RogueEnemyCounter = 0
});
AddComponent<PlayersRemainingToStart>(entity);
} }
} }
} }
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 9ad6c4754c599be47b8b5b4400eb8acc guid: 879de81ec7d6996419454632d5ecf789
\ No newline at end of file \ No newline at end of file
...@@ -27,8 +27,6 @@ public class EntitiesReferencesAuthoring : MonoBehaviour ...@@ -27,8 +27,6 @@ public class EntitiesReferencesAuthoring : MonoBehaviour
{ {
HealthBar = authoring.HealthBarPrefab, HealthBar = authoring.HealthBarPrefab,
}); });
// AddComponent<PhysicsMass>(entity, PhysicsMass.CreateDynamic(MassProperties.UnitSphere, 1f));
// AddComponent<PhysicsDamping>(entity, new PhysicsDamping { Linear = 0.01f, Angular = 0.05f });
} }
} }
} }
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: 55b823e47914f9f4fba8b5a443660640 guid: b6519e75046df8947ac07f03a2f4dc84
folderAsset: yes folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
......
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
public struct EnemySpawnPoints : IBufferElementData
{
public float3 SpawnPoint;
}
public struct EnemySpawnTimer : IComponentData
{
public float SlimeSpawnTimer;
public float RogueSpawnTimer;
public float RandomSpawnOffset;
public float SlimeSpawnCooldown;
public float RogueSpawnCooldown;
}
\ No newline at end of file
fileFormatVersion: 2
guid: 04304173520457f4c9f70fcb8a8d5e29
\ No newline at end of file
...@@ -6,7 +6,7 @@ using Unity.Physics.Systems; ...@@ -6,7 +6,7 @@ using Unity.Physics.Systems;
[UpdateInGroup(typeof(PhysicsSystemGroup))] [UpdateInGroup(typeof(PhysicsSystemGroup))]
[UpdateAfter(typeof(PhysicsSimulationGroup))] [UpdateAfter(typeof(PhysicsSimulationGroup))]
public partial struct DamageOnTriggerSystem : ISystem public partial struct DamageOnCollisionSystem : ISystem
{ {
public void OnCreate(ref SystemState state) public void OnCreate(ref SystemState state)
{ {
...@@ -18,7 +18,7 @@ public partial struct DamageOnTriggerSystem : ISystem ...@@ -18,7 +18,7 @@ public partial struct DamageOnTriggerSystem : ISystem
public void OnUpdate(ref SystemState state) public void OnUpdate(ref SystemState state)
{ {
var ecbSingleton = SystemAPI.GetSingleton<EndSimulationEntityCommandBufferSystem.Singleton>(); var ecbSingleton = SystemAPI.GetSingleton<EndSimulationEntityCommandBufferSystem.Singleton>();
var damageOnTriggerJob = new DamageOnTriggerJob var damageOnCollisionJob = new DamageOnCollisionJob
{ {
DamageOnTriggerLookup = SystemAPI.GetComponentLookup<DamageOnTrigger>(true), DamageOnTriggerLookup = SystemAPI.GetComponentLookup<DamageOnTrigger>(true),
TeamLookup = SystemAPI.GetComponentLookup<TeamTypes>(true), TeamLookup = SystemAPI.GetComponentLookup<TeamTypes>(true),
...@@ -26,59 +26,69 @@ public partial struct DamageOnTriggerSystem : ISystem ...@@ -26,59 +26,69 @@ public partial struct DamageOnTriggerSystem : ISystem
DamageBufferLookup = SystemAPI.GetBufferLookup<DamageBufferElement>(true), DamageBufferLookup = SystemAPI.GetBufferLookup<DamageBufferElement>(true),
ECB = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged) ECB = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged)
}; };
var simulationSingleton = SystemAPI.GetSingleton<SimulationSingleton>(); var simulationSingleton = SystemAPI.GetSingleton<SimulationSingleton>();
state.Dependency = damageOnTriggerJob.Schedule(simulationSingleton, state.Dependency); damageOnCollisionJob.Schedule(simulationSingleton, state.Dependency).Complete();
} }
} }
public struct DamageOnTriggerJob : ITriggerEventsJob public struct DamageOnCollisionJob : ICollisionEventsJob
{ {
[ReadOnly] public ComponentLookup<DamageOnTrigger> DamageOnTriggerLookup; [ReadOnly] public ComponentLookup<DamageOnTrigger> DamageOnTriggerLookup;
[ReadOnly] public ComponentLookup<TeamTypes> TeamLookup; [ReadOnly] public ComponentLookup<TeamTypes> TeamLookup;
[ReadOnly] public BufferLookup<AlreadyDamagedEntity> AlreadyDamagedLookup; public BufferLookup<AlreadyDamagedEntity> AlreadyDamagedLookup;
[ReadOnly] public BufferLookup<DamageBufferElement> DamageBufferLookup; public BufferLookup<DamageBufferElement> DamageBufferLookup;
public EntityCommandBuffer ECB; public EntityCommandBuffer ECB;
public void Execute(TriggerEvent triggerEvent) public void Execute(CollisionEvent collisionEvent)
{ {
Entity damageDealingEntity; Entity entityA = collisionEvent.EntityA;
Entity damageReceivingEntity; Entity entityB = collisionEvent.EntityB;
Entity damageDealingEntity = Entity.Null;
Entity damageReceivingEntity = Entity.Null;
if (DamageBufferLookup.HasBuffer(triggerEvent.EntityA) && if (DamageBufferLookup.HasBuffer(entityA) &&
DamageOnTriggerLookup.HasComponent(triggerEvent.EntityB)) DamageOnTriggerLookup.HasComponent(entityB))
{ {
damageReceivingEntity = triggerEvent.EntityA; damageReceivingEntity = entityA;
damageDealingEntity = triggerEvent.EntityB; damageDealingEntity = entityB;
} }
else if (DamageOnTriggerLookup.HasComponent(triggerEvent.EntityA) && else if (DamageOnTriggerLookup.HasComponent(entityA) &&
DamageBufferLookup.HasBuffer(triggerEvent.EntityB)) DamageBufferLookup.HasBuffer(entityB))
{ {
damageDealingEntity = triggerEvent.EntityA; damageDealingEntity = entityA;
damageReceivingEntity = triggerEvent.EntityB; damageReceivingEntity = entityB;
} }
else else
{ {
return; return;
} }
// Don't apply damage multiple times if (AlreadyDamagedLookup.HasBuffer(damageDealingEntity))
var alreadyDamagedBuffer = AlreadyDamagedLookup[damageDealingEntity]; {
foreach (var alreadyDamagedEntity in alreadyDamagedBuffer) var alreadyDamagedBuffer = AlreadyDamagedLookup[damageDealingEntity];
for (int i = 0; i < alreadyDamagedBuffer.Length; i++)
{
if (alreadyDamagedBuffer[i].Value == damageReceivingEntity) return;
}
}
else
{ {
if (alreadyDamagedEntity.Value.Equals(damageReceivingEntity)) return; ECB.AddBuffer<AlreadyDamagedEntity>(damageDealingEntity);
} }
// Ignore friendly fire
if (TeamLookup.TryGetComponent(damageDealingEntity, out var damageDealingTeam) && if (TeamLookup.TryGetComponent(damageDealingEntity, out var damageDealingTeam) &&
TeamLookup.TryGetComponent(damageReceivingEntity, out var damageReceivingTeam)) TeamLookup.TryGetComponent(damageReceivingEntity, out var damageReceivingTeam))
{ {
if (damageDealingTeam.Value == damageReceivingTeam.Value) return; if (damageDealingTeam.Value == damageReceivingTeam.Value) return;
} }
var damageOnTrigger = DamageOnTriggerLookup[damageDealingEntity]; if (DamageOnTriggerLookup.TryGetComponent(damageDealingEntity, out var damageOnTrigger))
ECB.AddComponent<DestroyEntityTag>(damageDealingEntity); {
ECB.AppendToBuffer(damageReceivingEntity, new DamageBufferElement { Value = damageOnTrigger.Value }); ECB.AddComponent<DestroyEntityTag>(damageDealingEntity);
ECB.AppendToBuffer(damageDealingEntity, new AlreadyDamagedEntity { Value = damageReceivingEntity }); ECB.AppendToBuffer(damageReceivingEntity, new DamageBufferElement { Value = damageOnTrigger.Value });
ECB.AppendToBuffer(damageDealingEntity, new AlreadyDamagedEntity { Value = damageReceivingEntity });
}
} }
} }
\ No newline at end of file
...@@ -11,20 +11,21 @@ partial struct GoInGameServerSystem : ISystem ...@@ -11,20 +11,21 @@ partial struct GoInGameServerSystem : ISystem
[BurstCompile] [BurstCompile]
public void OnCreate(ref SystemState state) public void OnCreate(ref SystemState state)
{ {
state.RequireForUpdate<NetworkTime>();
state.RequireForUpdate<GameStartProperties>();
state.RequireForUpdate<PlayerCounter>(); state.RequireForUpdate<PlayerCounter>();
state.RequireForUpdate<EntititesReferences>(); state.RequireForUpdate<EntititesReferences>();
state.RequireForUpdate<NetworkId>(); state.RequireForUpdate<NetworkId>();
state.RequireForUpdate<GoInGameRequestRpc>(); state.RequireForUpdate<GoInGameRequestRpc>();
} }
[BurstCompile]
public void OnUpdate(ref SystemState state) public void OnUpdate(ref SystemState state)
{ {
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>(); Entity gameStartPropertiesEntity = SystemAPI.GetSingletonEntity<GameStartProperties>();
PlayerCounter playerCounter = SystemAPI.GetComponent<PlayerCounter>(gameStartPropertiesEntity); PlayerCounter playerCounter = SystemAPI.GetComponent<PlayerCounter>(gameStartPropertiesEntity);
GameStartProperties gameStartProperties = GameStartProperties gameStartProperties =
SystemAPI.GetComponent<GameStartProperties>(gameStartPropertiesEntity); SystemAPI.GetComponent<GameStartProperties>(gameStartPropertiesEntity);
...@@ -93,9 +94,4 @@ partial struct GoInGameServerSystem : ISystem ...@@ -93,9 +94,4 @@ partial struct GoInGameServerSystem : ISystem
entityCommandBuffer.Playback(state.EntityManager); entityCommandBuffer.Playback(state.EntityManager);
SystemAPI.SetSingleton(playerCounter); SystemAPI.SetSingleton(playerCounter);
} }
[BurstCompile]
public void OnDestroy(ref SystemState state)
{
}
} }
\ No newline at end of file
...@@ -11,7 +11,6 @@ partial struct ServerStartGameSystem : ISystem ...@@ -11,7 +11,6 @@ partial struct ServerStartGameSystem : ISystem
state.RequireForUpdate<NetworkTime>(); state.RequireForUpdate<NetworkTime>();
state.RequireForUpdate<GameStartProperties>(); state.RequireForUpdate<GameStartProperties>();
state.RequireForUpdate<EntititesReferences>(); state.RequireForUpdate<EntititesReferences>();
state.RequireForUpdate<GamePlayingTag>(); // var builder = new EntityQueryBuilder(Allocator.Temp).WithAll<MobaTeamRequest, ReceiveRpcCommandRequest>(); state.RequireForUpdate<GamePlayingTag>();
// state.RequireForUpdate(state.GetEntityQuery(builder));
} }
} }
\ No newline at end of file
fileFormatVersion: 2
guid: c8b061e7986968e4aa05ff889da5746a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using Unity.Entities;
using Unity.Entities.UniversalDelegates;
using UnityEngine;
public readonly partial struct EnemySpawnerAspect : IAspect
{
private readonly RefRW<EnemySpawnTimer> _enemySpawnTimer;
private readonly RefRO<GameStartProperties> _gameStartProperties;
private readonly RefRW<SpawnableEnemiesCounter> _spawnableEnemiesCounter;
public float TimeForNextSlimeSpawn
{
get => _enemySpawnTimer.ValueRO.SlimeSpawnTimer;
set => _enemySpawnTimer.ValueRW.SlimeSpawnTimer = value;
}
public float TimeForNextRogueSpawn
{
get => _enemySpawnTimer.ValueRO.RogueSpawnTimer;
set => _enemySpawnTimer.ValueRW.RogueSpawnTimer = value;
}
public float RandomSpawnOffset
{
get => _enemySpawnTimer.ValueRO.RandomSpawnOffset;
set => _enemySpawnTimer.ValueRW.RandomSpawnOffset = value;
}
public int RogueSpawnAmount => _gameStartProperties.ValueRO.RogueEnemyAmount;
public int SlimeSpawnAmount => _gameStartProperties.ValueRO.SlimeEnemyAmount;
public int RogueEnemyCounter
{
get => _spawnableEnemiesCounter.ValueRO.RogueEnemyCounter;
set => _spawnableEnemiesCounter.ValueRW.RogueEnemyCounter = value;
}
public int SlimeEnemyCounter
{
get => _spawnableEnemiesCounter.ValueRO.SlimeEnemyCounter;
set => _spawnableEnemiesCounter.ValueRW.SlimeEnemyCounter = value;
}
public float SlimeSpawnCoolDown => _enemySpawnTimer.ValueRO.SlimeSpawnCooldown;
public float RogueSpawnCoolDown => _enemySpawnTimer.ValueRO.RogueSpawnCooldown;
public bool CanEnemySlimeSpawn => TimeForNextSlimeSpawn <= 0 && SlimeSpawnAmount > SlimeEnemyCounter;
public bool CanEnemyRogueSpawn => TimeForNextRogueSpawn <= 0 && RogueSpawnAmount > RogueEnemyCounter;
public void DecrementTimers(float deltaTime)
{
TimeForNextSlimeSpawn -= deltaTime;
TimeForNextRogueSpawn -= deltaTime;
if (RandomSpawnOffset > -5)
RandomSpawnOffset -= deltaTime;
else
RandomSpawnOffset = 5f;
}
public void IncreaseSlimeCounter()
{
SlimeEnemyCounter++;
}
public void IncreaseRogueCounter()
{
RogueEnemyCounter++;
}
public void ResetRoqueTimer()
{
TimeForNextRogueSpawn = RogueSpawnCoolDown;
}
public void ResetSlimeTimer()
{
TimeForNextSlimeSpawn = SlimeSpawnCoolDown;
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: bbc590dcb6bb2af43893d7116bb3c233
\ No newline at end of file
using Unity.Burst;
using Unity.Entities;
using Unity.Mathematics;
using Unity.Physics;
using Unity.Transforms;
using UnityEngine;
[WorldSystemFilter(WorldSystemFilterFlags.ServerSimulation)]
partial struct EnemySpawnerSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<GamePlayingTag>();
state.RequireForUpdate<EnemySpawnPoints>();
state.RequireForUpdate<EnemySpawnTimer>();
state.RequireForUpdate<EntititesReferences>();
state.RequireForUpdate<BeginSimulationEntityCommandBufferSystem.Singleton>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var deltaTime = SystemAPI.Time.DeltaTime;
Entity enemyPropertiesEntity = SystemAPI.GetSingletonEntity<EnemySpawnPoints>();
DynamicBuffer<EnemySpawnPoints> spawnPoints = SystemAPI.GetBuffer<EnemySpawnPoints>(enemyPropertiesEntity);
var ecbSingleton = SystemAPI.GetSingleton<BeginSimulationEntityCommandBufferSystem.Singleton>();
var ecb = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged);
foreach (var aspect in SystemAPI.Query<EnemySpawnerAspect>())
{
aspect.DecrementTimers(deltaTime);
if (aspect.CanEnemySlimeSpawn)
{
Entity enemySlimeEntity = SystemAPI.GetSingleton<EntititesReferences>().SlimeEnemyEntity;
int slimeSpawnIndex = aspect.SlimeEnemyCounter % spawnPoints.Length;
float randomValue = aspect.RandomSpawnOffset;
float3 spawnPosition =
spawnPoints[slimeSpawnIndex].SpawnPoint + new float3(randomValue, 0, -randomValue);
SpawnEnemy(ecb, enemySlimeEntity, spawnPosition);
aspect.IncreaseSlimeCounter();
aspect.ResetSlimeTimer();
}
if (aspect.CanEnemyRogueSpawn)
{
Entity enemyRogueEntity = SystemAPI.GetSingleton<EntititesReferences>().RougeEnemyEntity;
int rogueSpawnIndex = aspect.RogueEnemyCounter % spawnPoints.Length;
float randomValue = aspect.RandomSpawnOffset;
float3 spawnPosition =
spawnPoints[rogueSpawnIndex].SpawnPoint + new float3(randomValue, 0, -randomValue);
SpawnEnemy(ecb, enemyRogueEntity, spawnPosition);
aspect.IncreaseRogueCounter();
aspect.ResetRoqueTimer();
}
}
}
void SpawnEnemy(EntityCommandBuffer ecb, Entity spawnableEntity, float3 position)
{
Entity newEnemy = ecb.Instantiate(spawnableEntity);
ecb.SetComponent(newEnemy,
LocalTransform.FromPosition(position));
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: f15af634b55d47044993c2bcae7811ba
\ No newline at end of file
...@@ -20,6 +20,9 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -20,6 +20,9 @@ public class ClientConnectionManager : MonoBehaviour
[SerializeField] private GameObject SlimeAmountContainer; [SerializeField] private GameObject SlimeAmountContainer;
[SerializeField] private Button _connectButton; [SerializeField] private Button _connectButton;
[SerializeField] private int _gameStartCountDownTime; [SerializeField] private int _gameStartCountDownTime;
[SerializeField] private float _slimeSpawnCooldownTime;
[SerializeField] private float _rogueSpawnCooldownTime;
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);
...@@ -112,21 +115,26 @@ public class ClientConnectionManager : MonoBehaviour ...@@ -112,21 +115,26 @@ 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);
} }
// Create the entity and add components directly.
var configEntity = serverWorld.EntityManager.CreateEntity(); var spawnerEntity = serverWorld.EntityManager.CreateEntity();
serverWorld.EntityManager.AddComponentData(configEntity, new GameStartProperties serverWorld.EntityManager.AddComponentData(spawnerEntity, new GameStartProperties
{ {
CountdownTime = _gameStartCountDownTime, CountdownTime = _gameStartCountDownTime,
PlayerAmount = PlayerAmount, PlayerAmount = PlayerAmount,
RogueEnemyAmount = RogueEnemyAmount, RogueEnemyAmount = RogueEnemyAmount,
SlimeEnemyAmount = SlimeEnemyAmount SlimeEnemyAmount = SlimeEnemyAmount
}); });
serverWorld.EntityManager.AddComponentData(configEntity, new SpawnableEnemiesCounter serverWorld.EntityManager.AddComponentData(spawnerEntity, new EnemySpawnTimer
{
SlimeSpawnCooldown = _slimeSpawnCooldownTime,
RogueSpawnCooldown = _rogueSpawnCooldownTime
});
serverWorld.EntityManager.AddComponentData(spawnerEntity, new SpawnableEnemiesCounter
{ {
SlimeEnemyCounter = 0, SlimeEnemyCounter = 0,
RogueEnemyCounter = 0 RogueEnemyCounter = 0
}); });
serverWorld.EntityManager.AddComponentData(configEntity, new PlayerCounter { Value = 0 }); serverWorld.EntityManager.AddComponentData(spawnerEntity, new PlayerCounter { Value = 0 });
} }
private void StartClient() private void StartClient()
......
...@@ -89,7 +89,7 @@ MonoBehaviour: ...@@ -89,7 +89,7 @@ MonoBehaviour:
m_Template: {fileID: 0} m_Template: {fileID: 0}
m_CollisionResponse: m_CollisionResponse:
m_Override: 0 m_Override: 0
m_Value: 3 m_Value: 1
m_Friction: m_Friction:
m_Override: 0 m_Override: 0
m_Value: m_Value:
......
...@@ -11,12 +11,12 @@ GameObject: ...@@ -11,12 +11,12 @@ GameObject:
- component: {fileID: 108378693547780218} - component: {fileID: 108378693547780218}
- component: {fileID: -1646835149202598146} - component: {fileID: -1646835149202598146}
- component: {fileID: -202488746562016087} - component: {fileID: -202488746562016087}
- component: {fileID: -6588502853141303043}
- component: {fileID: -4296278104235172521} - component: {fileID: -4296278104235172521}
- component: {fileID: 7946462240341238627} - component: {fileID: 7946462240341238627}
- component: {fileID: -8527907258641966621} - component: {fileID: -8527907258641966621}
- component: {fileID: 4127881285066043338} - component: {fileID: 4127881285066043338}
- component: {fileID: -274669407858188047} - component: {fileID: -274669407858188047}
- component: {fileID: -5213069575148900343}
m_Layer: 0 m_Layer: 0
m_Name: Cube m_Name: Cube
m_TagString: Untagged m_TagString: Untagged
...@@ -77,33 +77,6 @@ MonoBehaviour: ...@@ -77,33 +77,6 @@ MonoBehaviour:
UsePreSerialization: 0 UsePreSerialization: 0
RollbackPredictedSpawnedGhostState: 0 RollbackPredictedSpawnedGhostState: 0
RollbackPredictionOnStructuralChanges: 1 RollbackPredictionOnStructuralChanges: 1
--- !u!54 &-6588502853141303043
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2899838405596494908}
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &-4296278104235172521 --- !u!114 &-4296278104235172521
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -173,7 +146,7 @@ MonoBehaviour: ...@@ -173,7 +146,7 @@ MonoBehaviour:
m_ShapeType: 0 m_ShapeType: 0
m_PrimitiveCenter: m_PrimitiveCenter:
x: 0 x: 0
y: 0 y: 0.6000001
z: 0 z: 0
m_PrimitiveSize: m_PrimitiveSize:
x: 1 x: 1
...@@ -188,7 +161,7 @@ MonoBehaviour: ...@@ -188,7 +161,7 @@ MonoBehaviour:
m_Capsule: m_Capsule:
Height: 1 Height: 1
Radius: 0.5 Radius: 0.5
Axis: 2 Axis: 0
m_Cylinder: m_Cylinder:
Height: 1 Height: 1
Radius: 0.5 Radius: 0.5
...@@ -207,7 +180,7 @@ MonoBehaviour: ...@@ -207,7 +180,7 @@ MonoBehaviour:
m_Template: {fileID: 0} m_Template: {fileID: 0}
m_CollisionResponse: m_CollisionResponse:
m_Override: 0 m_Override: 0
m_Value: 3 m_Value: 1
m_Friction: m_Friction:
m_Override: 0 m_Override: 0
m_Value: m_Value:
...@@ -256,7 +229,7 @@ MonoBehaviour: ...@@ -256,7 +229,7 @@ MonoBehaviour:
m_CollidesWithCategories: m_CollidesWithCategories:
m_Override: 0 m_Override: 0
m_Value: m_Value:
Category00: 0 Category00: 1
Category01: 1 Category01: 1
Category02: 1 Category02: 1
Category03: 0 Category03: 0
...@@ -301,6 +274,33 @@ MonoBehaviour: ...@@ -301,6 +274,33 @@ MonoBehaviour:
Tag07: 0 Tag07: 0
m_SerializedVersion: 1 m_SerializedVersion: 1
m_SerializedVersion: 1 m_SerializedVersion: 1
--- !u!54 &-5213069575148900343
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2899838405596494908}
serializedVersion: 4
m_Mass: 5.05
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 112
m_CollisionDetection: 0
--- !u!1 &7494803013719323330 --- !u!1 &7494803013719323330
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -68,8 +68,40 @@ Transform: ...@@ -68,8 +68,40 @@ Transform:
- {fileID: 5001222007940412494} - {fileID: 5001222007940412494}
- {fileID: 5581542974833947271} - {fileID: 5581542974833947271}
- {fileID: 5981432708657565925} - {fileID: 5981432708657565925}
- {fileID: 1389336659677476459}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &988906693792640195
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4113111654433410427}
m_Layer: 0
m_Name: EnemySpawnPosition (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4113111654433410427
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 988906693792640195}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 17.1, y: 0, z: 17}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1389336659677476459}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1342101318069946295 --- !u!1 &1342101318069946295
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -101,6 +133,99 @@ Transform: ...@@ -101,6 +133,99 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 3251327355353088423} m_Father: {fileID: 3251327355353088423}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1375083077691249541
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2470590900687131865}
m_Layer: 0
m_Name: EnemySpawnPosition
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2470590900687131865
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1375083077691249541}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -22.8, y: 0, z: -23.7}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1389336659677476459}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2728779988751634932
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4897543871710356616}
m_Layer: 0
m_Name: EnemySpawnPosition (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4897543871710356616
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2728779988751634932}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -23.4, y: 0, z: 18.6}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1389336659677476459}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2897969905478238021
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2185406100811654051}
m_Layer: 0
m_Name: EnemySpawnPosition (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2185406100811654051
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2897969905478238021}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 16.7, y: 0, z: -20.8}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1389336659677476459}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &5250389714568146909 --- !u!1 &5250389714568146909
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -282,6 +407,41 @@ Transform: ...@@ -282,6 +407,41 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 3251327355353088423} m_Father: {fileID: 3251327355353088423}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &8303283688989544350
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1389336659677476459}
m_Layer: 0
m_Name: EnemySpawnPositions
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1389336659677476459
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8303283688989544350}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2470590900687131865}
- {fileID: 4897543871710356616}
- {fileID: 2185406100811654051}
- {fileID: 4113111654433410427}
m_Father: {fileID: 3251327355353088423}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &706217386485487288 --- !u!1001 &706217386485487288
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -24,14 +24,14 @@ Transform: ...@@ -24,14 +24,14 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5471986911704856561} m_GameObject: {fileID: 5471986911704856561}
serializedVersion: 2 serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 7442153552013198971} - {fileID: 7442153552013198971}
m_Father: {fileID: 1371888953562352644} m_Father: {fileID: 1371888953562352644}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &5874026590232167095 --- !u!1 &5874026590232167095
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -320,7 +320,7 @@ MonoBehaviour: ...@@ -320,7 +320,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8e73c985659b81d408f4e99cb152349d, type: 3} m_Script: {fileID: 11500000, guid: 8e73c985659b81d408f4e99cb152349d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
MaxHitPoints: 500 MaxHitPoints: 20000
--- !u!1001 &6975352639711469968 --- !u!1001 &6975352639711469968
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -376,40 +376,10 @@ PrefabInstance: ...@@ -376,40 +376,10 @@ PrefabInstance:
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: m_AddedComponents: []
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3}
insertIndex: -1
addedObject: {fileID: 6927830130995102561}
m_SourcePrefab: {fileID: 100100000, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3} m_SourcePrefab: {fileID: 100100000, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3}
--- !u!4 &7442153552013198971 stripped --- !u!4 &7442153552013198971 stripped
Transform: Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3} m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3}
m_PrefabInstance: {fileID: 6975352639711469968} m_PrefabInstance: {fileID: 6975352639711469968}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &7785606193239088321 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3}
m_PrefabInstance: {fileID: 6975352639711469968}
m_PrefabAsset: {fileID: 0}
--- !u!95 &6927830130995102561
Animator:
serializedVersion: 7
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7785606193239088321}
m_Enabled: 1
m_Avatar: {fileID: 9000000, guid: e8747e16efffd7a47afd2563a3a381bd, type: 3}
m_Controller: {fileID: 9100000, guid: d51e64459114ce740bd0867a7eca5623, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_AnimatePhysics: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0
...@@ -63,7 +63,7 @@ MonoBehaviour: ...@@ -63,7 +63,7 @@ MonoBehaviour:
OptimizationMode: 0 OptimizationMode: 0
Importance: 10 Importance: 10
MaxSendRate: 0 MaxSendRate: 0
prefabId: prefabId: d6f706ad9a658e94aa7285ff9d26c638
HasOwner: 0 HasOwner: 0
SupportAutoCommandTarget: 1 SupportAutoCommandTarget: 1
TrackInterpolationDelay: 0 TrackInterpolationDelay: 0
...@@ -84,4 +84,4 @@ MonoBehaviour: ...@@ -84,4 +84,4 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
RespawnTime: 10 RespawnTime: 10
NetCodeConfig: {fileID: 11400000, guid: cd69de227738309429193c9089949c16, type: 2} NetCodeConfig: {fileID: 11400000, guid: edda5bd0f33a95e4a98f780e0e3ae9e8, type: 2}
...@@ -489,7 +489,9 @@ MonoBehaviour: ...@@ -489,7 +489,9 @@ MonoBehaviour:
RangerAmountContainer: {fileID: 7438304585132253662} RangerAmountContainer: {fileID: 7438304585132253662}
SlimeAmountContainer: {fileID: 7438304585132253661} SlimeAmountContainer: {fileID: 7438304585132253661}
_connectButton: {fileID: 661734915} _connectButton: {fileID: 661734915}
_gameStartCountDownTime: 10 _gameStartCountDownTime: 2
_slimeSpawnCooldownTime: 0.3
_rogueSpawnCooldownTime: 1
--- !u!114 &1734898360 stripped --- !u!114 &1734898360 stripped
MonoBehaviour: MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8650075725555599494, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3} m_CorrespondingSourceObject: {fileID: 8650075725555599494, guid: 72327351aa28fbe4fb4c16c3d17e4de5, type: 3}
......
...@@ -127,10 +127,22 @@ PrefabInstance: ...@@ -127,10 +127,22 @@ PrefabInstance:
serializedVersion: 3 serializedVersion: 3
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 602201766747390748, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 728568152667097525, guid: 2533a95934a9ea044a5454189730090b, type: 3} - target: {fileID: 728568152667097525, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Environment value: Environment
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2185406100811654051, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2470590900687131865, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3251327355353088423, guid: 2533a95934a9ea044a5454189730090b, type: 3} - target: {fileID: 3251327355353088423, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 0 value: 0
...@@ -171,11 +183,38 @@ PrefabInstance: ...@@ -171,11 +183,38 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] - target: {fileID: 4113111654433410427, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4897543871710356616, guid: 2533a95934a9ea044a5454189730090b, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 2747717236950027111, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 220856686291130790, guid: 2533a95934a9ea044a5454189730090b, type: 3}
insertIndex: -1
addedObject: {fileID: 719164832}
m_SourcePrefab: {fileID: 100100000, guid: 2533a95934a9ea044a5454189730090b, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 2533a95934a9ea044a5454189730090b, type: 3}
--- !u!4 &320754107 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2185406100811654051, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_PrefabInstance: {fileID: 285643545}
m_PrefabAsset: {fileID: 0}
--- !u!4 &483085529 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4113111654433410427, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_PrefabInstance: {fileID: 285643545}
m_PrefabAsset: {fileID: 0}
--- !u!4 &501815330 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2470590900687131865, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_PrefabInstance: {fileID: 285643545}
m_PrefabAsset: {fileID: 0}
--- !u!1 &679656576 --- !u!1 &679656576
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -186,6 +225,7 @@ GameObject: ...@@ -186,6 +225,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 679656578} - component: {fileID: 679656578}
- component: {fileID: 679656577} - component: {fileID: 679656577}
- component: {fileID: 679656579}
m_Layer: 0 m_Layer: 0
m_Name: PhysicsDebug m_Name: PhysicsDebug
m_TagString: Untagged m_TagString: Untagged
...@@ -227,6 +267,183 @@ Transform: ...@@ -227,6 +267,183 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &679656579
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 679656576}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4d30974bf68d61043b1572197db94cdc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SimulationType: 1
m_Gravity:
x: -0
y: -9.81
z: -0
m_SolverIterationCount: 4
m_EnableSolverStabilizationHeuristic: 0
m_MultiThreaded: 1
m_CollisionTolerance: 0.01
m_SynchronizeCollisionWorld: 1
m_IncrementalDynamicBroadphase: 0
m_IncrementalStaticBroadphase: 0
--- !u!1 &719164827 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 220856686291130790, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_PrefabInstance: {fileID: 285643545}
m_PrefabAsset: {fileID: 0}
--- !u!114 &719164832
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 719164827}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b275e5f92732148048d7b77e264ac30e, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShapeType: 0
m_PrimitiveCenter:
x: -0.00000023841858
y: 0.001
z: 0.000012278557
m_PrimitiveSize:
x: 4.0000005
y: 0.001
z: 4.0000005
m_PrimitiveOrientation:
Value:
x: -0
y: 0
z: 0
RotationOrder: 4
m_Capsule:
Height: 4.0000005
Radius: 2.0000002
Axis: 2
m_Cylinder:
Height: 0.001
Radius: 2.0000002
Axis: 1
m_CylinderSideCount: 20
m_SphereRadius: 2.0000002
m_MinimumSkinnedVertexWeight: 0.1
m_ConvexHullGenerationParameters:
m_SimplificationTolerance: 0.060000006
m_BevelRadius: 0.05
m_MinimumAngle: 2.5000002
m_CustomMesh: {fileID: 0}
m_ForceUnique: 0
m_Material:
m_SupportsTemplate: 1
m_Template: {fileID: 0}
m_CollisionResponse:
m_Override: 0
m_Value: 0
m_Friction:
m_Override: 0
m_Value:
Value: 0.5
CombineMode: 0
m_Restitution:
m_Override: 0
m_Value:
Value: 0
CombineMode: 2
m_BelongsToCategories:
m_Override: 0
m_Value:
Category00: 1
Category01: 0
Category02: 0
Category03: 0
Category04: 0
Category05: 0
Category06: 0
Category07: 0
Category08: 0
Category09: 0
Category10: 0
Category11: 0
Category12: 0
Category13: 0
Category14: 0
Category15: 0
Category16: 0
Category17: 0
Category18: 0
Category19: 0
Category20: 0
Category21: 0
Category22: 0
Category23: 0
Category24: 0
Category25: 0
Category26: 0
Category27: 0
Category28: 0
Category29: 0
Category30: 0
Category31: 0
m_CollidesWithCategories:
m_Override: 0
m_Value:
Category00: 1
Category01: 1
Category02: 1
Category03: 1
Category04: 1
Category05: 1
Category06: 1
Category07: 0
Category08: 0
Category09: 0
Category10: 0
Category11: 0
Category12: 0
Category13: 0
Category14: 0
Category15: 0
Category16: 0
Category17: 0
Category18: 0
Category19: 0
Category20: 0
Category21: 0
Category22: 0
Category23: 0
Category24: 0
Category25: 0
Category26: 0
Category27: 0
Category28: 0
Category29: 0
Category30: 0
Category31: 0
m_CustomMaterialTags:
m_Override: 0
m_Value:
Tag00: 0
Tag01: 0
Tag02: 0
Tag03: 0
Tag04: 0
Tag05: 0
Tag06: 0
Tag07: 0
m_SerializedVersion: 1
m_SerializedVersion: 1
--- !u!4 &1246512031 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4897543871710356616, guid: 2533a95934a9ea044a5454189730090b, type: 3}
m_PrefabInstance: {fileID: 285643545}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1434796874 --- !u!1 &1434796874
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -273,9 +490,58 @@ MonoBehaviour: ...@@ -273,9 +490,58 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
playerPrefabGameObject: {fileID: 5874026590232167095, guid: 7ea025f0d02f62a4b8c0db52b410e781, type: 3} playerPrefabGameObject: {fileID: 5874026590232167095, guid: 7ea025f0d02f62a4b8c0db52b410e781, type: 3}
RespawnEntity: {fileID: 6485162079390424543, guid: d6f706ad9a658e94aa7285ff9d26c638, type: 3} RespawnEntity: {fileID: 6485162079390424543, guid: d6f706ad9a658e94aa7285ff9d26c638, type: 3}
RougeEnemyGameObject: {fileID: 0} RougeEnemyGameObject: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
SlimeEnemyGameObject: {fileID: 0} SlimeEnemyGameObject: {fileID: 2899838405596494908, guid: 90328a79d7583f749a2b13d989efcaa8, type: 3}
HealthBarPrefab: {fileID: 6246730936639062891, guid: 8aadaf8ffd0c86343a26b96a6d7bb1fd, type: 3} HealthBarPrefab: {fileID: 6246730936639062891, guid: 8aadaf8ffd0c86343a26b96a6d7bb1fd, type: 3}
--- !u!1 &2028964951
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2028964952}
- component: {fileID: 2028964953}
m_Layer: 0
m_Name: EnemySpawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2028964952
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2028964951}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2028964953
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2028964951}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 879de81ec7d6996419454632d5ecf789, type: 3}
m_Name:
m_EditorClassIdentifier:
spawnPoints:
- {fileID: 501815330}
- {fileID: 1246512031}
- {fileID: 320754107}
- {fileID: 483085529}
--- !u!1660057539 &9223372036854775807 --- !u!1660057539 &9223372036854775807
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -283,3 +549,4 @@ SceneRoots: ...@@ -283,3 +549,4 @@ SceneRoots:
- {fileID: 285643545} - {fileID: 285643545}
- {fileID: 1434796876} - {fileID: 1434796876}
- {fileID: 679656578} - {fileID: 679656578}
- {fileID: 2028964952}
...@@ -15,7 +15,7 @@ MonoBehaviour: ...@@ -15,7 +15,7 @@ MonoBehaviour:
FilterSettings: FilterSettings:
ExcludedBakingSystemAssemblies: [] ExcludedBakingSystemAssemblies: []
AdditionalScriptingDefines: [] AdditionalScriptingDefines: []
GlobalNetCodeConfig: {fileID: 0} GlobalNetCodeConfig: {fileID: 11400000, guid: edda5bd0f33a95e4a98f780e0e3ae9e8, type: 2}
CurrentImportanceSuggestions: CurrentImportanceSuggestions:
- MinValue: 1 - MinValue: 1
MaxValue: 4 MaxValue: 4
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 53
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
m_Name:
m_EditorClassIdentifier:
assetDefaultFramerate: 60
m_DefaultFrameRate: 60
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