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,10 @@
using Unity.Entities;
namespace Events
{
//event showing that a pickup has been started on actor and is awaiting the animation event of pick up
public struct ActorPickupEvent : IComponentData
{
public Entity Item;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b247a6fbe10f40938ffa7e22d35fd40f
timeCreated: 1532199409

View file

@ -0,0 +1,8 @@
using Unity.Entities;
namespace Assets.Scripts.Events
{
public struct AnimatorRebindEventData : IComponentData
{
}
}

View file

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

View file

@ -0,0 +1,6 @@
namespace Events
{
public struct EntityDeathEvent : IEventComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b8ff00669f8e414bb16f67d1755ebca7
timeCreated: 1533652754

View file

@ -0,0 +1,13 @@
using Unity.Entities;
namespace Events
{
public static class EventComponentGroupEntityComponentBufferExtensions
{
public static void RemoveEventComponents<T>(this EntityCommandBuffer buffer, EntityQueryBuilder queryBuilder)
where T : struct, IComponentData, IEventComponentData
{
queryBuilder.ForEach((Entity entity, ref T e) => { buffer.RemoveComponent<InventoryDirtyEventData>(entity); });
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e6d3d4b32cc6460e91139470a1012839
timeCreated: 1532259493

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace Events
{
//component data that all single entity events must implement if they are to be removed by the EventRemovalSystem
public struct EventData : IComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ba36172bc3144a308bf6887bddf03c9b
timeCreated: 1532171361

View file

@ -0,0 +1,9 @@
using Unity.Entities;
namespace Events
{
public struct FireGrenadeEvent : IEventComponentData
{
public Hash128 GrenadePrefab;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a8265656d6944fec9bef09d8fec1ece1
timeCreated: 1533642673

View file

@ -0,0 +1,10 @@
using UnityEngine;
namespace Events
{
public struct FireWeaponEvent : IEventComponentData
{
public LayerMask LayerMask;
public float ScreenShake;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9f81546458594c83a96515ddd53232b3
timeCreated: 1534010304

View file

@ -0,0 +1,8 @@
using Unity.Entities;
namespace Events
{
public interface IEventComponentData : IComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 48c1e56af9234d8997f72612f22e4222
timeCreated: 1532259554

View file

@ -0,0 +1,6 @@
namespace Events
{
public struct InventoryDirtyEventData : IEventComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9d2e04bb74494f5c8e79d63bd4538ea4
timeCreated: 1532258362

View file

@ -0,0 +1,37 @@
using DefaultNamespace;
using System;
using Unity.Entities;
using UnityEngine;
namespace Events
{
public struct ItemDragEvent : ISharedComponentData, IEquatable<ItemDragEvent>
{
public AsyncOperationWrapper<ItemPrefab> ItemPrefab;
public ItemData Item;
public int Slot;
public Vector2 ScreenPos;
public bool Equals(ItemDragEvent other)
{
return ItemPrefab.Equals(other.ItemPrefab) && Item.Equals(other.Item) && Slot == other.Slot && ScreenPos.Equals(other.ScreenPos);
}
public override bool Equals(object obj)
{
return obj is ItemDragEvent other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
var hashCode = ItemPrefab.GetHashCode();
hashCode = (hashCode * 397) ^ Item.GetHashCode();
hashCode = (hashCode * 397) ^ Slot;
hashCode = (hashCode * 397) ^ ScreenPos.GetHashCode();
return hashCode;
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: dc3237f73bee4bac9c7b7337b49aba15
timeCreated: 1534079286

View file

@ -0,0 +1,15 @@
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct ItemDropEvent : IComponentData
{
public ItemData Item;
public Entity Inventory;
public int FromSlot;
public int ToSlot;
public Vector2 Pos;
public Vector2 Velocity;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2359d5c7d5b94cc894aceb401f6c8ff3
timeCreated: 1532035979

View file

@ -0,0 +1,14 @@
using Unity.Entities;
namespace Events
{
public struct ItemPickupEventData : IComponentData
{
public readonly Entity PlayerEntity;
public ItemPickupEventData(Entity playerEntity)
{
PlayerEntity = playerEntity;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d490d3f1371f49b49f5fe3f7b5f00a8d
timeCreated: 1532199154

View file

@ -0,0 +1,14 @@
using DefaultNamespace;
using Unity.Entities;
namespace Events
{
public struct ItemUseEventData : IComponentData
{
public bool1 Done;
public bool1 Validating;
public bool1 Invalid;
public Entity Inventory;
public int Slot;
}
}

View file

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

View file

@ -0,0 +1,6 @@
namespace Events
{
public struct OverEvent : IEventComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 99a72e31a1f14ec5a45dfcca22379982
timeCreated: 1534104952

View file

@ -0,0 +1,9 @@
using DefaultNamespace;
namespace Events
{
public struct ReloadEvent : IEventComponentData
{
public bool1 Cancel;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a8a28f5ba0ac4f54b2ed788e1199f03f
timeCreated: 1534003791

View file

@ -0,0 +1,6 @@
namespace Events
{
public struct SelectEvent : IEventComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9ba64b4279d84b6885d0a1d73e4cbafa
timeCreated: 1534249014

View file

@ -0,0 +1,46 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace Events
{
public struct SoundEvent : ISharedComponentData, IEquatable<SoundEvent>
{
public AudioClip Clip;
public float Volume;
public float Pitch;
public Vector2 Point;
public float SpatialBlend;
public bool Equals(SoundEvent other)
{
return Equals(Clip, other.Clip) &&
Volume.Equals(other.Volume) &&
Pitch.Equals(other.Pitch) &&
Point.Equals(other.Point) &&
SpatialBlend.Equals(other.SpatialBlend);
}
public override bool Equals(object obj)
{
return obj is SoundEvent other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
var hashCode = Clip != null ? Clip.GetHashCode() : 0;
hashCode = (hashCode * 397) ^ Volume.GetHashCode();
hashCode = (hashCode * 397) ^ Pitch.GetHashCode();
hashCode = (hashCode * 397) ^ Point.GetHashCode();
hashCode = (hashCode * 397) ^ SpatialBlend.GetHashCode();
return hashCode;
}
}
}
public struct SoundEventData : IComponentData
{
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 7961093a9fd441c1b802a3dd7e506787
timeCreated: 1533307201

View file

@ -0,0 +1,9 @@
using UnityEngine;
namespace Events
{
public struct WindowDragEventData : IEventComponentData
{
public Vector2 LastMousePos;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4aea071e319c45cb8c322bc4613c8e58
timeCreated: 1532350818

View file

@ -0,0 +1,14 @@
using Unity.Entities;
namespace Events
{
public struct WindowOpenEventData : IEventComponentData
{
public Entity Player;
}
public struct WindowCloseEventData : IEventComponentData
{
public Entity Player;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bd78d45b7a2546fca66b6f55a9545018
timeCreated: 1532423994