Initial Commit

This commit is contained in:
Simeon Radivoev 2022-02-12 12:53:50 +02:00
commit ee5c2f922d
Signed by: simeonradivoev
GPG key ID: 7611A451D2A5D37A
2255 changed files with 547750 additions and 0 deletions

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2c5bbf590de27894db496494e020e89d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,55 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ActorAnimationData : IComponentData
{
public float WalkDir;
public float WalkMultiply;
public float StepTimer;
public float LastStepSign;
public float AttackSpeed;
public float LastRotation;
public float LastGunRotation;
public float LastHeadRotation;
public bool1 Landed;
public AnimationTriggerType Triggers;
public ItemUseType UseType;
public bool1 ItemUseAdditive;
public EmotionType Emotion;
public float EmotionTimer;
public float LookWeight;
public float HeadLookWeight;
}
public class ActorAnimationDataComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField, Range(0, 1)] private float HeadLookWeight = 1;
[SerializeField, Range(0, 1)] private float LookWeight = 1;
private Entity m_entity;
private EntityManager m_entityManager;
private void Update()
{
if (m_entityManager != null && m_entityManager.Exists(m_entity) && m_entityManager.HasComponent<ActorAnimationData>(m_entity))
{
var val = m_entityManager.GetComponentData<ActorAnimationData>(m_entity);
val.LookWeight = LookWeight;
val.HeadLookWeight = HeadLookWeight;
m_entityManager.SetComponentData(m_entity, val);
}
}
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
m_entity = entity;
m_entityManager = dstManager;
dstManager.AddComponentData(entity, new ActorAnimationData { Landed = true });
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1c72c6bf622d4206a4da5465adbcc92c
timeCreated: 1531333408

View file

