コード例 #1
0
 internal override void reserve()
 {
     base.reserve();
     Belief bestCover = character_.AI_.Memory_.getFirstBelief(BeliefType.AvailableCover);
     cover_ = (bestCover.handle_ as CoverObject);
     ReservationTable.reserveResource(cover_, character_);
 }
コード例 #2
0
 public DetachFromCoverAction(CharacterAbstract character,
     AnimationInterface animation,
     String nextActionSet,
     Height nextHeight,
     float speed,
     string actionLevel)
 {
     character_ = character;
     animation_ = animation;
     priority_ = PRIORITY;
     coverObject_ = null;
     positionToMoveTo_ = Vector2.Zero;
     finished_ = false;
     speed_ = speed;
     nextActionSet_ = nextActionSet;
     nextHeight_ = nextHeight;
     actionLevel_ = actionLevel;
 }
コード例 #3
0
 public void setParameters(ActionParameters parameters)
 {
     coverObject_ = (CoverObject)parameters.object1;
 }
コード例 #4
0
 public void cover(CoverObject coverObject)
 {
     CoverActionInterface cover = (CoverActionInterface)actions_[currentActionSet_]["cover"];
     cover.setCover(coverObject);
     currentAction_ = currentAction_.interrupt(cover);
 }
コード例 #5
0
 public void setCoverObject(CoverObject coverObject)
 {
     currentCoverObject_ = coverObject;
 }
コード例 #6
0
 public virtual void setCoverObject(CoverObject cObj)
 {
     if (lastCoverObject_ == null || CommonFunctions.distance(lastCoverObject_.getPosition(), position_) >
             CommonFunctions.distance(cObj.getPosition(), position_))
     {
         lastCoverObject_ = cObj;
     }
 }