Crew commands

This commit is contained in:
Regalis
2015-11-26 23:04:02 +02:00
parent f1e1b0b4f0
commit c9cc94f701
19 changed files with 406 additions and 69 deletions
@@ -1,4 +1,6 @@
using System;
using Barotrauma.Items.Components;
using Microsoft.Xna.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -7,9 +9,9 @@ namespace Barotrauma
{
class AIObjectiveOperateItem : AIObjective
{
private Item targetItem;
private ItemComponent targetItem;
public AIObjectiveOperateItem(Item item, Character character)
public AIObjectiveOperateItem(ItemComponent item, Character character)
:base (character)
{
targetItem = item;
@@ -17,7 +19,13 @@ namespace Barotrauma
protected override void Act(float deltaTime)
{
//item.AIOperate(float deltaTime, Character character) or something
if (Vector2.Distance(character.SimPosition, targetItem.Item.SimPosition) < targetItem.Item.PickDistance)
{
//targetItem.Pick(character, false, true);
return;
}
subObjectives.Add(new AIObjectiveGoTo(targetItem.Item.SimPosition, character));
}
public override bool IsDuplicate(AIObjective otherObjective)