Melee weapons (+ stun baton), improved throw animation, new damage sound effects

This commit is contained in:
Regalis
2015-09-07 16:31:04 +03:00
parent b77fa5df90
commit 7eae6fb026
38 changed files with 527 additions and 163 deletions

View File

@@ -46,15 +46,8 @@ namespace Subsurface.Particles
}
public Particle CreateParticle(string prefabName, Vector2 position, Vector2 speed, float rotation=0.0f)
{
ParticlePrefab prefab;
prefabs.TryGetValue(prefabName, out prefab);
if (prefab==null)
{
DebugConsole.ThrowError("Particle prefab "+prefabName+" not found!");
return null;
}
{
ParticlePrefab prefab = FindPrefab(prefabName);
return CreateParticle(prefab, position, speed, rotation);
}
@@ -74,6 +67,20 @@ namespace Subsurface.Particles
}
public ParticlePrefab FindPrefab(string prefabName)
{
ParticlePrefab prefab;
prefabs.TryGetValue(prefabName, out prefab);
if (prefab == null)
{
DebugConsole.ThrowError("Particle prefab " + prefabName + " not found!");
return null;
}
return prefab;
}
private void RemoveParticle(int index)
{
particleCount--;
@@ -83,8 +90,6 @@ namespace Subsurface.Particles
particles[particleCount] = swap;
}
public void Update(float deltaTime)
{
for (int i = 0; i < particleCount; i++)