Commit 806c5307 by alsunj

Make the arrows deal damage to the player, destroy camera gameobject and player entity

parent e031d6f9
......@@ -7,7 +7,6 @@ public class NpcAttackAuthoring : MonoBehaviour
public float NpcTargetRadius;
public float AttackCooldownTime;
public Vector3 FirePointOffset;
public GameObject AttackPrefab;
public NetCodeConfig NetCodeConfig;
......@@ -24,9 +23,9 @@ public class NpcAttackAuthoring : MonoBehaviour
{
FirePointOffset = authoring.FirePointOffset,
CooldownTickCount = (uint)(authoring.AttackCooldownTime * authoring.SimulationTickRate),
AttackPrefab = GetEntity(authoring.AttackPrefab, TransformUsageFlags.Dynamic)
AttackPrefab = GetEntity(authoring.AttackPrefab, TransformUsageFlags.Dynamic),
});
AddComponent<NpcTargetEntity>(entity);
AddBuffer<NpcAttackCooldown>(entity);
}
......
......@@ -3,9 +3,9 @@ using Unity.NetCode;
[UnityEngine.Scripting.Preserve]
public class GameBootstrap : ClientServerBootstrap
{
public override bool Initialize(string defaultWorldName)
{
AutoConnectPort = 7979;
return base.Initialize(defaultWorldName);
}
}
public override bool Initialize(string defaultWorldName)
{
AutoConnectPort = 7970;
return base.Initialize(defaultWorldName);
}
}
\ No newline at end of file
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.NetCode;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup), OrderLast = true)]
[UpdateAfter(typeof(CalculateFrameDamageSystem))]
public partial struct ApplyDamageSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<NetworkTime>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var currentTick = SystemAPI.GetSingleton<NetworkTime>().ServerTick;
var ecb = new EntityCommandBuffer(Allocator.Temp);
foreach (var (currentHitPoints, damageThisTickBuffer, entity) in SystemAPI
.Query<RefRW<CurrentHitPoints>, DynamicBuffer<DamageThisTick>>().WithAll<Simulate>()
.WithEntityAccess())
{
if (!damageThisTickBuffer.GetDataAtTick(currentTick, out var damageThisTick)) continue;
if (damageThisTick.Tick != currentTick) continue;
currentHitPoints.ValueRW.Value -= damageThisTick.Value;
if (currentHitPoints.ValueRO.Value <= 0)
{
ecb.AddComponent<DestroyEntityTag>(entity);
}
}
ecb.Playback(state.EntityManager);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 88c53bad20c489642b8fba2e712d1ae9
\ No newline at end of file
using Unity.Burst;
using Unity.Entities;
using Unity.NetCode;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup), OrderLast = true)]
public partial struct CalculateFrameDamageSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<NetworkTime>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var currentTick = SystemAPI.GetSingleton<NetworkTime>().ServerTick;
foreach (var (damageBuffer, damageThisTickBuffer) in SystemAPI
.Query<DynamicBuffer<DamageBufferElement>, DynamicBuffer<DamageThisTick>>()
.WithAll<Simulate>())
{
if (damageBuffer.IsEmpty)
{
damageThisTickBuffer.AddCommandData(new DamageThisTick { Tick = currentTick, Value = 0 });
}
else
{
var totalDamage = 0;
if (damageThisTickBuffer.GetDataAtTick(currentTick, out var damageThisTick))
{
totalDamage = damageThisTick.Value;
}
foreach (var damage in damageBuffer)
{
totalDamage += damage.Value;
}
damageThisTickBuffer.AddCommandData(new DamageThisTick { Tick = currentTick, Value = totalDamage });
damageBuffer.Clear();
}
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 2b0593b532333564ab0136693861426c
\ No newline at end of file
using Unity.Burst;
using Unity.Collections;
using Unity.Entities;
using Unity.Physics;
using Unity.Physics.Systems;
[UpdateInGroup(typeof(PhysicsSystemGroup))]
[UpdateAfter(typeof(PhysicsSimulationGroup))]
public partial struct DamageOnTriggerSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<SimulationSingleton>();
state.RequireForUpdate<EndSimulationEntityCommandBufferSystem.Singleton>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var ecbSingleton = SystemAPI.GetSingleton<EndSimulationEntityCommandBufferSystem.Singleton>();
var damageOnTriggerJob = new DamageOnTriggerJob
{
DamageOnTriggerLookup = SystemAPI.GetComponentLookup<DamageOnTrigger>(true),
TeamLookup = SystemAPI.GetComponentLookup<TeamTypes>(true),
AlreadyDamagedLookup = SystemAPI.GetBufferLookup<AlreadyDamagedEntity>(true),
DamageBufferLookup = SystemAPI.GetBufferLookup<DamageBufferElement>(true),
ECB = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged)
};
var simulationSingleton = SystemAPI.GetSingleton<SimulationSingleton>();
state.Dependency = damageOnTriggerJob.Schedule(simulationSingleton, state.Dependency);
}
}
public struct DamageOnTriggerJob : ITriggerEventsJob
{
[ReadOnly] public ComponentLookup<DamageOnTrigger> DamageOnTriggerLookup;
[ReadOnly] public ComponentLookup<TeamTypes> TeamLookup;
[ReadOnly] public BufferLookup<AlreadyDamagedEntity> AlreadyDamagedLookup;
[ReadOnly] public BufferLookup<DamageBufferElement> DamageBufferLookup;
public EntityCommandBuffer ECB;
public void Execute(TriggerEvent triggerEvent)
{
Entity damageDealingEntity;
Entity damageReceivingEntity;
if (DamageBufferLookup.HasBuffer(triggerEvent.EntityA) &&
DamageOnTriggerLookup.HasComponent(triggerEvent.EntityB))
{
damageReceivingEntity = triggerEvent.EntityA;
damageDealingEntity = triggerEvent.EntityB;
}
else if (DamageOnTriggerLookup.HasComponent(triggerEvent.EntityA) &&
DamageBufferLookup.HasBuffer(triggerEvent.EntityB))
{
damageDealingEntity = triggerEvent.EntityA;
damageReceivingEntity = triggerEvent.EntityB;
}
else
{
return;
}
// Don't apply damage multiple times
var alreadyDamagedBuffer = AlreadyDamagedLookup[damageDealingEntity];
foreach (var alreadyDamagedEntity in alreadyDamagedBuffer)
{
if (alreadyDamagedEntity.Value.Equals(damageReceivingEntity)) return;
}
// Ignore friendly fire
if (TeamLookup.TryGetComponent(damageDealingEntity, out var damageDealingTeam) &&
TeamLookup.TryGetComponent(damageReceivingEntity, out var damageReceivingTeam))
{
if (damageDealingTeam.Value == damageReceivingTeam.Value) return;
}
var damageOnTrigger = DamageOnTriggerLookup[damageDealingEntity];
ECB.AppendToBuffer(damageReceivingEntity, new DamageBufferElement { Value = damageOnTrigger.Value });
ECB.AppendToBuffer(damageDealingEntity, new AlreadyDamagedEntity { Value = damageReceivingEntity });
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 067d81bd4c991b04aad6dffe5ce50281
\ No newline at end of file
using Unity.Burst;
using Unity.Entities;
using Unity.NetCode;
using Unity.Transforms;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup))]
public partial struct MoveAbilitySystem : ISystem
{
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var deltaTime = SystemAPI.Time.DeltaTime;
foreach (var (transform, moveSpeed) in SystemAPI.Query<RefRW<LocalTransform>, AbilityMoveSpeed>()
.WithAll<Simulate>())
{
transform.ValueRW.Position += transform.ValueRW.Forward() * moveSpeed.Value * deltaTime;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: b856630900673024ca83f8b7f0c04ee4
\ No newline at end of file
......@@ -23,7 +23,7 @@ public partial struct NpcAttackSystem : ISystem
{
CurrentTick = networkTime.ServerTick,
TransformLookup = SystemAPI.GetComponentLookup<LocalTransform>(true),
ECB = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged).AsParallelWriter()
ECB = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged).AsParallelWriter(),
}.ScheduleParallel(state.Dependency);
}
}
......@@ -34,12 +34,11 @@ public partial struct NpcAttackJob : IJobEntity
{
[ReadOnly] public NetworkTick CurrentTick;
[ReadOnly] public ComponentLookup<LocalTransform> TransformLookup;
public EntityCommandBuffer.ParallelWriter ECB;
[BurstCompile]
private void Execute(ref DynamicBuffer<NpcAttackCooldown> attackCooldown, in NpcAttackProperties attackProperties,
in NpcTargetEntity targetEntity, Entity npcEntity, TeamTypes team, [ChunkIndexInQuery] int sortKey)
in NpcTargetEntity targetEntity, Entity enemyEntity, TeamTypes team, [ChunkIndexInQuery] int sortKey)
{
if (!TransformLookup.HasComponent(targetEntity.Value)) return;
if (!attackCooldown.GetDataAtTick(CurrentTick, out var cooldownExpirationTick))
......@@ -51,12 +50,23 @@ public partial struct NpcAttackJob : IJobEntity
CurrentTick.IsNewerThan(cooldownExpirationTick.Value);
if (!canAttack) return;
var spawnPosition = TransformLookup[npcEntity].Position + attackProperties.FirePointOffset;
var enemyTransform = TransformLookup[enemyEntity];
var spawnPosition = enemyTransform.Position;
var targetPosition = TransformLookup[targetEntity.Value].Position;
var targetEntityl = targetEntity.Value;
var newAttack = ECB.Instantiate(sortKey, attackProperties.AttackPrefab);
var newAttackTransform = LocalTransform.FromPositionRotation(spawnPosition,
// Get the vector from the enemy to the player
var direction = math.normalize(targetPosition - spawnPosition);
var targetRotation = quaternion.LookRotationSafe(direction, math.up());
// Rotate the enemy towards player
enemyTransform.Rotation = targetRotation;
ECB.SetComponent(sortKey, enemyEntity, enemyTransform);
var newAttack = ECB.Instantiate(sortKey, attackProperties.AttackPrefab);
var newAttackTransform = LocalTransform.FromPositionRotation(spawnPosition + attackProperties.FirePointOffset,
quaternion.LookRotationSafe(targetPosition - spawnPosition, math.up()));
ECB.SetComponent(sortKey, newAttack, newAttackTransform);
......
fileFormatVersion: 2
guid: 2cf510596d75a4348a03003d58cc7f7c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using Unity.Burst;
using Unity.Entities;
using Unity.Mathematics;
using Unity.NetCode;
using Unity.Transforms;
using UnityEngine;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup), OrderLast = true)]
public partial struct DestroyEntitySystem : ISystem
{
public void OnCreate(ref SystemState state)
{
// state.RequireForUpdate<RespawnEntityTag>();
// state.RequireForUpdate<MobaPrefabs>();
state.RequireForUpdate<BeginSimulationEntityCommandBufferSystem.Singleton>();
state.RequireForUpdate<NetworkTime>();
}
public void OnUpdate(ref SystemState state)
{
var networkTime = SystemAPI.GetSingleton<NetworkTime>();
if (!networkTime.IsFirstTimeFullyPredictingTick) return;
var currentTick = networkTime.ServerTick;
var ecbSingleton = SystemAPI.GetSingleton<BeginSimulationEntityCommandBufferSystem.Singleton>();
var ecb = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged);
foreach (var (transform, entity) in SystemAPI.Query<RefRW<LocalTransform>>()
.WithAll<DestroyEntityTag, Simulate>().WithEntityAccess())
{
if (state.World.IsServer())
{
// if (SystemAPI.HasComponent<GameOverOnDestroyTag>(entity))
// {
// var gameOverPrefab = SystemAPI.GetSingleton<MobaPrefabs>().GameOverEntity;
// var gameOverEntity = ecb.Instantiate(gameOverPrefab);
//
// var losing = SystemAPI.GetComponent<MobaTeam>(entity).Value;
// var winning = losing == TeamType.Blue ? TeamType.Red : TeamType.Blue;
// Debug.Log($"{winning.ToString()} Team Won!!");
//
// ecb.SetComponent(gameOverEntity, new WinningTeam { Value = winning });
// }
// if (SystemAPI.HasComponent<ChampTag>(entity))
// {
// var networkEntity = SystemAPI.GetComponent<NetworkEntityReference>(entity).Value;
// var respawnEntity = SystemAPI.GetSingletonEntity<RespawnEntityTag>();
// var respawnTickCount = SystemAPI.GetComponent<RespawnTickCount>(respawnEntity).Value;
//
// var respawnTick = currentTick;
// respawnTick.Add(respawnTickCount);
//
// ecb.AppendToBuffer(respawnEntity, new RespawnBufferElement
// {
// NetworkEntity = networkEntity,
// RespawnTick = respawnTick,
// NetworkId = SystemAPI.GetComponent<NetworkId>(networkEntity).Value
// });
// }
ecb.DestroyEntity(entity);
}
else
{
transform.ValueRW.Position = new float3(1000f, 1000f, 1000f);
}
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 3296986707d0aa74c8ec21445c946fa9
\ No newline at end of file
using Unity.Burst;
using Unity.Entities;
using Unity.NetCode;
[UpdateInGroup(typeof(PredictedSimulationSystemGroup))]
public partial struct DestroyOnTimerSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<NetworkTime>();
state.RequireForUpdate<EndSimulationEntityCommandBufferSystem.Singleton>();
}
[BurstCompile]
public void OnUpdate(ref SystemState state)
{
var ecbSingleton = SystemAPI.GetSingleton<EndSimulationEntityCommandBufferSystem.Singleton>();
var ecb = ecbSingleton.CreateCommandBuffer(state.WorldUnmanaged);
var currentTick = SystemAPI.GetSingleton<NetworkTime>().ServerTick;
foreach (var (destroyAtTick, entity) in SystemAPI.Query<DestroyAtTick>().WithAll<Simulate>()
.WithNone<DestroyEntityTag>().WithEntityAccess())
{
if (currentTick.Equals(destroyAtTick.Value) || currentTick.IsNewerThan(destroyAtTick.Value))
{
ecb.AddComponent<DestroyEntityTag>(entity);
}
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 069852f8834f5354ab3e2050c11d1fa7
\ No newline at end of file
using Unity.Collections;
using Unity.Entities;
using Unity.NetCode;
public partial struct InitializeDestroyOnTimerSystem : ISystem
{
public void OnCreate(ref SystemState state)
{
state.RequireForUpdate<NetworkTime>();
}
public void OnUpdate(ref SystemState state)
{
var ecb = new EntityCommandBuffer(Allocator.Temp);
var simulationTickRate = NetCodeConfig.Global.ClientServerTickRate.SimulationTickRate;
var currentTick = SystemAPI.GetSingleton<NetworkTime>().ServerTick;
foreach (var (destroyOnTimer, entity) in SystemAPI.Query<DestroyOnTimer>().WithNone<DestroyAtTick>()
.WithEntityAccess())
{
var lifetimeInTicks = (uint)(destroyOnTimer.Value * simulationTickRate);
var targetTick = currentTick;
targetTick.Add(lifetimeInTicks);
ecb.AddComponent(entity, new DestroyAtTick { Value = targetTick });
}
ecb.Playback(state.EntityManager);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: fabc2f795f298374f9574414437f88ae
\ No newline at end of file
......@@ -17,6 +17,7 @@ public class FollowPlayer : MonoBehaviour
transform.rotation = Quaternion.Euler(40, 0, 0);
}
void LateUpdate()
{
// If entity hasn't been found yet, try to find it
......@@ -40,17 +41,26 @@ public class FollowPlayer : MonoBehaviour
}
// If entity found, update camera position
if (entityFound && entityManager.Exists(targetEntity))
if (entityFound)
{
LocalTransform playerTransform = entityManager.GetComponentData<LocalTransform>(targetEntity);
float3 playerPosition = playerTransform.Position;
if (entityManager.Exists(targetEntity) && entityManager.HasComponent<LocalTransform>(targetEntity))
{
LocalTransform playerTransform = entityManager.GetComponentData<LocalTransform>(targetEntity);
float3 playerPosition = playerTransform.Position;
// Define smooth damp velocity
Vector3 velocity = Vector3.zero;
// Define smooth damp velocity
Vector3 velocity = Vector3.zero;
// Use SmoothDamp for a more natural movement transition
transform.position = Vector3.SmoothDamp(transform.position, playerPosition + new float3(0, 7, -9),
ref velocity, 0.05f);
}
else
{
// Destroy the camera GameObject if the player entity no longer exists
Destroy(gameObject);
}
// Use SmoothDamp for a more natural movement transition
transform.position = Vector3.SmoothDamp(transform.position, playerPosition + new float3(0, 7, -9),
ref velocity, 0.05f);
// Use Slerp for smoother rotation towards player
// Quaternion targetRotation = Quaternion.LookRotation((Vector3)playerPosition - transform.position);
......
......@@ -142,7 +142,7 @@ MonoBehaviour:
Category01: 1
Category02: 0
Category03: 0
Category04: 1
Category04: 0
Category05: 0
Category06: 0
Category07: 0
......@@ -321,7 +321,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalRotation.w
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalRotation.x
......@@ -329,7 +329,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalRotation.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalRotation.z
......@@ -341,7 +341,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
value: 180
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 383b8acbdeeb36f45805802bf80f9774, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &1838675002304973312
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 544445575287296422, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: TeamType
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4119712591281040369, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Name
value: RogueEnemy (1) Variant
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalScale.x
value: 1.99
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalScale.y
value: 1.99
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalScale.z
value: 1.99
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.x
value: -3.8
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalPosition.z
value: -6.02
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4518211183990774724, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_ConstrainProportionsScale
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_SphereRadius
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Capsule.Radius
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Cylinder.Radius
value: 2
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_PrimitiveSize.x
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_PrimitiveSize.y
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Material.m_BelongsToCategories.m_Value.Category01
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Material.m_BelongsToCategories.m_Value.Category02
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7330549200574829686, guid: 31ddab13d76d526499c2002833a10312, type: 3}
propertyPath: m_Material.m_CollidesWithCategories.m_Value.Category02
value: 1
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 7671856692459541817, guid: 31ddab13d76d526499c2002833a10312, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 31ddab13d76d526499c2002833a10312, type: 3}
fileFormatVersion: 2
guid: 0d7047f5c9a2aab44b422eae9fb6638b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
......@@ -101,8 +101,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
NpcTargetRadius: 15
AttackCooldownTime: 0
FirePointOffset: {x: 0, y: 2.5, z: 0}
AttackCooldownTime: 2
FirePointOffset: {x: 0, y: 1.5, z: 0}
EnemyRotationSpeed: 20
AttackPrefab: {fileID: 357967689053387235, guid: 19127a4c1ac11844db4373b9e147918b, type: 3}
NetCodeConfig: {fileID: 11400000, guid: cd69de227738309429193c9089949c16, type: 2}
--- !u!114 &7330549200574829686
......
......@@ -47,6 +47,7 @@ GameObject:
- component: {fileID: 2660614573323502624}
- component: {fileID: 3955402020692204287}
- component: {fileID: 1305669273409567159}
- component: {fileID: -770452937570562930}
m_Layer: 0
m_Name: Player
m_TagString: Untagged
......@@ -129,10 +130,10 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_UseGravity: 0
m_IsKinematic: 1
m_Interpolate: 0
m_Constraints: 116
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &2660614573323502624
MonoBehaviour:
......@@ -307,6 +308,19 @@ MonoBehaviour:
Tag07: 0
m_SerializedVersion: 1
m_SerializedVersion: 1
--- !u!114 &-770452937570562930
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5874026590232167095}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8e73c985659b81d408f4e99cb152349d, type: 3}
m_Name:
m_EditorClassIdentifier:
MaxHitPoints: 1000
--- !u!1001 &6975352639711469968
PrefabInstance:
m_ObjectHideFlags: 0
......
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