using BlueWater.Interfaces; namespace BlueWater.Npcs.Crews.Cleaner { public class CleanerCrew : Crew { public bool IsCleaningFloor { get; private set; } public bool IsCleaningTable { get; private set; } public StateMachineController StateMachineController { get; private set; } public IStateMachine IdleState { get; private set; } public IStateMachine WalkingState { get; private set; } public IStateMachine CleaningFloorState { get; private set; } public IStateMachine CleaningTableState { get; private set; } protected override void Update() { StateMachineController.UpdateState(this); base.Update(); } public override void Initialize() { IdleState = new IdleState(); WalkingState = new WalkingState(); CleaningFloorState = new CleaningFloorState(); CleaningTableState = new CleaningTableState(); StateMachineController = new StateMachineController(this, IdleState); base.Initialize(); } public override void ResetMission() { CrewInteraction = null; IsOnMission = false; BalloonUi.DiscardItem(); IsCleaningFloor = false; IsCleaningTable = false; } public override bool IsCompletedMission() { return CrewInteraction == null && !IsCleaningFloor && !IsCleaningTable; } public void SetIsCleaningFloor(bool value) => IsCleaningFloor = value; public void SetIsCleaningTable(bool value) => IsCleaningTable = value; } }