Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
10
Assets/Scripts/Events/ActorPickupEvent.cs
Normal file
10
Assets/Scripts/Events/ActorPickupEvent.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/ActorPickupEvent.cs.meta
Normal file
3
Assets/Scripts/Events/ActorPickupEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b247a6fbe10f40938ffa7e22d35fd40f
|
||||
timeCreated: 1532199409
|
||||
8
Assets/Scripts/Events/AnimatorRebindEventData.cs
Normal file
8
Assets/Scripts/Events/AnimatorRebindEventData.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Assets.Scripts.Events
|
||||
{
|
||||
public struct AnimatorRebindEventData : IComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Events/AnimatorRebindEventData.cs.meta
Normal file
11
Assets/Scripts/Events/AnimatorRebindEventData.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 33b7a452ffbaba44cab899f6930da89a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6
Assets/Scripts/Events/EntityDeathEvent.cs
Normal file
6
Assets/Scripts/Events/EntityDeathEvent.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Events
|
||||
{
|
||||
public struct EntityDeathEvent : IEventComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/EntityDeathEvent.cs.meta
Normal file
3
Assets/Scripts/Events/EntityDeathEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b8ff00669f8e414bb16f67d1755ebca7
|
||||
timeCreated: 1533652754
|
||||
13
Assets/Scripts/Events/EventComponentGroup.cs
Normal file
13
Assets/Scripts/Events/EventComponentGroup.cs
Normal 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); });
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/EventComponentGroup.cs.meta
Normal file
3
Assets/Scripts/Events/EventComponentGroup.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e6d3d4b32cc6460e91139470a1012839
|
||||
timeCreated: 1532259493
|
||||
9
Assets/Scripts/Events/EventData.cs
Normal file
9
Assets/Scripts/Events/EventData.cs
Normal 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
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/EventData.cs.meta
Normal file
3
Assets/Scripts/Events/EventData.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ba36172bc3144a308bf6887bddf03c9b
|
||||
timeCreated: 1532171361
|
||||
9
Assets/Scripts/Events/FireGrenadeEvent.cs
Normal file
9
Assets/Scripts/Events/FireGrenadeEvent.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct FireGrenadeEvent : IEventComponentData
|
||||
{
|
||||
public Hash128 GrenadePrefab;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/FireGrenadeEvent.cs.meta
Normal file
3
Assets/Scripts/Events/FireGrenadeEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8265656d6944fec9bef09d8fec1ece1
|
||||
timeCreated: 1533642673
|
||||
10
Assets/Scripts/Events/FireWeaponEvent.cs
Normal file
10
Assets/Scripts/Events/FireWeaponEvent.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct FireWeaponEvent : IEventComponentData
|
||||
{
|
||||
public LayerMask LayerMask;
|
||||
public float ScreenShake;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/FireWeaponEvent.cs.meta
Normal file
3
Assets/Scripts/Events/FireWeaponEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9f81546458594c83a96515ddd53232b3
|
||||
timeCreated: 1534010304
|
||||
8
Assets/Scripts/Events/IEventComponentData.cs
Normal file
8
Assets/Scripts/Events/IEventComponentData.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public interface IEventComponentData : IComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/IEventComponentData.cs.meta
Normal file
3
Assets/Scripts/Events/IEventComponentData.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 48c1e56af9234d8997f72612f22e4222
|
||||
timeCreated: 1532259554
|
||||
6
Assets/Scripts/Events/InventoryDirtyEventData.cs
Normal file
6
Assets/Scripts/Events/InventoryDirtyEventData.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Events
|
||||
{
|
||||
public struct InventoryDirtyEventData : IEventComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/InventoryDirtyEventData.cs.meta
Normal file
3
Assets/Scripts/Events/InventoryDirtyEventData.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9d2e04bb74494f5c8e79d63bd4538ea4
|
||||
timeCreated: 1532258362
|
||||
37
Assets/Scripts/Events/ItemDragEvent.cs
Normal file
37
Assets/Scripts/Events/ItemDragEvent.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/ItemDragEvent.cs.meta
Normal file
3
Assets/Scripts/Events/ItemDragEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dc3237f73bee4bac9c7b7337b49aba15
|
||||
timeCreated: 1534079286
|
||||
15
Assets/Scripts/Events/ItemDropEvent.cs
Normal file
15
Assets/Scripts/Events/ItemDropEvent.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/ItemDropEvent.cs.meta
Normal file
3
Assets/Scripts/Events/ItemDropEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2359d5c7d5b94cc894aceb401f6c8ff3
|
||||
timeCreated: 1532035979
|
||||
14
Assets/Scripts/Events/ItemPickupEventData.cs
Normal file
14
Assets/Scripts/Events/ItemPickupEventData.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct ItemPickupEventData : IComponentData
|
||||
{
|
||||
public readonly Entity PlayerEntity;
|
||||
|
||||
public ItemPickupEventData(Entity playerEntity)
|
||||
{
|
||||
PlayerEntity = playerEntity;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/ItemPickupEventData.cs.meta
Normal file
3
Assets/Scripts/Events/ItemPickupEventData.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d490d3f1371f49b49f5fe3f7b5f00a8d
|
||||
timeCreated: 1532199154
|
||||
14
Assets/Scripts/Events/ItemUseEventData.cs
Normal file
14
Assets/Scripts/Events/ItemUseEventData.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Events/ItemUseEventData.cs.meta
Normal file
11
Assets/Scripts/Events/ItemUseEventData.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bb1a311f4893efc40921b93a875634a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6
Assets/Scripts/Events/OverEvent.cs
Normal file
6
Assets/Scripts/Events/OverEvent.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Events
|
||||
{
|
||||
public struct OverEvent : IEventComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/OverEvent.cs.meta
Normal file
3
Assets/Scripts/Events/OverEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 99a72e31a1f14ec5a45dfcca22379982
|
||||
timeCreated: 1534104952
|
||||
9
Assets/Scripts/Events/ReloadEvent.cs
Normal file
9
Assets/Scripts/Events/ReloadEvent.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using DefaultNamespace;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct ReloadEvent : IEventComponentData
|
||||
{
|
||||
public bool1 Cancel;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/ReloadEvent.cs.meta
Normal file
3
Assets/Scripts/Events/ReloadEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8a28f5ba0ac4f54b2ed788e1199f03f
|
||||
timeCreated: 1534003791
|
||||
6
Assets/Scripts/Events/SelectEvent.cs
Normal file
6
Assets/Scripts/Events/SelectEvent.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Events
|
||||
{
|
||||
public struct SelectEvent : IEventComponentData
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/SelectEvent.cs.meta
Normal file
3
Assets/Scripts/Events/SelectEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9ba64b4279d84b6885d0a1d73e4cbafa
|
||||
timeCreated: 1534249014
|
||||
46
Assets/Scripts/Events/SoundEvent.cs
Normal file
46
Assets/Scripts/Events/SoundEvent.cs
Normal 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
|
||||
{
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/SoundEvent.cs.meta
Normal file
3
Assets/Scripts/Events/SoundEvent.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7961093a9fd441c1b802a3dd7e506787
|
||||
timeCreated: 1533307201
|
||||
9
Assets/Scripts/Events/WindowDragEventData.cs
Normal file
9
Assets/Scripts/Events/WindowDragEventData.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct WindowDragEventData : IEventComponentData
|
||||
{
|
||||
public Vector2 LastMousePos;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/WindowDragEventData.cs.meta
Normal file
3
Assets/Scripts/Events/WindowDragEventData.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4aea071e319c45cb8c322bc4613c8e58
|
||||
timeCreated: 1532350818
|
||||
14
Assets/Scripts/Events/WindowEvents.cs
Normal file
14
Assets/Scripts/Events/WindowEvents.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using Unity.Entities;
|
||||
|
||||
namespace Events
|
||||
{
|
||||
public struct WindowOpenEventData : IEventComponentData
|
||||
{
|
||||
public Entity Player;
|
||||
}
|
||||
|
||||
public struct WindowCloseEventData : IEventComponentData
|
||||
{
|
||||
public Entity Player;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Events/WindowEvents.cs.meta
Normal file
3
Assets/Scripts/Events/WindowEvents.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bd78d45b7a2546fca66b6f55a9545018
|
||||
timeCreated: 1532423994
|
||||
Loading…
Add table
Add a link
Reference in a new issue