Some cleanup using ReSharper (mostly removing redundancies)
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Barotrauma
|
||||
|
||||
int amount = Rand.Range(minAmount, maxAmount, false);
|
||||
|
||||
monsters = new AICharacter[amount];
|
||||
monsters = new Character[amount];
|
||||
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
@@ -64,14 +64,14 @@ namespace Barotrauma
|
||||
if (isFinished) return;
|
||||
|
||||
bool monstersDead = true;
|
||||
for (int i = 0; i < monsters.Length; i++)
|
||||
foreach (Character monster in monsters)
|
||||
{
|
||||
if (monsters[i].IsDead) continue;
|
||||
if (monster.IsDead) continue;
|
||||
|
||||
if (!isStarted && Vector2.Distance(monsters[i].WorldPosition, Submarine.Loaded.WorldPosition) < 5000.0f) isStarted = true;
|
||||
if (!isStarted && Vector2.Distance(monster.WorldPosition, Submarine.Loaded.WorldPosition) < 5000.0f) isStarted = true;
|
||||
|
||||
monstersDead = false;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
if (monstersDead) Finished();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Xml.Linq;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -22,11 +21,7 @@ namespace Barotrauma
|
||||
{
|
||||
get
|
||||
{
|
||||
foreach (Task task in tasks)
|
||||
{
|
||||
if (task.Priority >= CriticalPriority) return true;
|
||||
}
|
||||
return false;
|
||||
return tasks.Any(task => task.Priority >= CriticalPriority);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user