diff --git a/JustATest/Assets/ParticleAutoDestroy.cs b/JustATest/Assets/ParticleAutoDestroy.cs new file mode 100644 index 0000000..d7d9753 --- /dev/null +++ b/JustATest/Assets/ParticleAutoDestroy.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ParticleAutoDestroy : MonoBehaviour { + + // Use this for initialization + private ParticleSystem _system; + void Start () { + _system = GetComponent(); + } + + // Update is called once per frame + void Update () { + if (!_system.IsAlive()) + { + Destroy(this.gameObject); + } + } +} diff --git a/JustATest/Assets/ParticleAutoDestroy.cs.meta b/JustATest/Assets/ParticleAutoDestroy.cs.meta new file mode 100644 index 0000000..358838f --- /dev/null +++ b/JustATest/Assets/ParticleAutoDestroy.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8aa797612656b6041a416e8ab0522a33 +timeCreated: 1499266775 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/JustATest/Assets/Prefabs/Explosion.prefab b/JustATest/Assets/Prefabs/Explosion.prefab index 51ff4ef..e6d015e 100644 Binary files a/JustATest/Assets/Prefabs/Explosion.prefab and b/JustATest/Assets/Prefabs/Explosion.prefab differ diff --git a/JustATest/Assets/Prefabs/Grenade.prefab b/JustATest/Assets/Prefabs/Grenade.prefab index bba00b9..6dc3b82 100644 Binary files a/JustATest/Assets/Prefabs/Grenade.prefab and b/JustATest/Assets/Prefabs/Grenade.prefab differ diff --git a/JustATest/Assets/Prefabs/ObjectDestroy.prefab b/JustATest/Assets/Prefabs/ObjectDestroy.prefab index 8fff793..61a0420 100644 Binary files a/JustATest/Assets/Prefabs/ObjectDestroy.prefab and b/JustATest/Assets/Prefabs/ObjectDestroy.prefab differ diff --git a/JustATest/Assets/Prefabs/UpgradeEffect.prefab b/JustATest/Assets/Prefabs/UpgradeEffect.prefab index 9403a2a..deb12a1 100644 Binary files a/JustATest/Assets/Prefabs/UpgradeEffect.prefab and b/JustATest/Assets/Prefabs/UpgradeEffect.prefab differ diff --git a/JustATest/Assets/Prefabs/Wall.prefab b/JustATest/Assets/Prefabs/Wall.prefab index 2dce899..1d3c899 100644 Binary files a/JustATest/Assets/Prefabs/Wall.prefab and b/JustATest/Assets/Prefabs/Wall.prefab differ diff --git a/JustATest/Assets/Scripts/EMPItem.cs b/JustATest/Assets/Scripts/EMPItem.cs index 92ef9cd..7cf3d53 100644 --- a/JustATest/Assets/Scripts/EMPItem.cs +++ b/JustATest/Assets/Scripts/EMPItem.cs @@ -197,11 +197,6 @@ void AttachToThruster() void Explode() { - for (int i = 0; i < _thrusters.Count; i++) - { - _thrusters[_thrusterID].IsHighlighted = false; - } - _billboard.SetActive(false); _mesh.SetActive(false); GlobalSoundManager.instance.PlayStopEmp(false); diff --git a/JustATest/Assets/Scripts/GrenadeItem.cs b/JustATest/Assets/Scripts/GrenadeItem.cs index 3db3b51..003920f 100644 --- a/JustATest/Assets/Scripts/GrenadeItem.cs +++ b/JustATest/Assets/Scripts/GrenadeItem.cs @@ -14,7 +14,7 @@ public class GrenadeItem : MonoBehaviour, IItem { private Vector3 _spinDir; [SerializeField] - Explosion ExplosionPrefab; + GameObject ExplosionPrefab; public bool Grab(Transform origin) { diff --git a/JustATest/Assets/Scripts/WallController.cs b/JustATest/Assets/Scripts/WallController.cs index 8da46c4..d29baca 100644 --- a/JustATest/Assets/Scripts/WallController.cs +++ b/JustATest/Assets/Scripts/WallController.cs @@ -51,7 +51,7 @@ public float UpgradeTimer [SerializeField] float MaxFieldWidth; [SerializeField] - Explosion ExplosionPrefab; + GameObject ExplosionPrefab; public bool LeftWon = false; public bool RightWon = false; diff --git a/JustATest/JustATest.CSharp.csproj b/JustATest/JustATest.CSharp.csproj index d561435..5120e59 100644 --- a/JustATest/JustATest.CSharp.csproj +++ b/JustATest/JustATest.CSharp.csproj @@ -75,7 +75,7 @@ - + @@ -125,11 +125,14 @@ + + + @@ -138,10 +141,10 @@ + - diff --git a/JustATest/JustATest.sln b/JustATest/JustATest.sln index 1d4a19c..e65e88d 100644 --- a/JustATest/JustATest.sln +++ b/JustATest/JustATest.sln @@ -1,9 +1,9 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2015 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustATest", "JustATest.csproj", "{D1933A70-366E-5E11-65B2-372C7CDB40E1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustATest.CSharp", "JustATest.CSharp.csproj", "{FD9B50BC-72BB-478C-CD01-E0D42AC50E1A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustATest.Editor", "JustATest.Editor.csproj", "{B1D98C20-72E7-04A6-3DAB-59137D38656C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JustATest.CSharp.Editor", "JustATest.CSharp.Editor.csproj", "{BAFF4C6E-0A77-D6E1-E73C-0B780F390A54}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,14 +11,14 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D1933A70-366E-5E11-65B2-372C7CDB40E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D1933A70-366E-5E11-65B2-372C7CDB40E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D1933A70-366E-5E11-65B2-372C7CDB40E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D1933A70-366E-5E11-65B2-372C7CDB40E1}.Release|Any CPU.Build.0 = Release|Any CPU - {B1D98C20-72E7-04A6-3DAB-59137D38656C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B1D98C20-72E7-04A6-3DAB-59137D38656C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B1D98C20-72E7-04A6-3DAB-59137D38656C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B1D98C20-72E7-04A6-3DAB-59137D38656C}.Release|Any CPU.Build.0 = Release|Any CPU + {FD9B50BC-72BB-478C-CD01-E0D42AC50E1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD9B50BC-72BB-478C-CD01-E0D42AC50E1A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD9B50BC-72BB-478C-CD01-E0D42AC50E1A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD9B50BC-72BB-478C-CD01-E0D42AC50E1A}.Release|Any CPU.Build.0 = Release|Any CPU + {BAFF4C6E-0A77-D6E1-E73C-0B780F390A54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAFF4C6E-0A77-D6E1-E73C-0B780F390A54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAFF4C6E-0A77-D6E1-E73C-0B780F390A54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAFF4C6E-0A77-D6E1-E73C-0B780F390A54}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE