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,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;
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: f207574366e24c14aa33de08b15f58dc
timeCreated: 1531581769

View file

@ -0,0 +1,34 @@
using System;
using Unity.Entities;
using UnityEngine;
namespace DefaultNamespace
{
public struct WeaponPartsData : ISharedComponentData, IEquatable<WeaponPartsData>
{
public Transform Barrel;
public Transform ShellsExit;
public AudioSource Audio;
public bool Equals(WeaponPartsData other)
{
return Equals(Barrel, other.Barrel) && Equals(ShellsExit, other.ShellsExit) && Equals(Audio, other.Audio);
}
public override bool Equals(object obj)
{
return obj is WeaponPartsData other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
var hashCode = Barrel != null ? Barrel.GetHashCode() : 0;
hashCode = (hashCode * 397) ^ (ShellsExit != null ? ShellsExit.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (Audio != null ? Audio.GetHashCode() : 0);
return hashCode;
}
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: fabf2705a3144a6795f30d6c120ee0fc
timeCreated: 1533985546

View file

@ -0,0 +1,26 @@
using Items;
using System;
using Unity.Entities;
namespace DefaultNamespace
{
public struct WeaponPropertiesData : ISharedComponentData, IEquatable<WeaponPropertiesData>
{
public RangedWeaponItem Weapon;
public bool Equals(WeaponPropertiesData other)
{
return Equals(Weapon, other.Weapon);
}
public override bool Equals(object obj)
{
return obj is WeaponPropertiesData other && Equals(other);
}
public override int GetHashCode()
{
return Weapon != null ? Weapon.GetHashCode() : 0;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cba5ec52a64a4a05950feb2629ca1c19
timeCreated: 1534009699