New waterblood particle
This commit is contained in:
@@ -387,6 +387,7 @@
|
||||
</Content>
|
||||
<Content Include="Content\Characters\Charybdis\charybdis.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Content\Characters\Coelanth\coelanth.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@@ -868,6 +869,9 @@
|
||||
<Content Include="Content\Particles\shrapnel.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Particles\Smoke.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Particles\SmokeParticleSheet.png">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectView>ShowAllFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ReferencePath>
|
||||
|
||||
@@ -73,15 +73,17 @@
|
||||
</blood>
|
||||
|
||||
<waterblood
|
||||
startsize="0.05,0.05"
|
||||
sizechangemin="0.1,0.1" sizechangemax="0.15,0.15"
|
||||
startsizemin="0.1,0.1" startsizemax="0.3,0.3"
|
||||
sizechangemin="0.1,0.1" sizechangemax="0.2,0.2"
|
||||
startrotationmin ="0.0" startrotationmax="360"
|
||||
startcolor="0.5, 0.0, 0.0" startalpha="1.0"
|
||||
colorchange="0.0, 0.0, 0.0, -0.25"
|
||||
animduration="5"
|
||||
colorchange="0.0, 0.0, 0.0, -0.2"
|
||||
growtime ="0.1"
|
||||
lifetime="5.0"
|
||||
drawtarget="water"
|
||||
velocitychange="0.0, 0.0">
|
||||
<sprite texture="Content/Particles/spatter.png" sourcerect="128,128,128,128"/>
|
||||
<animatedsprite texture="Content/Particles/Smoke.png" sourcerect="0,0,4096,4096" columns="8" rows="8" origin="0.5,0.5"/>
|
||||
</waterblood>
|
||||
|
||||
<spark
|
||||
|
||||
BIN
Barotrauma/Content/Particles/Smoke.png
Normal file
BIN
Barotrauma/Content/Particles/Smoke.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -371,29 +371,25 @@ namespace Barotrauma
|
||||
SoundPlayer.PlayDamageSound(damageSoundType, amount, position);
|
||||
}
|
||||
|
||||
//Bleeding += bleedingAmount;
|
||||
//Damage += amount;
|
||||
float bloodAmount = hitArmor || bleedingAmount <= 0.0f ? 0 : (int)Math.Min((int)(amount * 2.0f), 20);
|
||||
|
||||
float bloodAmount = hitArmor || bleedingAmount<=0.0f ? 0 : (int)Math.Min((int)(amount * 2.0f), 20);
|
||||
|
||||
for (int i = 0; i < bloodAmount; i++)
|
||||
{
|
||||
Vector2 particleVel = SimPosition - position;
|
||||
Vector2 particleVel = WorldPosition - position;
|
||||
if (particleVel != Vector2.Zero) particleVel = Vector2.Normalize(particleVel);
|
||||
|
||||
GameMain.ParticleManager.CreateParticle("blood",
|
||||
WorldPosition,
|
||||
particleVel * Rand.Range(100.0f, 300.0f), 0.0f, character.AnimController.CurrentHull);
|
||||
}
|
||||
|
||||
for (int i = 0; i < bloodAmount / 2; i++)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("waterblood", WorldPosition, Vector2.Zero, 0.0f, character.AnimController.CurrentHull);
|
||||
if (i < bloodAmount / 5)
|
||||
{
|
||||
GameMain.ParticleManager.CreateParticle("waterblood", WorldPosition, Rand.Vector(10), 0.0f, character.AnimController.CurrentHull);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
damage += Math.Max(amount,bleedingAmount) / character.MaxHealth * 100.0f;
|
||||
|
||||
|
||||
return new AttackResult(amount, bleedingAmount, hitArmor);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user