Files
LuaCsForBarotraumaEP/Barotrauma/BarotraumaClient/Source/Characters/AICharacter.cs
T
Joonas Rikkonen e15f5a881b Merge branch 'dedicated-server' (TODO: make sure I didn't break anything)
Conflicts:
	Barotrauma/Barotrauma.csproj
	Barotrauma/BarotraumaShared/Source/Characters/AI/AIController.cs
	Barotrauma/BarotraumaShared/Source/Characters/AI/EnemyAIController.cs
	Barotrauma/BarotraumaShared/Source/Characters/AICharacter.cs
	Barotrauma/BarotraumaShared/Source/Characters/Animation/Ragdoll.cs
	Barotrauma/BarotraumaShared/Source/Characters/Attack.cs
	Barotrauma/BarotraumaShared/Source/Characters/Character.cs
	Barotrauma/BarotraumaShared/Source/Characters/CharacterNetworking.cs
	Barotrauma/BarotraumaShared/Source/Characters/Limb.cs
	Barotrauma/BarotraumaShared/Source/Events/MonsterEvent.cs
	Barotrauma/BarotraumaShared/Source/Map/Explosion.cs
2017-06-30 21:02:52 +03:00

43 lines
1.1 KiB
C#

using Microsoft.Xna.Framework;
using System;
namespace Barotrauma
{
partial class AICharacter : Character
{
partial void InitProjSpecific()
{
soundTimer = Rand.Range(0.0f, soundInterval);
}
partial void SoundUpdate(float deltaTime)
{
if (soundTimer > 0)
{
soundTimer -= deltaTime;
}
else
{
switch (aiController.State)
{
case AIController.AIState.Attack:
PlaySound(CharacterSound.SoundType.Attack);
break;
default:
PlaySound(CharacterSound.SoundType.Idle);
break;
}
soundTimer = soundInterval;
}
}
public override void DrawFront(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Camera cam)
{
base.DrawFront(spriteBatch, cam);
if (GameMain.DebugDraw && !IsDead) aiController.DebugDraw(spriteBatch);
}
}
}