diff --git a/Assets/Artists/Configs/Animator/UseController.controller b/Assets/Artists/Configs/Animator/UseController.controller index 9d3ca10c3..3c962743f 100644 --- a/Assets/Artists/Configs/Animator/UseController.controller +++ b/Assets/Artists/Configs/Animator/UseController.controller @@ -1,5 +1,27 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1101 &-8583447253539064739 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: 0} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 1 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 1 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 2 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!1102 &-6225440301908278770 AnimatorState: serializedVersion: 6 @@ -10,7 +32,8 @@ AnimatorState: m_Name: Exit m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: -8583447253539064739} m_StateMachineBehaviours: - {fileID: 3941207575723502659} m_Position: {x: 50, y: 50, z: 0} @@ -65,12 +88,12 @@ AnimatorStateTransition: m_Mute: 0 m_IsExit: 0 serializedVersion: 3 - m_TransitionDuration: 0.25 + m_TransitionDuration: 0 m_TransitionOffset: 0 - m_ExitTime: 0.75 + m_ExitTime: 1 m_HasExitTime: 1 m_HasFixedDuration: 1 - m_InterruptionSource: 0 + m_InterruptionSource: 2 m_OrderedInterruption: 1 m_CanTransitionToSelf: 1 --- !u!91 &9100000 @@ -95,6 +118,28 @@ AnimatorController: m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} +--- !u!1101 &761492899490755068 +AnimatorStateTransition: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_Conditions: [] + m_DstStateMachine: {fileID: 0} + m_DstState: {fileID: -6225440301908278770} + m_Solo: 0 + m_Mute: 0 + m_IsExit: 0 + serializedVersion: 3 + m_TransitionDuration: 0 + m_TransitionOffset: 0 + m_ExitTime: 1 + m_HasExitTime: 1 + m_HasFixedDuration: 1 + m_InterruptionSource: 2 + m_OrderedInterruption: 1 + m_CanTransitionToSelf: 1 --- !u!114 &1601994892391978028 MonoBehaviour: m_ObjectHideFlags: 1 @@ -130,7 +175,7 @@ AnimatorStateMachine: m_ChildStates: - serializedVersion: 1 m_State: {fileID: 3912522527455923443} - m_Position: {x: 30, y: 180, z: 0} + m_Position: {x: 30, y: 170, z: 0} - serializedVersion: 1 m_State: {fileID: 8555862083137980829} m_Position: {x: 30, y: 250, z: 0} @@ -144,7 +189,7 @@ AnimatorStateMachine: m_StateMachineBehaviours: [] m_AnyStatePosition: {x: 50, y: 20, z: 0} m_EntryPosition: {x: 50, y: 120, z: 0} - m_ExitPosition: {x: 800, y: 120, z: 0} + m_ExitPosition: {x: 480, y: 240, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_DefaultState: {fileID: 3912522527455923443} --- !u!1102 &3912522527455923443 @@ -198,7 +243,7 @@ MonoBehaviour: - rid: 806583484692037649 type: {class: Reference, ns: BITKit, asm: BITKit} data: - value: Close + value: Exit --- !u!1102 &8555862083137980829 AnimatorState: serializedVersion: 6 @@ -209,7 +254,8 @@ AnimatorState: m_Name: Use m_Speed: 1 m_CycleOffset: 0 - m_Transitions: [] + m_Transitions: + - {fileID: 761492899490755068} m_StateMachineBehaviours: - {fileID: -3138131730491430725} m_Position: {x: 50, y: 50, z: 0} diff --git a/Assets/Artists/Configs/Items/BodyPlate.asset b/Assets/Artists/Configs/Items/BodyPlate.asset index 21b388df0..392740a12 100644 --- a/Assets/Artists/Configs/Items/BodyPlate.asset +++ b/Assets/Artists/Configs/Items/BodyPlate.asset @@ -9,21 +9,32 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1124c18d28c78f74cae355c518715ba3, type: 3} + m_Script: {fileID: 11500000, guid: 009e9a685f706414d964df0e5fcaa064, type: 3} m_Name: BodyPlate m_EditorClassIdentifier: displayName: BodyPlate description: "\u62A4\u7532\u63D2\u677F,\u63D0\u4F9B\u9AD8\u7EA7\u9632\u62A4" addressablePath: Assets/BodyPlate - prefab: {fileID: 0} + prefab: {fileID: 5771951068758094859, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, type: 3} squareIcon: {fileID: 2800000, guid: 0e89085d0836ce54f955db61e1762017, type: 3} rectangleIcon: {fileID: 2800000, guid: 0e89085d0836ce54f955db61e1762017, type: 3} quality: 3 factoryProperties: - rid: 806583484692037655 + - rid: 806583484692037794 + meleeDamage: 0 + meleeRange: 0 + meleeForce: 0 + heavyMeleeDamage: 0 + heavyMeleeRange: 0 + heavyMeleeForce: 0 references: version: 2 RefIds: - rid: 806583484692037655 type: {class: EquipmentUseItem, ns: BITFALL, asm: BITFALL.Entities.Equipment} data: + - rid: 806583484692037794 + type: {class: AddArmor, ns: BITFALL.Items.Armor, asm: BITFALL.Item} + data: + Armor: 25 diff --git a/Assets/Artists/Configs/Items/Dev_BulletVest.asset b/Assets/Artists/Configs/Items/Dev_BulletVest.asset index de5ab74f8..2c032dcee 100644 --- a/Assets/Artists/Configs/Items/Dev_BulletVest.asset +++ b/Assets/Artists/Configs/Items/Dev_BulletVest.asset @@ -9,7 +9,7 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1124c18d28c78f74cae355c518715ba3, type: 3} + m_Script: {fileID: 11500000, guid: 6f5161c9da9ad2a4889e94ad0f66ae2f, type: 3} m_Name: Dev_BulletVest m_EditorClassIdentifier: displayName: "\u9632\u5F39\u80CC\u5FC3" @@ -23,6 +23,7 @@ MonoBehaviour: - rid: 6077775357238050820 - rid: 6077775357238050821 - rid: 6077775357238050823 + maxArmor: 100 references: version: 2 RefIds: diff --git a/Assets/Artists/Configs/Items/Umbrella.asset b/Assets/Artists/Configs/Items/Umbrella.asset index 3c7a15d07..14b9127b9 100644 --- a/Assets/Artists/Configs/Items/Umbrella.asset +++ b/Assets/Artists/Configs/Items/Umbrella.asset @@ -20,10 +20,10 @@ MonoBehaviour: rectangleIcon: {fileID: 2800000, guid: 79525a62c6fb81b4aba7f4a445973fb3, type: 3} quality: 0 factoryProperties: - - rid: 806583144903606803 + - rid: 806583484692037661 references: version: 2 RefIds: - - rid: 806583144903606803 - type: {class: EquipmentAsWeapon, ns: BITFALL, asm: BITFALL.Entities.Equipment} + - rid: 806583484692037661 + type: {class: EquipmentUseItem, ns: BITFALL, asm: BITFALL.Entities.Equipment} data: diff --git a/Assets/Artists/Models/Guns/Plates/BodyPlate.fbx b/Assets/Artists/Models/Guns/Plates/BodyPlate.fbx index 970e51e90..07e398234 100644 Binary files a/Assets/Artists/Models/Guns/Plates/BodyPlate.fbx and b/Assets/Artists/Models/Guns/Plates/BodyPlate.fbx differ diff --git a/Assets/Artists/Models/Guns/Plates/BodyPlate_Draw.fbx b/Assets/Artists/Models/Guns/Plates/BodyPlate_Draw.fbx index 97c4596cd..6c2827aaf 100644 Binary files a/Assets/Artists/Models/Guns/Plates/BodyPlate_Draw.fbx and b/Assets/Artists/Models/Guns/Plates/BodyPlate_Draw.fbx differ diff --git a/Assets/Artists/Models/Guns/Plates/BodyPlate_Insert.fbx b/Assets/Artists/Models/Guns/Plates/BodyPlate_Insert.fbx index 3da9ed5e1..f61dabc8e 100644 Binary files a/Assets/Artists/Models/Guns/Plates/BodyPlate_Insert.fbx and b/Assets/Artists/Models/Guns/Plates/BodyPlate_Insert.fbx differ diff --git a/Assets/Artists/Prefabs/Loot/BodyPlate Variant.prefab b/Assets/Artists/Prefabs/Loot/BodyPlate Variant.prefab index da3f19a1c..a4759bed9 100644 --- a/Assets/Artists/Prefabs/Loot/BodyPlate Variant.prefab +++ b/Assets/Artists/Prefabs/Loot/BodyPlate Variant.prefab @@ -12,6 +12,10 @@ PrefabInstance: propertyPath: m_Name value: Armor_Plate objectReference: {fileID: 0} + - target: {fileID: 1020102484343300, guid: fe766f33c555170478510b53c1c4fb40, type: 3} + propertyPath: m_Layer + value: 10 + objectReference: {fileID: 0} - target: {fileID: 4983065401952186, guid: fe766f33c555170478510b53c1c4fb40, type: 3} propertyPath: m_LocalScale.x value: 0.5 @@ -123,6 +127,11 @@ PrefabInstance: value: objectReference: {fileID: 11400000, guid: 220746f56523829498b8b83d62365cc7, type: 2} + - target: {fileID: 4258070652695701351, guid: d8b5a76c92d6b3a4592b14e21ad018c0, + type: 3} + propertyPath: rmsCount + value: 1 + objectReference: {fileID: 0} - target: {fileID: 4258070652695701351, guid: d8b5a76c92d6b3a4592b14e21ad018c0, type: 3} propertyPath: outlineColor.b diff --git a/Assets/Artists/Prefabs/Player.prefab b/Assets/Artists/Prefabs/Player.prefab index 115c38625..8cfdd79f6 100644 --- a/Assets/Artists/Prefabs/Player.prefab +++ b/Assets/Artists/Prefabs/Player.prefab @@ -85,8 +85,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 808956046548636348} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0} + m_LocalRotation: {x: -0.00017264773, y: -0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -103,11 +103,11 @@ ParentConstraint: serializedVersion: 2 m_Weight: 1 m_TranslationAtRest: {x: 0, y: 0, z: 0} - m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationAtRest: {x: -0.019783963, y: 0, z: 0} m_TranslationOffsets: - {x: 0, y: 0, z: 0} m_RotationOffsets: - - {x: -89.96574, y: 0, z: -180} + - {x: -90, y: 0, z: -180} m_AffectTranslationX: 1 m_AffectTranslationY: 1 m_AffectTranslationZ: 1 @@ -631,8 +631,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2809084911145372184} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: -0.0005187313, y: -0.00088787026, z: 0.00088721456, w: 0.99999905} + m_LocalPosition: {x: -0.0000000011641532, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -649,11 +649,11 @@ ParentConstraint: serializedVersion: 2 m_Weight: 1 m_TranslationAtRest: {x: 0, y: 0, z: 0} - m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationAtRest: {x: -0.05935189, y: -0.10179514, z: 0.101720035} m_TranslationOffsets: - {x: 0.0033988953, y: -0.0017871857, z: -0.0021253824} m_RotationOffsets: - - {x: -89.89721, y: 0, z: -179.89825} + - {x: -89.90309, y: 0, z: -179.89825} m_AffectTranslationX: 1 m_AffectTranslationY: 1 m_AffectTranslationZ: 1 @@ -769,7 +769,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3237588652320484027} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0.00017264773, y: -0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 @@ -787,11 +787,11 @@ ParentConstraint: serializedVersion: 2 m_Weight: 1 m_TranslationAtRest: {x: 0, y: 0, z: 0} - m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationAtRest: {x: -0.019783963, y: 0, z: 0} m_TranslationOffsets: - {x: 0, y: 0, z: 0} m_RotationOffsets: - - {x: -89.96574, y: 0, z: -180} + - {x: -90, y: 0, z: -180} m_AffectTranslationX: 1 m_AffectTranslationY: 1 m_AffectTranslationZ: 1 @@ -916,6 +916,79 @@ MonoBehaviour: - {fileID: 1287739094561733551} - {fileID: 2838866964234946490} distance: 2 +--- !u!1 &4007672727939677462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2210602610584932869} + - component: {fileID: 7513917375114389977} + - component: {fileID: 4328174935863353041} + m_Layer: 7 + m_Name: CameraRoot + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2210602610584932869 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4007672727939677462} + serializedVersion: 2 + m_LocalRotation: {x: -0.00017264773, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2817909135410992819} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1773428102 &7513917375114389977 +ParentConstraint: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4007672727939677462} + m_Enabled: 1 + serializedVersion: 2 + m_Weight: 1 + m_TranslationAtRest: {x: 0, y: 0, z: 0} + m_RotationAtRest: {x: -0.019783963, y: 0, z: 0} + m_TranslationOffsets: + - {x: 0, y: 0, z: 0} + m_RotationOffsets: + - {x: -90, y: 0, z: -180} + m_AffectTranslationX: 1 + m_AffectTranslationY: 1 + m_AffectTranslationZ: 1 + m_AffectRotationX: 1 + m_AffectRotationY: 1 + m_AffectRotationZ: 1 + m_Active: 1 + m_IsLocked: 0 + m_Sources: + - sourceTransform: {fileID: 8946689202084560547} + weight: 1 +--- !u!114 &4328174935863353041 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4007672727939677462} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 98ce129373beee341b6f0723f3fb2ce7, type: 3} + m_Name: + m_EditorClassIdentifier: + locationAdditive: {fileID: 843716438194269699} --- !u!1 &4384995658573422445 GameObject: m_ObjectHideFlags: 0 @@ -988,6 +1061,7 @@ GameObject: - component: {fileID: 6002452162850529175} - component: {fileID: 2495495580039550089} - component: {fileID: 6678778182358330342} + - component: {fileID: 7617151341549785245} - component: {fileID: 1315802043012238542} - component: {fileID: 3865076157975442983} - component: {fileID: 300229368} @@ -1106,6 +1180,18 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 73333e0a8f0bc4a4b82c06db4c35a21f, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!114 &7617151341549785245 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4826102346843731729} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e7f45ee11a328d4bb6e46bca7457b1e, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!114 &1315802043012238542 MonoBehaviour: m_ObjectHideFlags: 0 @@ -2262,6 +2348,7 @@ Transform: - {fileID: 3118247446434326624} - {fileID: 1336897182535564798} - {fileID: 5723309033838735307} + - {fileID: 2817909135410992819} m_Father: {fileID: 2648601869858448235} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &4630340609974338260 @@ -2434,7 +2521,7 @@ Transform: m_GameObject: {fileID: 5692122997223440786} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: 0} + m_LocalPosition: {x: -0.000000056824806, y: 1, z: -0.000000059604645} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -2450,7 +2537,7 @@ PositionConstraint: m_Enabled: 1 serializedVersion: 2 m_Weight: 1 - m_TranslationAtRest: {x: 0, y: 1, z: 0} + m_TranslationAtRest: {x: -0.000000056824806, y: 1, z: -0.000000059604645} m_TranslationOffset: {x: 0, y: 0.35000002, z: 0} m_AffectTranslationX: 1 m_AffectTranslationY: 1 @@ -2833,8 +2920,8 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 8587898794680105710} serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalRotation: {x: -0.0005187313, y: -0.00088787026, z: 0.00088721456, w: 0.99999905} + m_LocalPosition: {x: -0.0000000018626451, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -2851,11 +2938,11 @@ ParentConstraint: serializedVersion: 2 m_Weight: 1 m_TranslationAtRest: {x: 0, y: 0, z: 0} - m_RotationAtRest: {x: 0, y: 0, z: 0} + m_RotationAtRest: {x: -0.05935189, y: -0.10179514, z: 0.101720035} m_TranslationOffsets: - {x: 0.0049743652, y: 0.00015449524, z: -0.002123952} m_RotationOffsets: - - {x: -89.89721, y: 0, z: -179.89825} + - {x: -89.90309, y: 0, z: -179.89825} m_AffectTranslationX: 1 m_AffectTranslationY: 1 m_AffectTranslationZ: 1 @@ -3226,6 +3313,11 @@ PrefabInstance: value: objectReference: {fileID: 22100000, guid: bef091cfa35bce54e8c8e8b19d41034c, type: 2} + - target: {fileID: 5866666021909216657, guid: 8ce64bfbf2bb80840af381346bccb782, + type: 3} + propertyPath: m_CullingMode + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6003611815629638046, guid: 8ce64bfbf2bb80840af381346bccb782, type: 3} propertyPath: m_Layer @@ -3474,6 +3566,342 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1851168842159684584} m_PrefabAsset: {fileID: 0} +--- !u!1001 &2346797690253046104 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2019605867538852436} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8536812581196974080, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -8483079287735800029, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -7982445368288305232, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -7805527542236588859, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -7083826889706597962, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -6761239244867884074, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -6565134293425240629, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -6179275997006789232, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -3799896878483850562, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -3686551328258449376, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -2853424563086286810, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -2853424563086286810, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -2107066420424512121, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -1800213932466231045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -1800213932466231045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 0bdc17ca1b76bc640b010f622a6886c3, type: 2} + - target: {fileID: -1745863489998566550, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: -457497680185661411, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 422738843169862328, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Name + value: BodyPlate + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 2192180338147824518, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2192180338147824518, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 0bdc17ca1b76bc640b010f622a6886c3, type: 2} + - target: {fileID: 4387719810744567721, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 4824860256124165047, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 6003611815629638046, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 7437873667914457442, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_CastShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8260868571131455172, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 8315903294366468851, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + propertyPath: m_Layer + value: 7 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + insertIndex: -1 + addedObject: {fileID: 2210602610584932869} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + insertIndex: -1 + addedObject: {fileID: 514671996699977757} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + insertIndex: -1 + addedObject: {fileID: 316352626332989457} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + insertIndex: -1 + addedObject: {fileID: 2486523390929547415} + m_SourcePrefab: {fileID: 100100000, guid: c1a991e2fc6f6f54c977926f66a4acec, type: 3} +--- !u!4 &2817909135410992819 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} +--- !u!1 &3193309152473533449 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} +--- !u!95 &514671996699977757 +Animator: + serializedVersion: 5 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3193309152473533449} + m_Enabled: 1 + m_Avatar: {fileID: 9000000, guid: 644cb63bc5228d44e901a3251d09e8cd, type: 3} + m_Controller: {fileID: 22100000, guid: dcdfe93268e289e429d7688802db1d19, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 +--- !u!114 &316352626332989457 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3193309152473533449} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 33c1c1e0ca03d374ab5faeff29166425, type: 3} + m_Name: + m_EditorClassIdentifier: + stateMachine: + states: + - rid: 806583484692037656 + - rid: 806583484692037657 + - rid: 806583484692037658 + _currentStateName: + debug: 0 + transitionOnNextFrame: 0 + item: {fileID: 11400000, guid: 220746f56523829498b8b83d62365cc7, type: 2} + animator: {fileID: 2486523390929547415} + renderers: + - {fileID: 4538978027255161566} + - {fileID: 5158269637596109219} + - {fileID: 5163696523639820346} + meleeService: + rid: 806583484692037659 + references: + version: 2 + RefIds: + - rid: 806583484692037656 + type: {class: Draw, ns: BITFALL.Entities.Equipment.Universal.States, asm: BITFALL.Equip} + data: + useController: {fileID: 316352626332989457} + - rid: 806583484692037657 + type: {class: Use, ns: BITFALL.Entities.Equipment.Universal.States, asm: BITFALL.Equip} + data: + useController: {fileID: 316352626332989457} + - rid: 806583484692037658 + type: {class: Exit, ns: BITFALL.Entities.Equipment.Universal.States, asm: BITFALL.Equip} + data: + useController: {fileID: 316352626332989457} + - rid: 806583484692037659 + type: {class: MeleeServiceSingleton, ns: BITFALL.Melee, asm: BITFALL.Melee.Runtime} + data: +--- !u!114 &2486523390929547415 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3193309152473533449} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a6ac57edc8fc02840a5887fc4ad996e1, type: 3} + m_Name: + m_EditorClassIdentifier: + animator: {fileID: 514671996699977757} + layerInfos: [] +--- !u!137 &4538978027255161566 stripped +SkinnedMeshRenderer: + m_CorrespondingSourceObject: {fileID: 2192180338147824518, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} +--- !u!137 &5158269637596109219 stripped +SkinnedMeshRenderer: + m_CorrespondingSourceObject: {fileID: -1800213932466231045, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} +--- !u!137 &5163696523639820346 stripped +SkinnedMeshRenderer: + m_CorrespondingSourceObject: {fileID: 7437873667914457442, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} +--- !u!4 &8946689202084560547 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -2542134114980474885, guid: c1a991e2fc6f6f54c977926f66a4acec, + type: 3} + m_PrefabInstance: {fileID: 2346797690253046104} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2683983924753848958 PrefabInstance: m_ObjectHideFlags: 0 @@ -3947,6 +4375,11 @@ PrefabInstance: value: objectReference: {fileID: 22100000, guid: 46694882ab940a44181008b28d8372ac, type: 2} + - target: {fileID: 5866666021909216657, guid: 644cb63bc5228d44e901a3251d09e8cd, + type: 3} + propertyPath: m_CullingMode + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6003611815629638046, guid: 644cb63bc5228d44e901a3251d09e8cd, type: 3} propertyPath: m_Layer @@ -5391,6 +5824,11 @@ PrefabInstance: propertyPath: m_Controller value: objectReference: {fileID: 9100000, guid: 7d5c6eb2ea2b1ff4b88c1dce034c306b, type: 2} + - target: {fileID: 5866666021909216657, guid: 644cb63bc5228d44e901a3251d09e8cd, + type: 3} + propertyPath: m_CullingMode + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6003611815629638046, guid: 644cb63bc5228d44e901a3251d09e8cd, type: 3} propertyPath: m_Layer @@ -5765,6 +6203,11 @@ PrefabInstance: value: objectReference: {fileID: 22100000, guid: a744a3b75eca9c8438f958e9c2651a1f, type: 2} + - target: {fileID: 5866666021909216657, guid: 5bbc8731abf94f94a8849dd8106296fe, + type: 3} + propertyPath: m_CullingMode + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6003611815629638046, guid: 5bbc8731abf94f94a8849dd8106296fe, type: 3} propertyPath: m_Layer diff --git a/Assets/Artists/Prefabs/Services/Framework.prefab b/Assets/Artists/Prefabs/Services/Framework.prefab index 45c1658f1..e4f4b16d7 100644 --- a/Assets/Artists/Prefabs/Services/Framework.prefab +++ b/Assets/Artists/Prefabs/Services/Framework.prefab @@ -1250,6 +1250,7 @@ Transform: - {fileID: 78207825956730707} - {fileID: 9175336589521335029} - {fileID: 6127738030921119031} + - {fileID: 558287489211925558} m_Father: {fileID: 5885585653203836409} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &5757643392578433631 @@ -1301,6 +1302,7 @@ MonoBehaviour: healthBar: {fileID: 5395886693158660034} lerpHealthBar: {fileID: 5922240361117749191} staminaBar: {fileID: 7844564006040590976} + armorBar: {fileID: 6132589471061893758} inventoryAction: {fileID: 4731022410478041803, guid: e0e9267cab824e8489fc27d83f1d07b7, type: 3} returnAction: {fileID: 7656137919724235468, guid: e0e9267cab824e8489fc27d83f1d07b7, @@ -2447,6 +2449,64 @@ MonoBehaviour: type: {class: GetNameFromGameobject, ns: BITKit, asm: BITKit} data: gameobject: {fileID: 8331712092059622214} +--- !u!1 &8370640250945598354 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 558287489211925558} + - component: {fileID: 6132589471061893758} + m_Layer: 0 + m_Name: armor-bar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &558287489211925558 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8370640250945598354} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1868127212333961775} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &6132589471061893758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8370640250945598354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: de67752b421e2a842b0407b2c6c524a9, type: 3} + m_Name: + m_EditorClassIdentifier: + document: {fileID: 5757643392578433631} + bindName: + bindNameProvider: + rid: 806583484692037740 + fillElementName: armor-fill + labelName: + onValueChanged: {fileID: 0} + references: + version: 2 + RefIds: + - rid: 806583484692037740 + type: {class: GetNameFromGameobject, ns: BITKit, asm: BITKit} + data: + gameobject: {fileID: 8370640250945598354} --- !u!1 &8400809357771810395 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Artists/Scenes/DMZ.unity b/Assets/Artists/Scenes/DMZ.unity index d247dcf97..0c9976bf0 100644 --- a/Assets/Artists/Scenes/DMZ.unity +++ b/Assets/Artists/Scenes/DMZ.unity @@ -1052,6 +1052,74 @@ Transform: type: 3} m_PrefabInstance: {fileID: 28938270} m_PrefabAsset: {fileID: 0} +--- !u!1001 &30348527 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.x + value: 25.716251 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.z + value: -33.839775 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616972, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_Name + value: BodyPlate (3) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, type: 3} --- !u!1001 &32962336 PrefabInstance: m_ObjectHideFlags: 0 @@ -31343,6 +31411,74 @@ MonoBehaviour: mr: {fileID: 685111305} mf: {fileID: 685111306} garbageCollectMesh: {fileID: 685111307} +--- !u!1001 &686680624 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.x + value: 25.216251 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.z + value: -33.839775 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616972, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_Name + value: BodyPlate (4) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, type: 3} --- !u!1 &692283813 GameObject: m_ObjectHideFlags: 0 @@ -32744,7 +32880,7 @@ PrefabInstance: - target: {fileID: 739209587135457973, guid: e5d265393747af741b4f5d719598831a, type: 3} propertyPath: m_RotationOffsets.Array.data[0].x - value: -89.96574 + value: -90 objectReference: {fileID: 0} - target: {fileID: 739209587135457973, guid: e5d265393747af741b4f5d719598831a, type: 3} @@ -33154,13 +33290,18 @@ PrefabInstance: - target: {fileID: 2809694002191985922, guid: e5d265393747af741b4f5d719598831a, type: 3} propertyPath: m_RotationOffsets.Array.data[0].x - value: -89.89721 + value: -89.90309 objectReference: {fileID: 0} - target: {fileID: 2809694002191985922, guid: e5d265393747af741b4f5d719598831a, type: 3} propertyPath: m_RotationOffsets.Array.data[0].z value: -179.89825 objectReference: {fileID: 0} + - target: {fileID: 2809694002191985922, guid: e5d265393747af741b4f5d719598831a, + type: 3} + propertyPath: m_TranslationOffsets.Array.data[0].x + value: 0.0033988953 + objectReference: {fileID: 0} - target: {fileID: 2809694002191985922, guid: e5d265393747af741b4f5d719598831a, type: 3} propertyPath: m_TranslationOffsets.Array.data[0].y @@ -33544,7 +33685,7 @@ PrefabInstance: - target: {fileID: 5718097820043900847, guid: e5d265393747af741b4f5d719598831a, type: 3} propertyPath: m_RotationOffsets.Array.data[0].x - value: -89.89165 + value: -89.90109 objectReference: {fileID: 0} - target: {fileID: 5718097820043900847, guid: e5d265393747af741b4f5d719598831a, type: 3} @@ -44302,6 +44443,89 @@ Transform: type: 3} m_PrefabInstance: {fileID: 949220219} m_PrefabAsset: {fileID: 0} +--- !u!1001 &949433032 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1536248110091890728, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.172 + objectReference: {fileID: 0} + - target: {fileID: 5208964436538694515, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: outlineColor.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5208964436538694515, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: outlineColor.g + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalPosition.x + value: 27.394081 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.038 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalPosition.z + value: -32.42076 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5208964437046230548, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_Name + value: Apple (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 373d78c28a8f6024cada3a296368b6c5, type: 3} --- !u!1001 &950274503 PrefabInstance: m_ObjectHideFlags: 0 @@ -63609,6 +63833,74 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1334132744} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1334337182 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.x + value: 24.716251 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.z + value: -33.839775 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616972, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_Name + value: BodyPlate (1) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, type: 3} --- !u!1001 &1336177132 PrefabInstance: m_ObjectHideFlags: 0 @@ -69176,6 +69468,84 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1472184089} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1480455762 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalPosition.x + value: 29.623095 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.02591765 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalPosition.z + value: -32.262943 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448401, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7886677396805448406, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: m_Name + value: Umbrella Variant (2) + objectReference: {fileID: 0} + - target: {fileID: 7886677397312935857, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: outlineColor.b + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7886677397312935857, guid: 1c5b3b0f90030a348ad16d547555b6ed, + type: 3} + propertyPath: outlineColor.g + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 1c5b3b0f90030a348ad16d547555b6ed, type: 3} --- !u!1001 &1483542332 PrefabInstance: m_ObjectHideFlags: 0 @@ -74924,6 +75294,74 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1616186940} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1617257321 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.x + value: 26.216251 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalPosition.z + value: -33.839775 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616971, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7714000239592616972, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, + type: 3} + propertyPath: m_Name + value: BodyPlate (2) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 3ffa8857b55c0e04dbeb91cf5b61e23b, type: 3} --- !u!1001 &1618439911 PrefabInstance: m_ObjectHideFlags: 0 @@ -75218,6 +75656,84 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 1620943956} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1621914032 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 2930903606784457974, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.172 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660810, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_Name + value: Watermelon (1) + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660810, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalPosition.x + value: 27.394081 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.038 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalPosition.z + value: -31.920761 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8481550541126660813, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 540d7e416264ed1488c1a1b64e19f56e, type: 3} --- !u!1001 &1622760213 PrefabInstance: m_ObjectHideFlags: 0 @@ -81508,6 +82024,11 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1536248110091890728, guid: 373d78c28a8f6024cada3a296368b6c5, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.172 + objectReference: {fileID: 0} - target: {fileID: 5208964437046230547, guid: 373d78c28a8f6024cada3a296368b6c5, type: 3} propertyPath: m_LocalPosition.x @@ -121424,6 +121945,11 @@ PrefabInstance: serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 2930903606784457974, guid: 540d7e416264ed1488c1a1b64e19f56e, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.172 + objectReference: {fileID: 0} - target: {fileID: 8481550541126660810, guid: 540d7e416264ed1488c1a1b64e19f56e, type: 3} propertyPath: m_Name @@ -121911,7 +122437,9 @@ SceneRoots: - {fileID: 1787197848} - {fileID: 251601144} - {fileID: 1776442869} + - {fileID: 949433032} - {fileID: 1355448914676904952} + - {fileID: 1621914032} - {fileID: 2061117673} - {fileID: 1680463853} - {fileID: 23874256} @@ -121920,6 +122448,7 @@ SceneRoots: - {fileID: 193844653} - {fileID: 958568602} - {fileID: 1114864136} + - {fileID: 1480455762} - {fileID: 965272799} - {fileID: 220718932} - {fileID: 1151063049} @@ -121935,3 +122464,7 @@ SceneRoots: - {fileID: 1135960255} - {fileID: 2102933269161101725} - {fileID: 2027464965219417001} + - {fileID: 1334337182} + - {fileID: 686680624} + - {fileID: 30348527} + - {fileID: 1617257321} diff --git a/Assets/Artists/Scripts/Entities/Armor/BITFALL.Entities.Armor.Runtime.asmdef b/Assets/Artists/Scripts/Entities/Armor/BITFALL.Entities.Armor.Runtime.asmdef new file mode 100644 index 000000000..9e58aaaa5 --- /dev/null +++ b/Assets/Artists/Scripts/Entities/Armor/BITFALL.Entities.Armor.Runtime.asmdef @@ -0,0 +1,26 @@ +{ + "name": "BITFALL.Entities.Armor.Runtime", + "rootNamespace": "", + "references": [ + "GUID:14fe60d984bf9f84eac55c6ea033a8f4", + "GUID:48ef04d98836e2640bf90b524bdff904", + "GUID:677cd05ca06c46b4395470200b1acdad", + "GUID:d525ad6bd40672747bde77962f1c401e", + "GUID:49b49c76ee64f6b41bf28ef951cb0e50", + "GUID:c0b9c98c59e49554c8f4ca6dc4998d79", + "GUID:709caf8d7fb6ef24bbba0ab9962a3ad0", + "GUID:7efac18f239530141802fb139776f333", + "GUID:30cdc242b1ac6a944a460f4ab0b77b88", + "GUID:84d565da37ad40546a118cfb3c3509f3", + "GUID:42a9827d94e00374aa52e51f0a1b035c" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Artists/Scripts/Entities/Armor/EntityArmor.cs b/Assets/Artists/Scripts/Entities/Armor/EntityArmor.cs new file mode 100644 index 000000000..3b5b5d387 --- /dev/null +++ b/Assets/Artists/Scripts/Entities/Armor/EntityArmor.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITFALL.Entities.Equipment; +using BITFALL.Entities.Inventory; +using BITFALL.Items.Armor; +using BITKit; +using BITKit.Entities; +using UnityEngine; + +namespace BITFALL.Entities.Armor +{ + [CustomType(typeof(IArmor))] + public class EntityArmor : EntityComponent,IArmor + { + private int _armor; + public int Armor + { + get => _armor; + set=>OnArmorChanged?.Invoke(_armor = value); + } + + public bool TryGetCurrentArmor(out IBasicItem item) + { + item = _currentArmor; + return _currentArmor is not null; + } + + public event Action OnArmorChanged; + public event Action OnEquipArmor; + public event Action OnUnEquipArmor; + + [Inject] private IHealth _health; + [Inject] private IPlayerEquipSelector _playerEquipSelector; + [Inject] private IEntityInventory _inventory; + [Inject] private IEntityEquipmentContainer _equipmentContainer; + + private IBasicItem _currentArmor; + + public override void OnAwake() + { + base.OnAwake(); + _health.OnDamage += OnDamage; + _inventory.OnUsed += OnUsed; + + _equipmentContainer.OnEquip += OnEquip; + _equipmentContainer.OnDeEquip += OnDeEquip; + + _playerEquipSelector.OnTryEquip += OnTryEquip; + } + + private bool OnTryEquip(IBasicItem arg) + { + if (arg is null) return true; + if (arg.GetAssetable().TryGetProperty(out _)) + { + if (_currentArmor is null) + { + return false; + } + + if (Armor == _currentArmor.GetAssetable().As().MaxArmor) + { + return false; + } + } + return true; + } + + private void OnDeEquip(IEquipmentSlot arg1, IBasicItem arg2) + { + if (arg1 is not EquipmentAsArmor) return; + _currentArmor = null; + OnUnEquipArmor?.Invoke(arg2); + } + + private void OnEquip(IEquipmentSlot arg1, IBasicItem arg2) + { + if (arg1 is not EquipmentAsArmor) return; + _currentArmor = arg2; + OnEquipArmor?.Invoke(arg2); + } + + private void OnUsed(IBasicItem obj) + { + if (_currentArmor?.GetAssetable() is not AssetableArmor assetableArmor) return; + if (obj.GetAssetable().TryGetProperty(out var addArmor)) + { + Armor = Mathf.Clamp(Armor + addArmor.Armor, 0, assetableArmor.MaxArmor); + } + } + private int OnDamage(DamageMessage arg1, int damage) + { + if (_currentArmor is null) return damage; + if (Armor is 0) return damage; + if (damage > Armor) + { + Armor = 0; + return damage-Armor; + } + Armor -= damage; + return 0; + } + } + +} diff --git a/Assets/Artists/Scripts/Entities/Core/EquipSelector/IPlayerEquipSelector.cs b/Assets/Artists/Scripts/Entities/Core/EquipSelector/IPlayerEquipSelector.cs index db1a9a32b..acd5f7bce 100644 --- a/Assets/Artists/Scripts/Entities/Core/EquipSelector/IPlayerEquipSelector.cs +++ b/Assets/Artists/Scripts/Entities/Core/EquipSelector/IPlayerEquipSelector.cs @@ -15,7 +15,9 @@ namespace BITFALL /// public interface IPlayerEquipSelector { + event Func OnTryEquip; event Action> OnUpdateEquip; bool TryDeEquip(IBasicItem item); + bool Cancel(); } } \ No newline at end of file diff --git a/Assets/Artists/Scripts/Entities/Core/Inventory/IEntityEquipContainer.cs b/Assets/Artists/Scripts/Entities/Core/Inventory/IEntityEquipContainer.cs new file mode 100644 index 000000000..f936f3983 --- /dev/null +++ b/Assets/Artists/Scripts/Entities/Core/Inventory/IEntityEquipContainer.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; +using UnityEngine; + +namespace BITFALL.Entities.Inventory +{ + +} \ No newline at end of file diff --git a/Assets/Artists/Scripts/Entities/EquipSelector/PlayerEquipSelector.cs b/Assets/Artists/Scripts/Entities/EquipSelector/PlayerEquipSelector.cs index 86f8b6667..2339b875b 100644 --- a/Assets/Artists/Scripts/Entities/EquipSelector/PlayerEquipSelector.cs +++ b/Assets/Artists/Scripts/Entities/EquipSelector/PlayerEquipSelector.cs @@ -26,6 +26,8 @@ namespace BITFALL.Entities.Equipment { [Header(Constant.Header.InternalVariables)] private readonly Dictionary equips=new(); + + public event Func OnTryEquip; public event Action> OnUpdateEquip; [Inject(true)] @@ -179,8 +181,13 @@ namespace BITFALL.Entities.Equipment switch (asset) { case var _ when asset.TryGetProperty(out _): + if (OnTryEquip?.CastAsFunc().Any(x => x.Invoke(value)) is false) return false; _equipment.EntryEquip(value); _improvisedService?.TryUnEquipImprovised(out _); + if (currentEquip is not null) + { + _cachedItem.Release(currentEquip); + } currentEquip = value; return true; } @@ -263,6 +270,18 @@ namespace BITFALL.Entities.Equipment return true; } + public bool Cancel() + { + if (currentEquip is null) return false; + if (_cachedItem.TryGetRelease(out var item)) + { + Equip(item); + return true; + } + Equip(null); + return false; + } + private void Equip(IBasicItem item) { _equipment.EntryEquip(item); diff --git a/Assets/Artists/Scripts/Entities/Equipment/BITFALL.Entities.Equipment.Runtime.asmdef b/Assets/Artists/Scripts/Entities/Equipment/BITFALL.Entities.Equipment.Runtime.asmdef index 66b3d70ed..8846abd3a 100644 --- a/Assets/Artists/Scripts/Entities/Equipment/BITFALL.Entities.Equipment.Runtime.asmdef +++ b/Assets/Artists/Scripts/Entities/Equipment/BITFALL.Entities.Equipment.Runtime.asmdef @@ -13,7 +13,9 @@ "GUID:d525ad6bd40672747bde77962f1c401e", "GUID:49b49c76ee64f6b41bf28ef951cb0e50", "GUID:d8b63aba1907145bea998dd612889d6b", - "GUID:30cdc242b1ac6a944a460f4ab0b77b88" + "GUID:30cdc242b1ac6a944a460f4ab0b77b88", + "GUID:7efac18f239530141802fb139776f333", + "GUID:ef0bb553b58b90b488bdbe8672e3be0b" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Artists/Scripts/Entities/Equipment/EntityEquipment.cs b/Assets/Artists/Scripts/Entities/Equipment/EntityEquipment.cs index b64d922d9..0e97f8cd6 100644 --- a/Assets/Artists/Scripts/Entities/Equipment/EntityEquipment.cs +++ b/Assets/Artists/Scripts/Entities/Equipment/EntityEquipment.cs @@ -36,14 +36,15 @@ namespace BITKit.Entities allowGlobalActivation = true }; protected readonly ValidHandle AllowRendering = new(); - public virtual string AddressablePath => throw new System.NotImplementedException(); + public virtual string AddressablePath => item.AddressablePath; protected virtual Vector3 meleeForce => Transform.forward; public bool IsEntered { get; set; } public virtual void Entry() { AllowRendering.AddElement(this); - inputActionGroup.allowInput.AddElement(this); + animator.animator.enabled = true; + animator.animator.Update(0); } public virtual UniTask EntryAsync() { @@ -52,7 +53,7 @@ namespace BITKit.Entities public virtual void Exit() { - inputActionGroup.allowInput.AddElement(this); + inputActionGroup.allowInput.RemoveElement(this); } public virtual UniTask ExitAsync() { @@ -61,8 +62,13 @@ namespace BITKit.Entities } public virtual void OnAwake() { - AllowRendering.AddListener(x=>renderers.ForEach(y=>y.enabled = x)); + AllowRendering.AddListener(x=>renderers.ForEach(y=> + { + y.enabled = x; + animator.animator.enabled = x; + })); AllowRendering.Invoke(); + Initialize(); } diff --git a/Assets/Artists/Scripts/Entities/Equipment/EntityEquipmentContainer.cs b/Assets/Artists/Scripts/Entities/Equipment/EntityEquipmentContainer.cs new file mode 100644 index 000000000..3979fde41 --- /dev/null +++ b/Assets/Artists/Scripts/Entities/Equipment/EntityEquipmentContainer.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using BITFALL.Entities.Equipment; +using BITFALL.Player.Inventory; +using UnityEngine; +using BITKit; +using BITKit.Entities; + +namespace BITFALL +{ + + /// + /// 玩家装备容器 + /// 支持,护甲,头盔和背包等 + /// + [CustomType(typeof(IEntityEquipmentContainer))] + public class EntityEquipmentContainer : EntityComponent, IEntityEquipmentContainer + { + private readonly Dictionary dictionary = new(); + [Inject] + private IBasicItemContainer inventory; + public override void OnAwake() + { + var health = entity.Get(); + health.OnSetAlive += OnSetAlive; + } + + private void OnSetAlive(bool obj) + { + if (obj) return; + foreach (var x in dictionary.ToArray()) + { + OnDeEquip?.Invoke(x.Key, x.Value); + inventory.Add(x.Value); + } + dictionary.Clear(); + } + + public override void OnStart() + { + base.OnStart(); + inventory = entity.Get(); + var playerInventory = entity.Get(); + playerInventory.OnUseItem += TryExecute; + } + + public Action OnEquip { get; set; } + public Action OnDeEquip { get; set; } + + public bool TryDeEquip(T slot) where T : IEquipmentSlot + { + if (!dictionary.TryGetValue(slot, out var equipable)) return false; + if (inventory.Add(equipable)) + { + DeEquip(slot, equipable); + } + return false; + } + private bool Equip(IEquipmentSlot slot, IBasicItem item) + { + dictionary.Add(slot, item); + OnEquip?.Invoke(slot, item); + return true; + } + private bool DeEquip(IEquipmentSlot slot, IBasicItem item) + { + dictionary.Remove(slot); + OnDeEquip?.Invoke(slot, item); + return true; + } + public int Priority => 0; + + public bool TryExecute(IBasicItem value) + { + var asset = value.GetAssetable(); + //尝试获取可装备信息 + if (!asset.TryGetProperty(out var equipable)) return false; + //已装备物品 + if (dictionary.TryGetValue(equipable.slot, out var equipedItem)) + { + //尝试将装配放回背包 + if (inventory.Add(equipedItem)) + { + //移除已装备物品 + DeEquip(equipable.slot, value); + } + } + //从库存中移除物品 + if (inventory.Remove(value)) + { + //装配物品 + Equip(equipable.slot, value); + } + return false; + } + } +} diff --git a/Assets/Artists/Scripts/Entities/Inventory/EntityInventory.cs b/Assets/Artists/Scripts/Entities/Inventory/EntityInventory.cs index c7194723e..72f23c95d 100644 --- a/Assets/Artists/Scripts/Entities/Inventory/EntityInventory.cs +++ b/Assets/Artists/Scripts/Entities/Inventory/EntityInventory.cs @@ -64,7 +64,7 @@ namespace BITFALL public override void OnAwake() { _health.OnSetAlive += OnSetAlive; - } + } private void OnSetAlive(bool alive) { if (alive) return; diff --git a/Assets/Artists/Scripts/Entities/Inventory/InventoryWeightable.cs b/Assets/Artists/Scripts/Entities/Inventory/InventoryWeightable.cs index 5b0d2911b..951d1ab63 100644 --- a/Assets/Artists/Scripts/Entities/Inventory/InventoryWeightable.cs +++ b/Assets/Artists/Scripts/Entities/Inventory/InventoryWeightable.cs @@ -1,4 +1,5 @@ using System; +using BITFALL.Entities.Equipment; using UnityEngine; using BITKit; using BITKit.Entities; @@ -27,7 +28,7 @@ namespace BITFALL container.OnUsed += OnRemove; container.OnRemove += OnRemove; - var playerEquipContainer = entity.Get(); + var playerEquipContainer = entity.Get(); playerEquipContainer.OnEquip += OnEquip; playerEquipContainer.OnDeEquip += DeEquip; } diff --git a/Assets/Artists/Scripts/Entities/Inventory/PlayerEquipContainer.cs b/Assets/Artists/Scripts/Entities/Inventory/PlayerEquipContainer.cs index 2ce281ed8..bc1d0ed01 100644 --- a/Assets/Artists/Scripts/Entities/Inventory/PlayerEquipContainer.cs +++ b/Assets/Artists/Scripts/Entities/Inventory/PlayerEquipContainer.cs @@ -9,11 +9,7 @@ using BITKit.Entities; namespace BITFALL { - public interface IPlayerEquipContainer { - Action OnEquip { get; set; } - Action OnDeEquip { get; set; } - bool TryDeEquip(T slot=default) where T : IEquipmentSlot; - } + /// /// 玩家装备容器 /// 支持,护甲,头盔和背包等 diff --git a/Assets/Artists/Scripts/Entities/Skins/EntityPropsDisplay.cs b/Assets/Artists/Scripts/Entities/Skins/EntityPropsDisplay.cs index 8d3e51702..9b6e9f654 100644 --- a/Assets/Artists/Scripts/Entities/Skins/EntityPropsDisplay.cs +++ b/Assets/Artists/Scripts/Entities/Skins/EntityPropsDisplay.cs @@ -14,7 +14,7 @@ namespace BITFALL [SerializeField] private SerializedDictionary equipDictionary = new(); [Inject] private IEntityEquipment _entityEquipment; - [Inject] private IPlayerEquipContainer _playerEquipContainer; + [Inject] private IEntityEquipmentContainer _playerEquipContainer; [Inject] private IPlayerEquipSelector _playerEquipSelector; public override void OnStart() diff --git a/Assets/Artists/Scripts/Equip/BITFALL.Equip.asmdef b/Assets/Artists/Scripts/Equip/BITFALL.Equip.asmdef index c68ccbf7a..84309350f 100644 --- a/Assets/Artists/Scripts/Equip/BITFALL.Equip.asmdef +++ b/Assets/Artists/Scripts/Equip/BITFALL.Equip.asmdef @@ -25,7 +25,8 @@ "GUID:f51ebe6a0ceec4240a699833d6309b23", "GUID:42a9827d94e00374aa52e51f0a1b035c", "GUID:87bea3a21c744b1478660b70494160ba", - "GUID:ef0bb553b58b90b488bdbe8672e3be0b" + "GUID:ef0bb553b58b90b488bdbe8672e3be0b", + "GUID:48ef04d98836e2640bf90b524bdff904" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Artists/Scripts/Equip/BITGun.cs b/Assets/Artists/Scripts/Equip/BITGun.cs index 11ae8f596..0fa6302ed 100644 --- a/Assets/Artists/Scripts/Equip/BITGun.cs +++ b/Assets/Artists/Scripts/Equip/BITGun.cs @@ -163,7 +163,6 @@ namespace BITFALL.Guns isHolstered = false; var animName = animator.animator.GetCurrentAnimatorStateInfo(0).shortNameHash; - animator.animator.enabled = true; animator.animator.Play(animName,-1,0); inputActionGroup.allowInput.AddElement(this); expectFiring.Reset(); @@ -200,7 +199,6 @@ namespace BITFALL.Guns } destroyCancellationToken.ThrowIfCancellationRequested(); - animator.animator.enabled = false; await base.ExitAsync(); } diff --git a/Assets/Artists/Scripts/Equip/UniversalUseController.cs b/Assets/Artists/Scripts/Equip/UniversalUseController.cs index eb2c7a0e8..a81c28e3e 100644 --- a/Assets/Artists/Scripts/Equip/UniversalUseController.cs +++ b/Assets/Artists/Scripts/Equip/UniversalUseController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using BITFALL.Entities.Equipment.Melee; using BITFALL.Entities.Equipment.Universal.States; +using BITFALL.Entities.Inventory; using BITFALL.Player.Inventory; using BITKit; using BITKit.Entities; @@ -13,14 +14,18 @@ using Draw = BITFALL.Entities.Equipment.Universal.States.Draw; namespace BITFALL.Entities.Equipment.Universal { - public interface IUseState:IState{} + public interface IUseState : IState + { + } + public abstract class UseState : IUseState { [SerializeField] protected UniversalUseController useController; public virtual bool Enabled { get; set; } + public virtual void Initialize() { - + } public virtual void OnStateEntry(IState old) @@ -38,14 +43,48 @@ namespace BITFALL.Entities.Equipment.Universal public class UniversalUseController : BITEquipBase { - [SerializeField] private IAssetableItem[] supportedItems; - - public override bool IsSupportItem(IBasicItem _item) + [Inject] private IPlayerInventory _playerInventory; + [Inject] private IEntityInventory _inventory; + [Inject] private IPlayerEquipSelector _playerEquipSelector; + public bool IClosed { get; set; } + public override void OnAwake() { - return _item is not null && supportedItems.Any(x=>x.AddressablePath == _item.AddressablePath); + base.OnAwake(); + animator[0].onStateEnter += (x) => + { + if (IsEntered is false) return; + switch (x) + { + case BITConstant.Player.Draw: + TransitionState(); + break; + case BITConstant.Player.Use: + TransitionState(); + break; + case BITConstant.Player.Exit: + TransitionState(); + break; + } + }; + animator[0].onStateExit += x => + { + if (IsEntered is false) return; + switch (x) + { + case BITConstant.Player.Exit: + IClosed = true; + if (IsEntered) + { + _playerEquipSelector.Cancel(); + } + break; + } + }; } + public override void Entry() { + IClosed = false; base.Entry(); TransitionState(); } @@ -58,20 +97,37 @@ namespace BITFALL.Entities.Equipment.Universal public override async UniTask ExitAsync() { - await base.ExitAsync(); - while (destroyCancellationToken.IsCancellationRequested is false) { - if (animator[0].stateName == BITConstant.Player.Exit && animator[0].currentState.normalizedTime > 1) + if (IClosed) { break; } + if (destroyCancellationToken.IsCancellationRequested) { break; } + await UniTask.NextFrame(); } + + await base.ExitAsync(); + } + + public override void AnimationEvent(string eventName) + { + base.AnimationEvent(eventName); + + switch (eventName) + { + case BITConstant.Player.Use when CurrentState is Use: + if (_inventory.UseItem(Item)) + { + + } + break; + } } } } \ No newline at end of file diff --git a/Assets/Artists/Scripts/Equip/UniversalUseControllerState.cs b/Assets/Artists/Scripts/Equip/UniversalUseControllerState.cs index 1f3e16769..4ceeaef22 100644 --- a/Assets/Artists/Scripts/Equip/UniversalUseControllerState.cs +++ b/Assets/Artists/Scripts/Equip/UniversalUseControllerState.cs @@ -1,29 +1,23 @@ +using System; using System.Collections; using System.Collections.Generic; +using BITKit.StateMachine; using UnityEngine; namespace BITFALL.Entities.Equipment.Universal.States { + [Serializable] public sealed class Draw:UseState { - public override void Initialize() - { - base.Initialize(); - useController.animator[0].onStateExit += (x) => - { - if (Enabled && x is BITConstant.Player.Draw) - { - useController.TransitionState(); - } - }; - } + } + [Serializable] public sealed class Use:UseState { - + } + [Serializable] public sealed class Exit:UseState { - } } diff --git a/Assets/Artists/Scripts/Item/AssetableArmor.cs b/Assets/Artists/Scripts/Item/AssetableArmor.cs new file mode 100644 index 000000000..b635ef8d6 --- /dev/null +++ b/Assets/Artists/Scripts/Item/AssetableArmor.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; +using UnityEngine; + +namespace BITFALL.Items.Armor +{ + [Serializable] + public struct AddArmor:IProperty + { + public int Armor; + } + public class AssetableArmor : AssetableItem + { + [Header(nameof(AssetableArmor))] + [SerializeField] private int maxArmor; + + public int MaxArmor=>maxArmor; + } + +} diff --git a/Assets/Artists/Scripts/UX/BITFALL.UX.asmdef b/Assets/Artists/Scripts/UX/BITFALL.UX.asmdef index 7e6ad1737..b54ba9b0d 100644 --- a/Assets/Artists/Scripts/UX/BITFALL.UX.asmdef +++ b/Assets/Artists/Scripts/UX/BITFALL.UX.asmdef @@ -27,7 +27,8 @@ "GUID:96f476e982d6fb945bfc9140ba094b7f", "GUID:ef0bb553b58b90b488bdbe8672e3be0b", "GUID:045a42f233e479d41adc32d02b99631e", - "GUID:1235ca61e7f433b408ed5a68767e7123" + "GUID:1235ca61e7f433b408ed5a68767e7123", + "GUID:c0b9c98c59e49554c8f4ca6dc4998d79" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Artists/Scripts/UX/UXHud.cs b/Assets/Artists/Scripts/UX/UXHud.cs index a4a3a6893..f2d26dc20 100644 --- a/Assets/Artists/Scripts/UX/UXHud.cs +++ b/Assets/Artists/Scripts/UX/UXHud.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using BITFALL.Entities.Armor; using BITFALL.Player.Equip; using BITFALL.Player.Movement; using UnityEngine; @@ -34,6 +35,7 @@ namespace BITFALL.UX [SerializeField] private UXBar healthBar; [SerializeField] private UXBar lerpHealthBar; [SerializeField] private UXBar staminaBar; + [SerializeField] private UXBar armorBar; [Header(Constant.Header.Input)] public InputActionReference inventoryAction; @@ -50,6 +52,8 @@ namespace BITFALL.UX private IEquipService _equipService; [Inject] private ISelector _selector; + [Inject] + private IArmor _armor; private float _currentHealthLerp; protected override void Awake() { @@ -99,6 +103,14 @@ namespace BITFALL.UX _selector.OnInactive += OnInactive; _selector.OnSelected += OnSelect; + _armor.OnArmorChanged += x => armorBar.Set(x); + _armor.OnEquipArmor += x => + { + armorBar.Set(_armor.Armor); + armorBar.SetActive(true); + }; + _armor.OnUnEquipArmor += x => armorBar.SetActive(false); + if (steamService.IsInitialized) { playerNameLabel.Set(steamService.Name); @@ -108,6 +120,8 @@ namespace BITFALL.UX _equipService = entity.Get(); + armorBar.SetActive(_armor.TryGetCurrentArmor(out _)); + OnSetHP(_health.HealthPoint); OnSetAlive(_health.IsAlive); diff --git a/Assets/Artists/Scripts/UX/UXInventory.cs b/Assets/Artists/Scripts/UX/UXInventory.cs index b0bfdcbb7..916371709 100644 --- a/Assets/Artists/Scripts/UX/UXInventory.cs +++ b/Assets/Artists/Scripts/UX/UXInventory.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using BITFALL.Entities.Equipment; using BITFALL.Player.Inventory; using UnityEngine; using UnityEngine.UIElements; @@ -36,7 +37,7 @@ namespace BITFALL.UX [Inject] private IPlayerInventory _playerInventory; [Inject] - private IPlayerEquipContainer equipContainer; + private IEntityEquipmentContainer equipContainer; private IEntity _entity; protected override async void Awake() { @@ -73,26 +74,36 @@ namespace BITFALL.UX { base.OnEnable(); playerService.OnPlayerInitialized += OnPlayerInitializedLocalPlayer; + playerService.OnPlayerDisposed += OnPlayerDisposed; } + + private void OnPlayerDisposed(Entity obj) + { + inventory = null; + equipContainer = null; + _playerInventory = null; + } + protected override void OnDisable() { base.OnDisable(); + playerService.OnPlayerDisposed -= OnPlayerDisposed; playerService.OnPlayerInitialized -= OnPlayerInitializedLocalPlayer; } private void OnPlayerInitializedLocalPlayer(IEntity entity) { + entity.Inject(this); itemContainers.Clear(); equipContainers.Clear(); builder.Clear(); var weighted = entity.Get(); + weighted.OnWeighted += OnWeighted; - equipContainer = entity.Get(); equipContainer.OnEquip += OnEquip; equipContainer.OnDeEquip += DeEquip; - inventory = entity.Get(); inventory.OnAdd += OnAdd; inventory.OnRemove += OnRemove; diff --git a/Assets/Artists/UX/HUD.uxml b/Assets/Artists/UX/HUD.uxml index d76a5c856..2e38425d0 100644 --- a/Assets/Artists/UX/HUD.uxml +++ b/Assets/Artists/UX/HUD.uxml @@ -34,13 +34,15 @@ - + - + + + diff --git a/Assets/BITFALL/BITConstant.cs b/Assets/BITFALL/BITConstant.cs index f94ee41d3..1a499a5ea 100644 --- a/Assets/BITFALL/BITConstant.cs +++ b/Assets/BITFALL/BITConstant.cs @@ -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); diff --git a/Assets/BITFALL/Entities/Armor/BITFALL.Entities.Armor.asmdef b/Assets/BITFALL/Entities/Armor/BITFALL.Entities.Armor.asmdef new file mode 100644 index 000000000..d51a8b747 --- /dev/null +++ b/Assets/BITFALL/Entities/Armor/BITFALL.Entities.Armor.asmdef @@ -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 +} \ No newline at end of file diff --git a/Assets/BITFALL/Entities/Armor/IArmor.cs b/Assets/BITFALL/Entities/Armor/IArmor.cs new file mode 100644 index 000000000..f4686bba3 --- /dev/null +++ b/Assets/BITFALL/Entities/Armor/IArmor.cs @@ -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 OnArmorChanged; + event Action OnEquipArmor; + event Action OnUnEquipArmor; + } +} diff --git a/Assets/Artists/Scripts/Entities/Equipment/Core/BITFALL.Entities.Equipment.asmdef b/Assets/BITFALL/Entities/Equipment/BITFALL.Entities.Equipment.asmdef similarity index 100% rename from Assets/Artists/Scripts/Entities/Equipment/Core/BITFALL.Entities.Equipment.asmdef rename to Assets/BITFALL/Entities/Equipment/BITFALL.Entities.Equipment.asmdef diff --git a/Assets/Artists/Scripts/Entities/Equipment/Core/EquipmentAsArms.cs b/Assets/BITFALL/Entities/Equipment/EquipmentAsArms.cs similarity index 100% rename from Assets/Artists/Scripts/Entities/Equipment/Core/EquipmentAsArms.cs rename to Assets/BITFALL/Entities/Equipment/EquipmentAsArms.cs diff --git a/Assets/Artists/Scripts/Entities/Equipment/Core/EquipmentAsSlot.cs b/Assets/BITFALL/Entities/Equipment/EquipmentAsSlot.cs similarity index 100% rename from Assets/Artists/Scripts/Entities/Equipment/Core/EquipmentAsSlot.cs rename to Assets/BITFALL/Entities/Equipment/EquipmentAsSlot.cs diff --git a/Assets/Artists/Scripts/Entities/Equipment/Core/IEntityEquipment.cs b/Assets/BITFALL/Entities/Equipment/IEntityEquipment.cs similarity index 100% rename from Assets/Artists/Scripts/Entities/Equipment/Core/IEntityEquipment.cs rename to Assets/BITFALL/Entities/Equipment/IEntityEquipment.cs diff --git a/Assets/BITFALL/Entities/Equipment/IEntityEquipmentContainer.cs b/Assets/BITFALL/Entities/Equipment/IEntityEquipmentContainer.cs new file mode 100644 index 000000000..b45d484ef --- /dev/null +++ b/Assets/BITFALL/Entities/Equipment/IEntityEquipmentContainer.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using BITKit; + +namespace BITFALL.Entities.Equipment +{ + public interface IEntityEquipmentContainer + { + Action OnEquip { get; set; } + Action OnDeEquip { get; set; } + bool TryDeEquip(T slot=default) where T : IEquipmentSlot; + } +} diff --git a/Assets/BITKit/Core/Mathematics/MathO.cs b/Assets/BITKit/Core/Mathematics/MathO.cs index 56c85135d..9d1bbc05b 100644 --- a/Assets/BITKit/Core/Mathematics/MathO.cs +++ b/Assets/BITKit/Core/Mathematics/MathO.cs @@ -4,6 +4,6 @@ namespace BITKit { public static class MathO { - + public static T As(this object self) where T : class => self as T; } } \ No newline at end of file diff --git a/Assets/BITKit/Unity/Scripts/Entity/Core/Entity.cs b/Assets/BITKit/Unity/Scripts/Entity/Core/Entity.cs index 90c9c46b9..a26af2554 100644 --- a/Assets/BITKit/Unity/Scripts/Entity/Core/Entity.cs +++ b/Assets/BITKit/Unity/Scripts/Entity/Core/Entity.cs @@ -44,6 +44,10 @@ namespace BITKit.Entities { case null: break; + case Core.Entites.IEntityComponent entityComponent: + if(entityComponent.Entity.Id == Id) + continue; + break; case MonoBehaviour { destroyCancellationToken: { IsCancellationRequested: false } }: continue; case not null: