Compare commits
No commits in common. "b228433eaac2e218d41c0825334c6f5cd45dc27b" and "84cf78921f5ec1df96591480f58dd6f8b2436a76" have entirely different histories.
b228433eaa
...
84cf78921f
|
@ -376,8 +376,6 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bloodRegen: 1
|
||||
regen: 1000
|
||||
onlyCallZeroHealthOnce: 1
|
||||
maxHealth: 100
|
||||
damageTickDelay: 0.25
|
||||
|
|
|
@ -292,8 +292,6 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 1fdfc885f1a69704b893825cf9e616ba, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
bloodRegen: 1
|
||||
regen: 1000
|
||||
onlyCallZeroHealthOnce: 1
|
||||
maxHealth: 100
|
||||
damageTickDelay: 0.25
|
||||
|
|
|
@ -1330,81 +1330,6 @@ SpriteRenderer:
|
|||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1230350817
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1230350818}
|
||||
- component: {fileID: 1230350820}
|
||||
- component: {fileID: 1230350819}
|
||||
m_Layer: 5
|
||||
m_Name: PausePanel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1230350818
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1230350817}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.7, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 4158834148864819268}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1230350819
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1230350817}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!222 &1230350820
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1230350817}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1001 &1232208432
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1626,17 +1551,6 @@ GameObject:
|
|||
m_CorrespondingSourceObject: {fileID: 3120938410244321186, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
||||
m_PrefabInstance: {fileID: 1232208432}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1254139639 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 1449424410418603396, guid: 99a6ff8b9591949439b620b13bd249a4, type: 3}
|
||||
m_PrefabInstance: {fileID: 1232208432}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1254139629}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1282889729
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3477,17 +3391,6 @@ GameObject:
|
|||
m_CorrespondingSourceObject: {fileID: 3120938410244321186, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||
m_PrefabInstance: {fileID: 869964773}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1579580574 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 7729933180365677331, guid: 30e0cc55a67f02d4f92b2677ec4b1511, type: 3}
|
||||
m_PrefabInstance: {fileID: 869964773}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1579580564}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 6b097a132c072b72fbc7808ebf263e52, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1600052931
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -8809,9 +8712,6 @@ PrefabInstance:
|
|||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1230350818}
|
||||
- targetCorrespondingSourceObject: {fileID: 2603779566095873902, guid: 48e0e53445d42474895d37a321c39d1c, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1375820097}
|
||||
|
@ -8842,7 +8742,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 3c20bad5f6ef76d429d398dfba893d40, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
pauseMenuUI: {fileID: 1230350817}
|
||||
pauseMenuUI: {fileID: 0}
|
||||
--- !u!1001 &4910321061857220295
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -9121,14 +9021,6 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: Blood
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4056614590725156132, guid: a99c6b890ab711f4faebdfd6335c5f16, type: 3}
|
||||
propertyPath: mop1
|
||||
value:
|
||||
objectReference: {fileID: 1254139639}
|
||||
- target: {fileID: 4056614590725156132, guid: a99c6b890ab711f4faebdfd6335c5f16, type: 3}
|
||||
propertyPath: mop2
|
||||
value:
|
||||
objectReference: {fileID: 1579580574}
|
||||
- target: {fileID: 4056614590725156132, guid: a99c6b890ab711f4faebdfd6335c5f16, type: 3}
|
||||
propertyPath: RumbleAmount
|
||||
value: 100
|
||||
|
|
|
@ -52,8 +52,8 @@ public class BloodComputeShader : MonoBehaviour
|
|||
|
||||
AsyncGPUReadbackRequest freeBloodReadRequest;
|
||||
|
||||
public Mop mop1;
|
||||
public Mop mop2;
|
||||
Mop mop1;
|
||||
Mop mop2;
|
||||
|
||||
public float CleanRadius = 2f;
|
||||
|
||||
|
@ -71,6 +71,11 @@ public class BloodComputeShader : MonoBehaviour
|
|||
}
|
||||
void Start()
|
||||
{
|
||||
var mops = FindObjectsByType<Mop>(FindObjectsSortMode.None);
|
||||
|
||||
mop1 = mops[0];
|
||||
mop2 = mops[1];
|
||||
|
||||
ComputeHelper.CreateStructuredBuffer<Droplet>(ref particleBuffer, numParticles);
|
||||
ComputeHelper.CreateStructuredBuffer<Vector4>(ref positionBuffer, numParticles);
|
||||
|
||||
|
|
|
@ -7,9 +7,6 @@ using System.Collections;
|
|||
|
||||
public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
||||
{
|
||||
public bool bloodRegen = false;
|
||||
public float regen = 1000;
|
||||
|
||||
[SerializeField] private bool onlyCallZeroHealthOnce = true;
|
||||
[SerializeField] float maxHealth = 100;
|
||||
|
||||
|
@ -83,14 +80,6 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
|||
|
||||
void Update()
|
||||
{
|
||||
// blod regen
|
||||
if (bloodRegen)
|
||||
{
|
||||
PlayerInput playerInput = GetComponent<PlayerInput>();
|
||||
float bloodAccumalted = playerInput.PlayerNum == 0 ? BloodComputeShader.Instance.mop1Clean : BloodComputeShader.Instance.mop2Clean;
|
||||
TakeDamage(-bloodAccumalted / regen);
|
||||
}
|
||||
|
||||
if (currentDamageTick < Time.time)
|
||||
{
|
||||
if (accumulatedDamageInTick < 1f) return;
|
||||
|
@ -114,10 +103,7 @@ public class HealthComponent : MonoBehaviour, ISquezeDamageReceiver
|
|||
|
||||
public void TakeDamage(float damage)
|
||||
{
|
||||
if (damage == 0f) return;
|
||||
|
||||
currentHealth -= damage;
|
||||
currentHealth = Mathf.Clamp(currentHealth, 0f, getMaxHealth());
|
||||
OnHealthChange?.Invoke(currentHealth + damage, currentHealth);
|
||||
|
||||
accumulatedDamageInTick += damage;
|
||||
|
|
Loading…
Reference in New Issue