added main menu

This commit is contained in:
Mausham
2026-01-02 18:05:30 -08:00
parent ff6f5e5865
commit dcf3bead16
380 changed files with 76702 additions and 14 deletions

View File

@@ -13,5 +13,5 @@ MonoBehaviour:
m_Name: CameraConfigSO
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.CameraConfigSO
lookSensitivity: 10
topClampAngle: 50
bottomClampAngle: -30
topClampAngle: 80
bottomClampAngle: -50

View File

@@ -14,5 +14,5 @@ MonoBehaviour:
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.EnemyConfigSO
walkSpeed: 1
chaseSpeed: 2
visionRange: 30
visionRange: 40
attackRange: 3

View File

@@ -45,6 +45,7 @@ namespace Darkmatter.Domain
public void Die()
{
if (enemyPawn.isDead) return;
enemyAnimController.PlayDeadAnim();
audioService.PlaySFXAt(AudioId.Zombie_Death,enemyPawn.ReturnMyPos());
enemyPawn.Die();

View File

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

View File

@@ -0,0 +1,13 @@
using UnityEngine;
using UnityEngine.SceneManagement;
namespace Darkmatter.Presentation
{
public class MenuScreen : MonoBehaviour
{
public void OnPlayBtnClick()
{
SceneManager.LoadScene(1);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1f9f29400af628d418161d7091f4ecc3

View File

@@ -11,6 +11,7 @@ namespace Darkmatter.Presentation
[Header("VFX")]
public ParticleSystem MuzzleFlashParticle;
public ParticleSystem BulletHitEffectParticle;
public ParticleSystem ZombieHitEffectParticle;
[Header("Weapon Data")]
public float fireRate = 0.1f;
@@ -44,17 +45,24 @@ namespace Darkmatter.Presentation
{
var damageable = hitPoint.transform.GetComponent<IDamageable>();
Debug.Log(hitPoint.transform);
Vector3 particleSpawnPos = hitPoint.point + hitPoint.normal * 0.01f;
Quaternion ParticleRotation = Quaternion.LookRotation(hitPoint.normal);
if (damageable != null)
{
ZombieHitEffectParticle.transform.position = particleSpawnPos;
ZombieHitEffectParticle.transform.rotation = ParticleRotation;
ZombieHitEffectParticle.Play(true);
damageable.TakeDamage(10f);
}
Vector3 spawnPos = hitPoint.point + hitPoint.normal * 0.01f;
BulletHitEffectParticle.transform.position = spawnPos;
BulletHitEffectParticle.transform.rotation = Quaternion.LookRotation(hitPoint.normal);
BulletHitEffectParticle.Play(true);
else
{
BulletHitEffectParticle.transform.position = particleSpawnPos;
BulletHitEffectParticle.transform.rotation = Quaternion.LookRotation(hitPoint.normal);
BulletHitEffectParticle.Play(true);
}
}
public void Reload()