OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aibreathe.hpp
Go to the documentation of this file.
1 #ifndef GAME_MWMECHANICS_AIBREATHE_H
2 #define GAME_MWMECHANICS_AIBREATHE_H
3 
4 #include "aipackage.hpp"
5 
6 namespace MWMechanics
7 {
9  // The AI will go up if lesser than half breath left
10  class AiBreathe : public AiPackage
11  {
12  public:
13  AiBreathe();
14 
15  virtual AiBreathe *clone() const;
16 
17  virtual bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration);
18 
19  virtual int getTypeId() const;
20 
21  virtual unsigned int getPriority() const;
22 
23  virtual bool canCancel() const { return false; }
24  virtual bool shouldCancelPreviousAi() const { return false; }
25  };
26 }
27 #endif
28 
AiBreathe()
Definition: aibreathe.cpp:14
Base class for AI packages.
Definition: aipackage.hpp:33
virtual bool canCancel() const
Can this Ai package be canceled? (default true)
Definition: aibreathe.hpp:23
Definition: character.hpp:154
virtual bool shouldCancelPreviousAi() const
Upon adding this Ai package, should the Ai Sequence attempt to cancel previous Ai packages (default t...
Definition: aibreathe.hpp:24
virtual bool execute(const MWWorld::Ptr &actor, CharacterController &characterController, AiState &state, float duration)
Definition: aibreathe.cpp:20
AiPackage to have an actor resurface to breathe.
Definition: aibreathe.hpp:10
virtual int getTypeId() const
Definition: aibreathe.cpp:46
virtual unsigned int getPriority() const
Higher number is higher priority (0 being the lowest)
Definition: aibreathe.cpp:51
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
virtual AiBreathe * clone() const
Clones the package.
Definition: aibreathe.cpp:41