Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
33
Assets/Scripts/Prefabs/AmmoPrefab.cs
Normal file
33
Assets/Scripts/Prefabs/AmmoPrefab.cs
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
public class AmmoPrefab : ScriptableObject
|
||||
{
|
||||
public AmmoPrefabData Data;
|
||||
public Sprite Shell;
|
||||
public AssetReferenceGameObject ShellsParticles;
|
||||
public GameObject Template;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct AmmoPrefabData
|
||||
{
|
||||
public float MaxLife;
|
||||
public float Speed;
|
||||
public float Damage;
|
||||
[Range(0, 1)] public float RicochetChance;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AssetReferenceAmmoPrefab : AssetReferenceT<AmmoPrefab>
|
||||
{
|
||||
public AssetReferenceAmmoPrefab(string guid)
|
||||
: base(guid)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/AmmoPrefab.cs.meta
Normal file
3
Assets/Scripts/Prefabs/AmmoPrefab.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e752cd37fac64247804c3dd098b1be7b
|
||||
timeCreated: 1532013560
|
||||
8
Assets/Scripts/Prefabs/Components.meta
Normal file
8
Assets/Scripts/Prefabs/Components.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 65c64a3f653fac74288f0b551a175ba3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Scripts/Prefabs/Components/EnemyPrefabComponent.cs
Normal file
19
Assets/Scripts/Prefabs/Components/EnemyPrefabComponent.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
public class EnemyPrefabComponent : MonoBehaviour
|
||||
{
|
||||
public AssetReferenceEnemyPrefab Prefab;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
Prefab.LoadAssetAsync();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Prefab.ReleaseAsset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c527b4bb994d495eaae275e8c569181d
|
||||
timeCreated: 1531488294
|
||||
27
Assets/Scripts/Prefabs/EnemyPrefab.cs
Normal file
27
Assets/Scripts/Prefabs/EnemyPrefab.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
public class EnemyPrefab : ScriptableObject
|
||||
{
|
||||
public float AttackRange;
|
||||
public float Damage;
|
||||
public AssetReferenceGameObject DeathParticles;
|
||||
public SoundLibrary[] DeathSounds;
|
||||
public DropEntry[] Drops;
|
||||
public float MaxHealth;
|
||||
public AssetReferenceGameObject Template;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AssetReferenceEnemyPrefab : AssetReferenceT<EnemyPrefab>
|
||||
{
|
||||
public AssetReferenceEnemyPrefab(string guid)
|
||||
: base(guid)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/EnemyPrefab.cs.meta
Normal file
3
Assets/Scripts/Prefabs/EnemyPrefab.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8f4aa875a56b4f7f8b1fbf8e23837923
|
||||
timeCreated: 1531486324
|
||||
24
Assets/Scripts/Prefabs/ItemPrefab.cs
Normal file
24
Assets/Scripts/Prefabs/ItemPrefab.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
public class ItemPrefab : ScriptableObject
|
||||
{
|
||||
public ColliderType ColliderType;
|
||||
public AssetReferenceGameObject ContainerPrefab;
|
||||
public Sprite Icon;
|
||||
public bool UseCustomContainer;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AssetReferenceItemPrefab : AssetReferenceT<ItemPrefab>
|
||||
{
|
||||
public AssetReferenceItemPrefab(string guid)
|
||||
: base(guid)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/ItemPrefab.cs.meta
Normal file
3
Assets/Scripts/Prefabs/ItemPrefab.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c4d4b477cb794edd9277ca061f41b56a
|
||||
timeCreated: 1532006939
|
||||
3
Assets/Scripts/Prefabs/Items.meta
Normal file
3
Assets/Scripts/Prefabs/Items.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 995b9fb4e2d84c0ab917cab1ce856b29
|
||||
timeCreated: 1532172134
|
||||
22
Assets/Scripts/Prefabs/Items/GrenadeItem.cs
Normal file
22
Assets/Scripts/Prefabs/Items/GrenadeItem.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using DefaultNamespace;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Items
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
public class GrenadeItem : ItemPrefab
|
||||
{
|
||||
public AssetReferenceGameObject Template;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AssetReferenceGrenadeItem : AssetReferenceT<GrenadeItem>
|
||||
{
|
||||
public AssetReferenceGrenadeItem(string guid)
|
||||
: base(guid)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/Items/GrenadeItem.cs.meta
Normal file
3
Assets/Scripts/Prefabs/Items/GrenadeItem.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9ba7f43385c144a4890478aece8ce622
|
||||
timeCreated: 1534252299
|
||||
13
Assets/Scripts/Prefabs/Items/HealthKitItem.cs
Normal file
13
Assets/Scripts/Prefabs/Items/HealthKitItem.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace Items
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Items/Health Kit")]
|
||||
public class HealthKitItem : UsableItemPrefab, IHealItem
|
||||
{
|
||||
public float Health;
|
||||
public Sprite UseItemIcon;
|
||||
|
||||
float IHealItem.Health => Health;
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/Items/HealthKitItem.cs.meta
Normal file
3
Assets/Scripts/Prefabs/Items/HealthKitItem.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ab6eae4632724bb09465125261e2d1b2
|
||||
timeCreated: 1532172148
|
||||
7
Assets/Scripts/Prefabs/Items/IHealItem.cs
Normal file
7
Assets/Scripts/Prefabs/Items/IHealItem.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Items
|
||||
{
|
||||
public interface IHealItem
|
||||
{
|
||||
float Health { get; }
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Prefabs/Items/IHealItem.cs.meta
Normal file
11
Assets/Scripts/Prefabs/Items/IHealItem.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4417e04531545b940a12da1361cd5fb8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
55
Assets/Scripts/Prefabs/Items/RangedWeaponItem.cs
Normal file
55
Assets/Scripts/Prefabs/Items/RangedWeaponItem.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using DefaultNamespace;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Items
|
||||
{
|
||||
[CreateAssetMenu]
|
||||
public class RangedWeaponItem : ItemPrefab
|
||||
{
|
||||
public AmmoPrefab AmmoType;
|
||||
public RangedWeaponPrefabAnimationData AnimationData;
|
||||
|
||||
public RangedWeaponPrefabData Data = new RangedWeaponPrefabData { Accuracy = 1, AccuracyRegainSpeed = 1, DamageMultiply = 1 };
|
||||
|
||||
public SoundLibrary FireSound;
|
||||
public AssetReferenceGameObject MuzzleFlash;
|
||||
public SoundLibrary OutOfAmmoSound;
|
||||
public AssetReferenceGameObject Template;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct RangedWeaponPrefabData
|
||||
{
|
||||
public float DamageMultiply;
|
||||
public int RateOfFire;
|
||||
public int ClipCapacity;
|
||||
public int AmmoCapacity;
|
||||
public int ReloadAmount;
|
||||
public int ProjectileCount;
|
||||
public float ScreenShake;
|
||||
[Range(0, 1)] public float Accuracy;
|
||||
public float AccuracyDegrade;
|
||||
public float AccuracyAttackTime;
|
||||
public float AccuracyRegainSpeed;
|
||||
public bool1 Automatic;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct RangedWeaponPrefabAnimationData
|
||||
{
|
||||
public AnimationClip HoldingAnimation;
|
||||
public AnimationClip ReloadAnimation;
|
||||
public AnimationClip FireAnimation;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class AssetReferenceRangedWeapon : AssetReferenceT<RangedWeaponItem>
|
||||
{
|
||||
public AssetReferenceRangedWeapon(string guid)
|
||||
: base(guid)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Prefabs/Items/RangedWeaponItem.cs.meta
Normal file
3
Assets/Scripts/Prefabs/Items/RangedWeaponItem.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4c0d81a071534a5f86b0872b841474bd
|
||||
timeCreated: 1533983435
|
||||
8
Assets/Scripts/Prefabs/Items/UsableItemPrefab.cs
Normal file
8
Assets/Scripts/Prefabs/Items/UsableItemPrefab.cs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
using DefaultNamespace;
|
||||
|
||||
namespace Items
|
||||
{
|
||||
public class UsableItemPrefab : ItemPrefab
|
||||
{
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Prefabs/Items/UsableItemPrefab.cs.meta
Normal file
11
Assets/Scripts/Prefabs/Items/UsableItemPrefab.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27f913e197f8a384e807270f276013a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Add table
Add a link
Reference in a new issue