1
This commit is contained in:
@@ -21,7 +21,9 @@ namespace BITFALL
|
||||
public const string HeavyAttack =nameof(HeavyAttack);
|
||||
public const string Charging =nameof(Charging);
|
||||
public const string Climb =nameof(Climb);
|
||||
public const string Use = nameof(Use);
|
||||
public const string Exit =nameof(Exit);
|
||||
public const string Exited =nameof(Exited);
|
||||
public const string Holster = nameof(Holster);
|
||||
public const string Walk = nameof(Walk);
|
||||
public const string Crouch = nameof(Crouch);
|
||||
|
17
Assets/BITFALL/Entities/Armor/BITFALL.Entities.Armor.asmdef
Normal file
17
Assets/BITFALL/Entities/Armor/BITFALL.Entities.Armor.asmdef
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Armor",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": true
|
||||
}
|
17
Assets/BITFALL/Entities/Armor/IArmor.cs
Normal file
17
Assets/BITFALL/Entities/Armor/IArmor.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Entities.Armor
|
||||
{
|
||||
public interface IArmorType{}
|
||||
public interface IArmor
|
||||
{
|
||||
int Armor { get; }
|
||||
bool TryGetCurrentArmor(out IBasicItem item);
|
||||
event Action<int> OnArmorChanged;
|
||||
event Action<IBasicItem> OnEquipArmor;
|
||||
event Action<IBasicItem> OnUnEquipArmor;
|
||||
}
|
||||
}
|
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "BITFALL.Entities.Equipment",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:677cd05ca06c46b4395470200b1acdad",
|
||||
"GUID:709caf8d7fb6ef24bbba0ab9962a3ad0"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
17
Assets/BITFALL/Entities/Equipment/EquipmentAsArms.cs
Normal file
17
Assets/BITFALL/Entities/Equipment/EquipmentAsArms.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using BITKit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITFALL
|
||||
{
|
||||
public interface IEquipmentAsArms : IProperty { }
|
||||
[System.Serializable]
|
||||
public record EquipmentAsWeapon: IEquipmentAsArms { }
|
||||
[System.Serializable]
|
||||
public record EquipmentUseItem: IEquipmentAsArms { }
|
||||
|
||||
}
|
38
Assets/BITFALL/Entities/Equipment/EquipmentAsSlot.cs
Normal file
38
Assets/BITFALL/Entities/Equipment/EquipmentAsSlot.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using BITKit;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace BITFALL
|
||||
{
|
||||
public interface IEquipmentSlot
|
||||
{
|
||||
|
||||
}
|
||||
public abstract record EquipmentSlot: IEquipmentSlot
|
||||
{
|
||||
public override int GetHashCode() => GetType().GetHashCode();
|
||||
}
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsHead: EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsBody : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsArmor : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsHeal : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsBackpack : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsArmorPlates : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsTactics : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsThrow : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsEquip : EquipmentSlot { }
|
||||
[System.Serializable]
|
||||
public sealed record EquipmentAsSlot : IProperty
|
||||
{
|
||||
[SerializeReference, SubclassSelector] public IEquipmentSlot slot;
|
||||
}
|
||||
}
|
27
Assets/BITFALL/Entities/Equipment/IEntityEquipment.cs
Normal file
27
Assets/BITFALL/Entities/Equipment/IEntityEquipment.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
using BITKit.Core.Entites;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITFALL.Entities.Equipment
|
||||
{
|
||||
public interface IEntityEquipment
|
||||
{
|
||||
event Action<IBasicItem> OnEquip;
|
||||
event Action<IBasicItem> OnDeEquip;
|
||||
bool IsSupportItem(IBasicItem item);
|
||||
void EntryEquip(int index);
|
||||
void EntryEquip(Func<string,bool> item);
|
||||
void EntryEquip(IBasicItem item);
|
||||
}
|
||||
public interface IEquipBase : IEntryElement, IAwake, IStart, IUpdate
|
||||
{
|
||||
string AddressablePath { get; }
|
||||
IEntity Entity { get; set; }
|
||||
IBasicItem Item { get; set; }
|
||||
bool IsSupportItem(IBasicItem item);
|
||||
void PlayAudio(string name);
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BITKit;
|
||||
|
||||
namespace BITFALL.Entities.Equipment
|
||||
{
|
||||
public interface IEntityEquipmentContainer
|
||||
{
|
||||
Action<IEquipmentSlot, IBasicItem> OnEquip { get; set; }
|
||||
Action<IEquipmentSlot, IBasicItem> OnDeEquip { get; set; }
|
||||
bool TryDeEquip<T>(T slot=default) where T : IEquipmentSlot;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user