@ -0,0 +1,61 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ActorAnimationEventData : IComponentData
{
public bool1 Attacked;
public bool1 PickedUp;
public bool1 PickedCanceled;
public bool1 Melee;
public bool1 ItemUsed;
public bool1 ItemUsedCancled;
}
public class ActorAnimationEventComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField] private Entity m_entity;
private EntityManager m_entityManager;
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
m_entity = entity;
dstManager.AddComponent<ActorAnimationEventData>(entity);
m_entityManager = dstManager;
}
//animator callback
public void Attack()
{
PostEvent((ref ActorAnimationEventData d) => d.Attacked = true);
}
//animator callback
public void Pickup()
{
PostEvent((ref ActorAnimationEventData d) => d.PickedUp = true);
}
//animator callback
public void Melee()
{
PostEvent((ref ActorAnimationEventData d) => d.Melee = true);
}
//animator callback
public void UseItem()
{
PostEvent((ref ActorAnimationEventData d) => d.ItemUsed = true);
}
private void PostEvent(EntityCommandBufferExtensions.ModifyData<ActorAnimationEventData> eAction)
{
if (m_entityManager != null && m_entityManager.Exists(m_entity))
{
m_entityManager.PostEntityEvent(m_entity, eAction);
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ebc072dcce7d48a88505b0e354107676
timeCreated: 1532182486

View file

@ -0,0 +1,26 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[Serializable]
public struct ActorAnimationPropertiesData : ISharedComponentData
{
public Vector2 HipAngleRange;
public Vector2 WeaponAngleRange;
public Vector2 HeadAngleRange;
public float HeadRotationOffset;
public Vector2 HeadForward;
}
public class ActorAnimationPropertiesDataComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField] private ActorAnimationPropertiesData m_SerializedData;
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddSharedComponentData(entity, m_SerializedData);
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 18b11bf53e5240169675470279b0508f
timeCreated: 1531221505

View file

@ -0,0 +1,12 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct ActorBoundsData : IComponentData
{
[NonSerialized] public Rect Rect;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 16af98b6babd4a548bb86d67de63e106
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,23 @@
using DefaultNamespace;
using Unity.Entities;
using UnityEngine;
public struct ActorData : IComponentData
{
public Vector2 Aim;
public Vector2 GroundUp;
public bool1 Grounded;
public float GroundDinstance;
public Vector2 Look;
public float Health;
}
public class ActorComponent : ComponentDataProxy<ActorData>
{
private void Awake()
{
var val = Value;
val.Grounded = true;
Value = val;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a462e4757eef4e0d8b328486876b6d78
timeCreated: 1531167500

View file

@ -0,0 +1,17 @@
using Unity.Entities;
namespace DefaultNamespace
{
/// <summary>
/// Used to keep GO for some time to do fancy animations.
/// If this component is not present the GO is destroyed instantly.
/// </summary>
[GenerateAuthoringComponent]
public struct ActorDeathAnimationData : IComponentData
{
/// <summary>
/// The amount of time in seconds the GO should remain.
/// </summary>
public float Time;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e28fcfc7c8964385b6fc2284f4101356
timeCreated: 1533839522

View file

@ -0,0 +1,11 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ActorDeathData : IComponentData
{
public Vector2 Direction;
public float Force;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ec67e24d4cca4530b3a94d83d355ff0a
timeCreated: 1533842958

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct ActorGrenadeData : IComponentData
{
public float GrenadeTimer;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d446da21ec3c4cc19f22c291c7327a76
timeCreated: 1534253886

View file

@ -0,0 +1,11 @@
using System;
using Unity.Entities;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct ActorMeleeData : IComponentData
{
[NonSerialized] public float MeleeTimer;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 143d3ba90a2544039d3013a621f2ed0c
timeCreated: 1533242315

View file

@ -0,0 +1,37 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[Serializable]
public struct ActorMeleeSharedData : ISharedComponentData
{
public LayerMask MeleeMask;
public float Range;
public float Angle;
public float Damage;
public float Knockback;
public float Cooldown;
}
public class ActorMeleeSharedDataComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField] private ActorMeleeSharedData m_SerializedData;
private void OnDrawGizmos()
{
Gizmos.DrawLine(
transform.position,
transform.position - Quaternion.Euler(0, 0, m_SerializedData.Angle * 0.5f) * transform.right * m_SerializedData.Range);
Gizmos.DrawLine(
transform.position,
transform.position - Quaternion.Euler(0, 0, -m_SerializedData.Angle * 0.5f) * transform.right * m_SerializedData.Range);
}
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddSharedComponentData(entity, m_SerializedData);
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1510ecf2e3864138bc4f83f56694bbbd
timeCreated: 1532636662

View file

@ -0,0 +1,14 @@
using Trive.Core;
using Unity.Entities;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct ActorNpcData : IComponentData
{
public float AttackCooldown;
public float ActionCooldown;
public float JumpingTimer;
public PIDFloat XPid;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 98d1febc8f35485292eca066f16b1db4
timeCreated: 1533384927

View file

@ -0,0 +1,10 @@
using Unity.Entities;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct ActorTargetData : IComponentData
{
public Entity Target;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f69ba83d17d14a50b51bd53c42b19c24
timeCreated: 1533316695

View file

@ -0,0 +1,12 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct ActorWeaponAccuracyData : IComponentData
{
public float Accuracy;
public float AccuracyMultiply;
public float AccuracyAttackTime;
public float AccuracyRegainSpeed;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6c4b4f69b8f01a44f969e2f466da97e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,14 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
/// <summary>
/// Controls what other entities can it shoot
/// </summary>
[GenerateAuthoringComponent]
public struct ActorWeaponData : IComponentData
{
public LayerMask ProjectileMask;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f72ae9c9024a9a24f8f4ac1861c46bfa
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,41 @@
using Items;
using System;
using Unity.Entities;
using UnityEngine;
using Hash128 = Unity.Entities.Hash128;
[Serializable]
public struct ActorWeaponPropertiesData : ISharedComponentData, IEquatable<ActorWeaponPropertiesData>
{
public RangedWeaponItem Weapon;
public Hash128 Id { get; set; }
public bool Equals(ActorWeaponPropertiesData other)
{
return Equals(Weapon, other.Weapon) && Id.Equals(other.Id);
}
public override bool Equals(object obj)
{
return obj is ActorWeaponPropertiesData other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
return ((Weapon != null ? Weapon.GetHashCode() : 0) * 397) ^ Id.GetHashCode();
}
}
}
public class ActorWeaponPropertiesDataComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField] private ActorWeaponPropertiesData m_SerializedData;
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddSharedComponentData(entity, m_SerializedData);
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b5927b1a88d9374baa4562fbb64e2db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct ActorWeaponReferenceData : IComponentData
{
public Entity Weapon;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2d1a57d05728a7c4f95196269711e85b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,11 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct AimCenterData : IComponentData
{
public Vector2 Offset;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 32ffc1608d0dbe04e871e7f0876e046d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct Enemy : IComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 445bb6d4128b494996f99212eca9fae2
timeCreated: 1531149457

View file

@ -0,0 +1,20 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct AnimatorStateData : IComponentData
{
public AnimatorStateInfo State { get; set; }
public int TransitionName { get; set; }
public int TransitionPath { get; set; }
public bool IsTransitionName(string name)
{
return Animator.StringToHash(name) == TransitionName || Animator.StringToHash(name) == TransitionPath;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 0a3846ba066d417b999f3bbfe1f88b88
timeCreated: 1532192340

View file

@ -0,0 +1,33 @@
using DefaultNamespace;
using System;
using Unity.Entities;
using UnityEngine.ResourceManagement.AsyncOperations;
[assembly: RegisterGenericComponentType(typeof(AssetReferenceData<ItemPrefab>))]
namespace DefaultNamespace
{
public struct AssetReferenceData<T> : ISharedComponentData, IEquatable<AssetReferenceData<T>> where T : class
{
public AsyncOperationWrapper<T> Operation;
public AssetReferenceData(AsyncOperationHandle<T> operation)
{
Operation = new AsyncOperationWrapper<T>(operation);
}
public bool Equals(AssetReferenceData<T> other)
{
return Operation.Equals(other.Operation);
}
public override bool Equals(object obj)
{
return obj is AssetReferenceData<T> other && Equals(other);
}
public override int GetHashCode()
{
return Operation.GetHashCode();
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6536c2f9a601440ab256993b9c7e0016
timeCreated: 1534272254

View file

@ -0,0 +1,40 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[Serializable]
public struct CollisionSoundData : ISharedComponentData, IEquatable<CollisionSoundData>
{
public SoundLibrary Sound;
public Vector2 ForceRange;
public bool Equals(CollisionSoundData other)
{
return Equals(Sound, other.Sound) && ForceRange.Equals(other.ForceRange);
}
public override bool Equals(object obj)
{
return obj is CollisionSoundData other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
return ((Sound != null ? Sound.GetHashCode() : 0) * 397) ^ ForceRange.GetHashCode();
}
}
}
public struct CollisionSoundTimer : IComponentData
{
public float Time;
}
public class CollisionSoundDataComponent : SharedComponentDataProxy<CollisionSoundData>
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c77e2437e8cf4e39a747dcd1a7d6b95b
timeCreated: 1533762615

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0776364aa7712464187669992ae1092a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,15 @@
using System;
using Unity.Entities;
namespace DefaultNamespace
{
[Serializable]
public struct HealthKitData : IComponentData
{
public float Health;
}
public class HealthKitComponent : ComponentDataProxy<HealthKitData>
{
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 70dc7d3e6b2cd084e8c31ff7a6e0ab1f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,15 @@
using System;
using Unity.Entities;
namespace DefaultNamespace
{
[Serializable]
public struct ItemContainerAmountData : IComponentData
{
public int Amount;
}
public class ItemContainerAmountComponent : ComponentDataProxy<ItemContainerAmountData>
{
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b02c7fd241b638f4781c5e7ec792a81f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct ItemContainerData : IComponentData
{
public Hash128 ItemPrefab;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c8ddd7c12418b164496e393617390743
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ffa1b39fbf5e8de4fa2467fc2718e6eb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,22 @@
using Assets.Scripts.Util;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace.Navigation
{
[GenerateAuthoringComponent]
public struct NavigationAgentData : IComponentData
{
public float currentTime { get; set; }
public int currentIndex { get; set; }
public Vector2 startPos { get; set; }
public Optional<Vector2> destination { get; set; }
public int lastGoalPosIndex { get; set; }
public bool1 Grounded { get; set; }
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0bdab38cf7962724bbaa9cac478cc4ec
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,11 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace.Navigation
{
public struct PathNode : IBufferElementData
{
public Vector2 pos;
public PathNodeConnectionType ConnectionType;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d9650ebb3a2ac034391a65da0e150e14
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,10 @@
namespace DefaultNamespace.Navigation
{
public struct PathNodeConnection
{
public int Destination;
public PathNodeConnectionType Type;
public float Distance;
public bool1 Left;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e8ad7a6c0aa167945b2446559a087250
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,4 @@
namespace DefaultNamespace.Navigation
{
public enum PathNodeConnectionType { Drop, Neightbor, Jump, Start }
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b78bc29396408d040b3b4afda273253d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[Serializable]
public struct ParticleCollisionData : ISharedComponentData, IEquatable<ParticleCollisionData>
{
public int MaxCollisions;
public SoundLibrary ImpactSounds;
public Vector2 ImpactForceRange;
public bool Equals(ParticleCollisionData other)
{
return MaxCollisions == other.MaxCollisions &&
Equals(ImpactSounds, other.ImpactSounds) &&
ImpactForceRange.Equals(other.ImpactForceRange);
}
public override bool Equals(object obj)
{
return obj is ParticleCollisionData other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
var hashCode = MaxCollisions;
hashCode = (hashCode * 397) ^ (ImpactSounds != null ? ImpactSounds.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ ImpactForceRange.GetHashCode();
return hashCode;
}
}
}
public class ParticleCollisionDataComponent : MonoBehaviour, IConvertGameObjectToEntity
{
[SerializeField] private ParticleCollisionData m_SerializedData;
private readonly List<ParticleCollisionEvent> collisionEvents = new List<ParticleCollisionEvent>();
private readonly List<ParticleCollisionEvent> collisionEventsTmp = new List<ParticleCollisionEvent>();
private Entity entity;
private EntityManager entityManager;
private new ParticleSystem particleSystem;
private void Awake()
{
particleSystem = GetComponent<ParticleSystem>();
}
private void Update()
{
if (entityManager == null || !entityManager.Exists(entity))
{
return;
}
if (!entityManager.HasComponent<ParticleCollisionEventContainer>(entity))
{
return;
}
var fixedArray = entityManager.GetBuffer<ParticleCollisionEventContainer>(entity);
var currentSize = fixedArray.Length;
var capacity = fixedArray.Capacity;
foreach (var e in collisionEvents)
{
if (currentSize <= m_SerializedData.MaxCollisions && currentSize < capacity)
{
fixedArray.Add(new ParticleCollisionEventContainer { Evnt = e });
currentSize++;
}
}
collisionEvents.Clear();
}
private void OnParticleCollision(GameObject other)
{
var count = particleSystem.GetCollisionEvents(other, collisionEventsTmp);
collisionEvents.AddRange(collisionEventsTmp.Take(count));
}
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
this.entity = entity;
entityManager = dstManager;
dstManager.AddBuffer<ParticleCollisionEventContainer>(entity);
dstManager.AddSharedComponentData(entity, m_SerializedData);
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 873d3c8885ba499f8db429000c50afe6
timeCreated: 1534026437

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6070fef10dc83c54d92deeccf054f7aa
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ActorCoverRaycastData : IComponentData
{
public float Height;
public Vector2 TopHit;
public Vector2 TopNormal;
public bool1 HadTopHit;
public float TopDistance;
public float ForwardDistance;
public Vector2 ForwardHit;
public bool1 HadForwardHit;
public Vector2 ForwardNormal;
public float UpDistance;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 29dd108ff252c6643be97f2548856bce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,12 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ActorCoverRaycastHit : IBufferElementData
{
public Vector2 Point;
public float Distance;
public Vector2 Normal;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dfc45af8ae05ddd4fac0813fdca56ce7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct LocalPlayerData : IComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 70fbce4533d04baa8ccddb1f27e8a608
timeCreated: 1533832681

View file

@ -0,0 +1,11 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct PlayerData : IComponentData
{
public float AirControlAmount;
public float RegenTimer;
public int PickupIndex;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 904a00aabc744c9ea954556b0e1bd040
timeCreated: 1531181242

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct PlayerCoverData : IComponentData
{
public float WeaponOffset;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3ac32652fe7d1974b9682d8ba44709fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,28 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct PlayerInput : IComponentData
{
public float HorizontalInput;
public int ScrollInput;
public bool1 Jump;
public bool1 JumpPressed;
public bool1 Pickup;
public bool1 Attacking;
public bool1 AttackPressed;
public bool1 UseItem;
public bool1 Reload;
public bool1 OverUi;
public bool1 Melee;
public bool1 Grenade;
public bool1 Drag;
public bool1 Heal;
public bool1 Run;
public bool1 Vault;
}
public class PlayerInputComponent : ComponentDataProxy<PlayerInput>
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 6109e32dfc894386a4412c3ee3d8a1b2
timeCreated: 1531335274

View file

@ -0,0 +1,10 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct PlayerVaultData : IComponentData
{
public Vector2 VaultPoint;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a72b1a39effb4af459409374ded22a7d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
using Unity.Mathematics;
public struct ProjectileData : IComponentData
{
public float2 Velocity;
public float Life;
public int HitMask;
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: c73e3b5fc2fc48c1b3fe16af5d57c908
timeCreated: 1531047897

View file

@ -0,0 +1,11 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct ProjectileSharedData : ISharedComponentData
{
public float MaxLife;
public float Damage;
public float RicochetChance;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 42f4079de2f64d0c84a11c76b7abb157
timeCreated: 1531313315

View file

@ -0,0 +1,15 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct RigidBody2DData : IComponentData
{
public Vector2 Position { get; set; }
public Vector2 Velocity { get; set; }
public float Rotation { get; set; }
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 63505aab8b6878146af29523cb57087a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
[GenerateAuthoringComponent]
public struct Rotation2D : IComponentData
{
public float Rotation { get; set; }
public float Axis { get; set; }
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 238f0818a35b4e3581aa6a8b762f86e7
timeCreated: 1531309665

View file

@ -0,0 +1,6 @@
using Unity.Entities;
public struct SpawnInfo : IComponentData
{
public int SpawnerId;
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 82a21942ddba41898dc0955003706bec
timeCreated: 1531414196

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct TimerData : IComponentData
{
public float Time;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1acbdcc274d243aaaea6d0c8aa67e4fc
timeCreated: 1533307313

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 625bd293a6038694e94e615e2c40c929
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,20 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
[Serializable]
public struct FragGrenadeData : IComponentData
{
public float Range;
}
public class FragGrenadeDataComponent : ComponentDataProxy<FragGrenadeData>
{
private void OnDrawGizmos()
{
Gizmos.DrawWireSphere(transform.position, Value.Range);
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 96edcf42d2fe12443ac813b76e490fb4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,18 @@
using System;
using Tween;
using Unity.Entities;
namespace DefaultNamespace
{
[Serializable]
public struct GrenadeData : IComponentData
{
public float Lifetime;
public float Damage;
public EaseType DamageEase;
}
public class GrenadeDataComponent : ComponentDataProxy<GrenadeData>
{
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 046d69f945b4cbc418aa6d1817d85773
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct WeaponAccuracyData : IComponentData
{
public float Accuracy;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 599d610669ad254458a90ddc72303cb6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct WeaponAnimationData : IComponentData
{
public int ReloadCount;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2b2e27ce56ea49af963bb6e5dc63c17a
timeCreated: 1534008116

View file

@ -0,0 +1,35 @@
using Unity.Entities;
namespace DefaultNamespace
{
public struct WeaponAnimationEventData : IComponentData
{
public bool1 Reload;
}
public class WeaponAnimationEventComponent : ComponentDataProxy<WeaponAnimationEventData>
{
//animator callback
public void Reload()
{
PostEvent((ref WeaponAnimationEventData d) => d.Reload = true);
}
private void PostEvent(EntityCommandBufferExtensions.ModifyData<WeaponAnimationEventData> eAction)
{
var actorFacade = gameObject.GetComponent<ActorFacade>();
if (actorFacade != null && actorFacade.World.EntityManager.Exists(actorFacade.Entity))
{
actorFacade.World.EntityManager.PostEntityEvent(actorFacade.Entity, eAction);
}
else
{
var gameObjectEntity = gameObject.GetComponent<GameObjectEntity>();
if (gameObjectEntity != null && gameObjectEntity.EntityManager.Exists(gameObjectEntity.Entity))
{
gameObjectEntity.EntityManager.PostEntityEvent(gameObjectEntity.Entity, eAction);
}
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8ec4bb861b9c4539b316b37e007887b4
timeCreated: 1534007917

View file

@ -0,0 +1,14 @@
using System;
using Unity.Entities;
namespace DefaultNamespace
{
[GenerateAuthoringComponent]
public struct WeaponData : IComponentData
{
public int Ammo;
public int ClipAmmo;
[NonSerialized] public float ReloadTimer;
[NonSerialized] public float FireTimer;
}
}

Some files were not shown because too many files have changed in this diff Show more