started adding enemy factory

This commit is contained in:
Mausham
2025-12-31 17:14:20 -08:00
parent 3aabc42bf8
commit 8eafd8bb60
130 changed files with 49524 additions and 46086 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1095c90869cd18542ac49ca3066a5183
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
using UnityEngine;
namespace Darkmatter.Core
{
public interface IEnemyAnimController
{
public void PlayWalkAnim(bool value);
public void PlayAttackAnim(bool value);
public void PlayeChaseAnim(bool value);
public void PlayDeadAnim();
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 068407f730880e34e9512e0a7b6aa189

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
namespace Darkmatter.Core
{
public interface IEnemyPawn : IDamageable
{
void InitializeFromFactory();
bool isDead { get; }
NavMeshAgent EnemyAI { get; }
List<Transform> PatrolPoints { get; }
void SetDestination(Vector3 destination);
Vector3 ReturnMyPos();
Transform PlayerTarget { get; }
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8c4304330c3f4494b80013796f6dcf30

View File

@@ -1,9 +1,12 @@
using UnityEngine;
using System;
namespace Darkmatter.Core
{
public interface IDamageable
{
event Action<float> OnHealthDecreased;
float Health { get; set; }
void TakeDamage(float damage);
void Die();
}

View File

@@ -5,6 +5,5 @@ namespace Darkmatter.Core
public interface IHumonoidAnim
{
void PlayJumpAnim();
void PlayMovementAnim(Vector2 velocity);
}
}

View File

@@ -5,6 +5,7 @@ namespace Darkmatter.Core
{
public interface IPlayerAnim : IHumonoidAnim
{
public void PlayMovementAnim(Vector2 velocity);
public void PlayReloadAnim(IReloadableWeapon reloadableWeapon);
void PlayShootAnim();
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 53dde7197a1c44e4281d4edeac45e2d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8b8a5c204ef7f8e4f9079e6e8e28d1a8, type: 3}
m_Name: EnemyConfigSO
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.EnemyConfigSO
walkSpeed: 1
chaseSpeed: 2
visionRange: 15
attackRange: 2

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1e02b1a664706154ead0ba098a00c234
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using UnityEngine;
namespace Darkmatter.Core
{
[CreateAssetMenu(fileName = "EnemyConfigSO", menuName = "Scriptable Objects/EnemyConfigSO")]
public class EnemyConfigSO : ScriptableObject
{
[Header("Enemy Data")]
public float walkSpeed = 3f;
public float chaseSpeed = 5f;
public float visionRange = 15f;
public float attackRange = 2f;
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 8b8a5c204ef7f8e4f9079e6e8e28d1a8

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eb71c28b0ae2ddd4f97052a36e8aa420
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
using UnityEngine;
namespace Darkmatter.Core
{
public interface IEnemyFactory
{
IEnemyPawn GetEnemy(ZombieType type);
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3089e498135722943b5e535be3721398

View File

@@ -0,0 +1,10 @@
using UnityEngine;
namespace Darkmatter.Core
{
public enum ZombieType
{
Fat,
slim
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 03bd7b15fdefdfb4abf373fa10450700