Compare commits
No commits in common. "2286de6fbc8399c2c84ceb372a22ffd1972fc2dc" and "8c74bfe4c6af38c9853d9150e9900ab3ec1b954b" have entirely different histories.
2286de6fbc
...
8c74bfe4c6
26 changed files with 12 additions and 313 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9922143d68d6063e4a08cdeeb509237c
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 010b1a2adea9686f09d4ab14690eb26b
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
BIN
Assets/_Project/Audio/buildings/tesla_tower/construction_finished.wav
(Stored with Git LFS)
BIN
Assets/_Project/Audio/buildings/tesla_tower/construction_finished.wav
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,23 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 6ff2e0ba45ef5eb6abeb34bd2c6e2da8
|
|
||||||
AudioImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 8
|
|
||||||
defaultSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
loadType: 0
|
|
||||||
sampleRateSetting: 0
|
|
||||||
sampleRateOverride: 44100
|
|
||||||
compressionFormat: 1
|
|
||||||
quality: 1
|
|
||||||
conversionMode: 0
|
|
||||||
preloadAudioData: 0
|
|
||||||
platformSettingOverrides: {}
|
|
||||||
forceToMono: 0
|
|
||||||
normalize: 1
|
|
||||||
loadInBackground: 0
|
|
||||||
ambisonic: 0
|
|
||||||
3D: 1
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 0a6f35a8a0b1666d8aeebf2071d63132
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 00e7929e355a29031b42d55d7637e784
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
BIN
Assets/_Project/Audio/death_sounds/cyclops/cyclops_death_sound_1.wav
(Stored with Git LFS)
BIN
Assets/_Project/Audio/death_sounds/cyclops/cyclops_death_sound_1.wav
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,23 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: e007e19b827137ce395021d825927dcc
|
|
||||||
AudioImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 8
|
|
||||||
defaultSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
loadType: 0
|
|
||||||
sampleRateSetting: 0
|
|
||||||
sampleRateOverride: 44100
|
|
||||||
compressionFormat: 1
|
|
||||||
quality: 1
|
|
||||||
conversionMode: 0
|
|
||||||
preloadAudioData: 0
|
|
||||||
platformSettingOverrides: {}
|
|
||||||
forceToMono: 0
|
|
||||||
normalize: 1
|
|
||||||
loadInBackground: 0
|
|
||||||
ambisonic: 0
|
|
||||||
3D: 1
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
BIN
Assets/_Project/Audio/death_sounds/cyclops/cyclops_death_sound_2.wav
(Stored with Git LFS)
BIN
Assets/_Project/Audio/death_sounds/cyclops/cyclops_death_sound_2.wav
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,23 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 6cea30689732db2f0a8989fe8f1a07a9
|
|
||||||
AudioImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 8
|
|
||||||
defaultSettings:
|
|
||||||
serializedVersion: 2
|
|
||||||
loadType: 0
|
|
||||||
sampleRateSetting: 0
|
|
||||||
sampleRateOverride: 44100
|
|
||||||
compressionFormat: 1
|
|
||||||
quality: 1
|
|
||||||
conversionMode: 0
|
|
||||||
preloadAudioData: 0
|
|
||||||
platformSettingOverrides: {}
|
|
||||||
forceToMono: 0
|
|
||||||
normalize: 1
|
|
||||||
loadInBackground: 0
|
|
||||||
ambisonic: 0
|
|
||||||
3D: 1
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -16,7 +16,6 @@ GameObject:
|
||||||
- component: {fileID: 3283904430289710888}
|
- component: {fileID: 3283904430289710888}
|
||||||
- component: {fileID: 3756613737869398948}
|
- component: {fileID: 3756613737869398948}
|
||||||
- component: {fileID: 6036713598566100742}
|
- component: {fileID: 6036713598566100742}
|
||||||
- component: {fileID: -1575784752119152190}
|
|
||||||
m_Layer: 10
|
m_Layer: 10
|
||||||
m_Name: Enemy_CrystalGolem_Blue
|
m_Name: Enemy_CrystalGolem_Blue
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -203,27 +202,6 @@ CapsuleCollider:
|
||||||
m_Height: 2
|
m_Height: 2
|
||||||
m_Direction: 1
|
m_Direction: 1
|
||||||
m_Center: {x: 0, y: 1, z: 0}
|
m_Center: {x: 0, y: 1, z: 0}
|
||||||
--- !u!114 &-1575784752119152190
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1455822126534880203}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9df6fea9a86daafae998f8eecc44ee7d, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.EnemyDeathSound
|
|
||||||
deathSounds:
|
|
||||||
- clip: {fileID: 8300000, guid: e007e19b827137ce395021d825927dcc, type: 3}
|
|
||||||
volume: 0.75
|
|
||||||
minPitch: 0.95
|
|
||||||
maxPitch: 1.05
|
|
||||||
- clip: {fileID: 8300000, guid: 6cea30689732db2f0a8989fe8f1a07a9, type: 3}
|
|
||||||
volume: 0.75
|
|
||||||
minPitch: 0.95
|
|
||||||
maxPitch: 1.05
|
|
||||||
--- !u!1 &5361867751622119598
|
--- !u!1 &5361867751622119598
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ GameObject:
|
||||||
- component: {fileID: 3283904430289710888}
|
- component: {fileID: 3283904430289710888}
|
||||||
- component: {fileID: 3756613737869398948}
|
- component: {fileID: 3756613737869398948}
|
||||||
- component: {fileID: 6036713598566100742}
|
- component: {fileID: 6036713598566100742}
|
||||||
- component: {fileID: -4695266156693656620}
|
|
||||||
m_Layer: 10
|
m_Layer: 10
|
||||||
m_Name: Enemy_Cyclops_Green
|
m_Name: Enemy_Cyclops_Green
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -203,21 +202,6 @@ CapsuleCollider:
|
||||||
m_Height: 2
|
m_Height: 2
|
||||||
m_Direction: 1
|
m_Direction: 1
|
||||||
m_Center: {x: 0, y: 1, z: 0}
|
m_Center: {x: 0, y: 1, z: 0}
|
||||||
--- !u!114 &-4695266156693656620
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 1455822126534880203}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9df6fea9a86daafae998f8eecc44ee7d, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.EnemyDeathSound
|
|
||||||
deathClips:
|
|
||||||
- {fileID: 8300000, guid: e007e19b827137ce395021d825927dcc, type: 3}
|
|
||||||
- {fileID: 8300000, guid: 6cea30689732db2f0a8989fe8f1a07a9, type: 3}
|
|
||||||
--- !u!1 &5361867751622119598
|
--- !u!1 &5361867751622119598
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,6 @@ GameObject:
|
||||||
- component: {fileID: 8853488620519990682}
|
- component: {fileID: 8853488620519990682}
|
||||||
- component: {fileID: 4524938955752569428}
|
- component: {fileID: 4524938955752569428}
|
||||||
- component: {fileID: -2590971686077483651}
|
- component: {fileID: -2590971686077483651}
|
||||||
- component: {fileID: 1288485127287735786}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Tower_TeslaCoil
|
m_Name: Tower_TeslaCoil
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -147,7 +146,7 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
m_EditorClassIdentifier: Unity.Netcode.Runtime::Unity.Netcode.NetworkObject
|
||||||
GlobalObjectIdHash: 280718094
|
GlobalObjectIdHash: 1363936954
|
||||||
InScenePlacedSourceGlobalObjectIdHash: 0
|
InScenePlacedSourceGlobalObjectIdHash: 0
|
||||||
DeferredDespawnTick: 0
|
DeferredDespawnTick: 0
|
||||||
Ownership: 1
|
Ownership: 1
|
||||||
|
|
@ -220,20 +219,10 @@ MonoBehaviour:
|
||||||
emitter: {fileID: 1088221722203278382}
|
emitter: {fileID: 1088221722203278382}
|
||||||
arcMaterial: {fileID: 2100000, guid: 9ba610475fb3d4c4fa1245e15a72aee5, type: 2}
|
arcMaterial: {fileID: 2100000, guid: 9ba610475fb3d4c4fa1245e15a72aee5, type: 2}
|
||||||
arcColor: {r: 0.6, g: 0.85, b: 1, a: 1}
|
arcColor: {r: 0.6, g: 0.85, b: 1, a: 1}
|
||||||
emissionIntensity: 4
|
|
||||||
arcWidth: 0.06
|
arcWidth: 0.06
|
||||||
arcDuration: 0.12
|
arcDuration: 0.12
|
||||||
segmentsPerArc: 6
|
segmentsPerArc: 6
|
||||||
arcHeight: 0.18
|
|
||||||
jitter: 0.2
|
jitter: 0.2
|
||||||
castLight: 1
|
|
||||||
lightColor: {r: 0.6, g: 0.85, b: 1, a: 1}
|
|
||||||
lightIntensity: 8
|
|
||||||
lightRange: 12
|
|
||||||
castImpactLight: 1
|
|
||||||
impactLightIntensity: 4
|
|
||||||
impactLightRange: 5
|
|
||||||
maxImpactLights: 8
|
|
||||||
--- !u!114 &-2590971686077483651
|
--- !u!114 &-2590971686077483651
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -246,28 +235,9 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: db643146344a08a639133638e4746a33, type: 3}
|
m_Script: {fileID: 11500000, guid: db643146344a08a639133638e4746a33, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TeslaTowerFireSound
|
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TeslaTowerFireSound
|
||||||
fireSound:
|
fireClip: {fileID: 8300000, guid: a0b5d0b15de667604b825f12d39b05a8, type: 3}
|
||||||
clip: {fileID: 8300000, guid: a0b5d0b15de667604b825f12d39b05a8, type: 3}
|
minPitch: 0.92
|
||||||
volume: 0.263
|
maxPitch: 1.07
|
||||||
minPitch: 0.95
|
|
||||||
maxPitch: 1.05
|
|
||||||
--- !u!114 &1288485127287735786
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 6482414459531823157}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: ce512ec39eb6a8f079c7b258a4d0ced1, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier: Assembly-CSharp::TD.Combat.TowerBuiltSound
|
|
||||||
builtSound:
|
|
||||||
clip: {fileID: 8300000, guid: 6ff2e0ba45ef5eb6abeb34bd2c6e2da8, type: 3}
|
|
||||||
volume: 0.496
|
|
||||||
minPitch: 1
|
|
||||||
maxPitch: 1
|
|
||||||
--- !u!1 &7101790219931971190
|
--- !u!1 &7101790219931971190
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ namespace TD.Audio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Play(AudioClip clip, AudioCategory category, float pitch = 1f, float volume = 1f)
|
public void Play(AudioClip clip, AudioCategory category, float pitch = 1f)
|
||||||
{
|
{
|
||||||
if (clip == null) return;
|
if (clip == null) return;
|
||||||
if (!pools.TryGetValue(category, out var pool)) return;
|
if (!pools.TryGetValue(category, out var pool)) return;
|
||||||
|
|
@ -66,7 +66,6 @@ namespace TD.Audio
|
||||||
int idx = indices[category];
|
int idx = indices[category];
|
||||||
var src = pool[idx % pool.Length];
|
var src = pool[idx % pool.Length];
|
||||||
src.pitch = pitch;
|
src.pitch = pitch;
|
||||||
src.volume = volume;
|
|
||||||
src.clip = clip;
|
src.clip = clip;
|
||||||
src.Play();
|
src.Play();
|
||||||
indices[category] = idx + 1;
|
indices[category] = idx + 1;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// Assets/_Project/Scripts/Audio/SoundConfig.cs
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace TD.Audio
|
|
||||||
{
|
|
||||||
[System.Serializable]
|
|
||||||
public struct SoundConfig
|
|
||||||
{
|
|
||||||
public AudioClip clip;
|
|
||||||
[Range(0f, 1f)] public float volume;
|
|
||||||
[Range(0f, 3f)] public float minPitch;
|
|
||||||
[Range(0f, 3f)] public float maxPitch;
|
|
||||||
|
|
||||||
public float RandomPitch() => Random.Range(minPitch, maxPitch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: fce44aba7ccbe4224aeae2faa74b978f
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
// Assets/_Project/Scripts/Combat/EnemyDeathSound.cs
|
|
||||||
using TD.Audio;
|
|
||||||
using TD.Gameplay;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace TD.Combat
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Local-only audio for enemy death. Subscribes to <see cref="EnemyHealth.OnDiedClient"/>
|
|
||||||
/// and plays a randomly chosen clip from <see cref="deathClips"/>.
|
|
||||||
/// Attach to any enemy prefab and assign its clips in the Inspector.
|
|
||||||
/// </summary>
|
|
||||||
[RequireComponent(typeof(EnemyHealth))]
|
|
||||||
public class EnemyDeathSound : MonoBehaviour
|
|
||||||
{
|
|
||||||
[SerializeField] private SoundConfig[] deathSounds;
|
|
||||||
|
|
||||||
private EnemyHealth enemyHealth;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
enemyHealth = GetComponent<EnemyHealth>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
if (enemyHealth != null) enemyHealth.OnDiedClient += HandleDied;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDisable()
|
|
||||||
{
|
|
||||||
if (enemyHealth != null) enemyHealth.OnDiedClient -= HandleDied;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleDied()
|
|
||||||
{
|
|
||||||
if (deathSounds == null || deathSounds.Length == 0) return;
|
|
||||||
var sound = deathSounds[Random.Range(0, deathSounds.Length)];
|
|
||||||
AudioManager.Instance?.Play(sound.clip, AudioCategory.EnemyHitDeath, sound.RandomPitch(), sound.volume);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9df6fea9a86daafae998f8eecc44ee7d
|
|
||||||
|
|
@ -17,7 +17,12 @@ namespace TD.Combat
|
||||||
[RequireComponent(typeof(TowerCombat))]
|
[RequireComponent(typeof(TowerCombat))]
|
||||||
public class TeslaTowerFireSound : MonoBehaviour
|
public class TeslaTowerFireSound : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField] private SoundConfig fireSound;
|
[Tooltip("Sound played each time the coil discharges.")]
|
||||||
|
[SerializeField] private AudioClip fireClip;
|
||||||
|
|
||||||
|
[Tooltip("Pitch is randomized within this range each shot to avoid a mechanical loop.")]
|
||||||
|
[SerializeField] private float minPitch = 0.93f;
|
||||||
|
[SerializeField] private float maxPitch = 1.07f;
|
||||||
|
|
||||||
private TowerCombat combat;
|
private TowerCombat combat;
|
||||||
|
|
||||||
|
|
@ -38,7 +43,7 @@ namespace TD.Combat
|
||||||
|
|
||||||
private void HandleAreaFired(Vector3[] positions)
|
private void HandleAreaFired(Vector3[] positions)
|
||||||
{
|
{
|
||||||
AudioManager.Instance?.Play(fireSound.clip, AudioCategory.TowerFire, fireSound.RandomPitch(), fireSound.volume);
|
AudioManager.Instance?.Play(fireClip, AudioCategory.TowerFire, Random.Range(minPitch, maxPitch));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
// Assets/_Project/Scripts/Combat/TowerBuiltSound.cs
|
|
||||||
using TD.Audio;
|
|
||||||
using TD.Gameplay;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace TD.Combat
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Local-only audio for tower construction completion. Subscribes to
|
|
||||||
/// <see cref="TowerInstance.OnBuiltClient"/> and plays a sound on every peer
|
|
||||||
/// when the tower finishes building.
|
|
||||||
/// Attach to any tower prefab and assign its clip in the Inspector.
|
|
||||||
/// </summary>
|
|
||||||
[RequireComponent(typeof(TowerInstance))]
|
|
||||||
public class TowerBuiltSound : MonoBehaviour
|
|
||||||
{
|
|
||||||
[SerializeField] private SoundConfig builtSound;
|
|
||||||
|
|
||||||
private TowerInstance towerInstance;
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
towerInstance = GetComponent<TowerInstance>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEnable()
|
|
||||||
{
|
|
||||||
if (towerInstance != null) towerInstance.OnBuiltClient += HandleBuilt;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnDisable()
|
|
||||||
{
|
|
||||||
if (towerInstance != null) towerInstance.OnBuiltClient -= HandleBuilt;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandleBuilt()
|
|
||||||
{
|
|
||||||
AudioManager.Instance?.Play(builtSound.clip, AudioCategory.UI, builtSound.RandomPitch(), builtSound.volume);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: ce512ec39eb6a8f079c7b258a4d0ced1
|
|
||||||
|
|
@ -126,9 +126,6 @@ namespace TD.Gameplay
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public event System.Action<EnemyHealth> OnDied;
|
public event System.Action<EnemyHealth> OnDied;
|
||||||
|
|
||||||
/// <summary>Fired on ALL peers the moment this enemy dies. Use for client-side visuals and audio.</summary>
|
|
||||||
public event System.Action OnDiedClient;
|
|
||||||
|
|
||||||
// ----- Server-only pre-spawn init -------------------------------------
|
// ----- Server-only pre-spawn init -------------------------------------
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -243,7 +240,6 @@ namespace TD.Gameplay
|
||||||
if (deathAnimator != null)
|
if (deathAnimator != null)
|
||||||
deathAnimator.SetTrigger(DieHash);
|
deathAnimator.SetTrigger(DieHash);
|
||||||
|
|
||||||
DiedClientRpc();
|
|
||||||
StartCoroutine(DeathSequence());
|
StartCoroutine(DeathSequence());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -267,12 +263,6 @@ namespace TD.Gameplay
|
||||||
// mesh sizes substantially, derive this from a collider bounds instead.
|
// mesh sizes substantially, derive this from a collider bounds instead.
|
||||||
public float SelectionRadius => 0.4f;
|
public float SelectionRadius => 0.4f;
|
||||||
|
|
||||||
[ClientRpc]
|
|
||||||
private void DiedClientRpc()
|
|
||||||
{
|
|
||||||
OnDiedClient?.Invoke();
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator DeathSequence()
|
private IEnumerator DeathSequence()
|
||||||
{
|
{
|
||||||
// Hold while the death animation plays.
|
// Hold while the death animation plays.
|
||||||
|
|
|
||||||
|
|
@ -166,11 +166,6 @@ namespace TD.Gameplay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----- Events ---------------------------------------------------------
|
|
||||||
|
|
||||||
/// <summary>Fired on ALL peers when this tower finishes construction and spawns.</summary>
|
|
||||||
public event System.Action OnBuiltClient;
|
|
||||||
|
|
||||||
// ----- Server-only initialization -------------------------------------
|
// ----- Server-only initialization -------------------------------------
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -267,8 +262,6 @@ namespace TD.Gameplay
|
||||||
$"for {ownerSlot.Value} at anchor {anchorTile.Value}. " +
|
$"for {ownerSlot.Value} at anchor {anchorTile.Value}. " +
|
||||||
$"IsServer={IsServer}");
|
$"IsServer={IsServer}");
|
||||||
}
|
}
|
||||||
|
|
||||||
OnBuiltClient?.Invoke();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnNetworkDespawn()
|
public override void OnNetworkDespawn()
|
||||||
|
|
|
||||||
|
|
@ -155,11 +155,6 @@
|
||||||
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.RectSelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "editor.dragSelectRectMode",
|
"key": "editor.dragSelectRectMode",
|
||||||
"value": "{\"m_Value\":0}"
|
"value": "{\"m_Value\":0}"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "UnityEditor.ProBuilder.Actions.ExportAssetOptions, Unity.ProBuilder.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
|
||||||
"key": "export.assetOptions",
|
|
||||||
"value": "{\"m_Value\":{\"makePrefab\":false,\"replaceOriginal\":false}}"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue