added main menu
This commit is contained in:
@@ -13,5 +13,5 @@ MonoBehaviour:
|
||||
m_Name: CameraConfigSO
|
||||
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.CameraConfigSO
|
||||
lookSensitivity: 10
|
||||
topClampAngle: 50
|
||||
bottomClampAngle: -30
|
||||
topClampAngle: 80
|
||||
bottomClampAngle: -50
|
||||
|
||||
@@ -14,5 +14,5 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier: CoreAssembly::Darkmatter.Core.EnemyConfigSO
|
||||
walkSpeed: 1
|
||||
chaseSpeed: 2
|
||||
visionRange: 30
|
||||
visionRange: 40
|
||||
attackRange: 3
|
||||
|
||||
@@ -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();
|
||||
|
||||
8
Assets/Darkmatter/Code/Presentation/UI.meta
Normal file
8
Assets/Darkmatter/Code/Presentation/UI.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89a481c3f65727c43a170bb2b20ebdf1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Darkmatter/Code/Presentation/UI/MenuScreen.cs
Normal file
13
Assets/Darkmatter/Code/Presentation/UI/MenuScreen.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Darkmatter.Presentation
|
||||
{
|
||||
public class MenuScreen : MonoBehaviour
|
||||
{
|
||||
public void OnPlayBtnClick()
|
||||
{
|
||||
SceneManager.LoadScene(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1f9f29400af628d418161d7091f4ecc3
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user