Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GraphicEdit committed Jan 11, 2024
1 parent f62d1f0 commit e84b2d4
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 372 deletions.
27 changes: 5 additions & 22 deletions DarkFlow/Assets/Scenes/systemTest.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.18028378, g: 0.22571412, b: 0.30692285, a: 1}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -628,7 +628,6 @@ GameObject:
- component: {fileID: 518869417}
- component: {fileID: 518869416}
- component: {fileID: 518869415}
- component: {fileID: 518869413}
- component: {fileID: 518869414}
- component: {fileID: 518869420}
m_Layer: 0
Expand All @@ -638,26 +637,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &518869413
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 518869412}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 2367159778
AlwaysReplicateAsRoot: 0
SynchronizeTransform: 1
ActiveSceneSynchronization: 0
SceneMigrationSynchronization: 1
SpawnWithObservers: 1
DontDestroyWithOwner: 0
AutoObjectParentSync: 1
--- !u!114 &518869414
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1316,6 +1295,8 @@ MonoBehaviour:
weaponAudioSource: {fileID: 1918339079}
weaponSounds: []
weaponCostQuint: 0
smg1AmmoCount: 30
smg1RoundDamage: 10
--- !u!65 &1029546733
BoxCollider:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2116,6 +2097,8 @@ MonoBehaviour:
weaponAudioSource: {fileID: 1490458851}
weaponSounds: []
weaponCostQuint: 0
smg1AmmoCount: 30
smg1RoundDamage: 10
--- !u!114 &1448541920
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down
7 changes: 5 additions & 2 deletions DarkFlow/Assets/Scripts/AI/NPC_enemy1/EnemyHealth.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using UnityEngine;

// Create a ScriptableObject that represents the health of an enemy.
[CreateAssetMenu(fileName = "EnemyHealth", menuName = "ScriptableObjects/EnemyHealth", order = 1)]
[CreateAssetMenu(fileName = "EnemyHealth", menuName = "Health/EnemyHealth", order = 1)]
public class EnemyHealth : ScriptableObject
{
public int maxHealth = 5; // Health points, as per our requirement
public int currentHealth;
public GameObject Prefab;

//public GameObject IntroPrefab => Prefab;

// Call this method to initialize the health when you spawn the enemy.
public void OnEnable()
Expand All @@ -16,7 +19,7 @@ public void OnEnable()
public void TakeDamage(int damage)
{
currentHealth -= damage;

if (currentHealth <= 0)
{
Die();
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e84b2d4

Please sign in to comment.