internal override void reserve() { base.reserve(); Belief bestCover = character_.AI_.Memory_.getFirstBelief(BeliefType.AvailableCover); cover_ = (bestCover.handle_ as CoverObject); ReservationTable.reserveResource(cover_, character_); }
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; }
public void setParameters(ActionParameters parameters) { coverObject_ = (CoverObject)parameters.object1; }
public void cover(CoverObject coverObject) { CoverActionInterface cover = (CoverActionInterface)actions_[currentActionSet_]["cover"]; cover.setCover(coverObject); currentAction_ = currentAction_.interrupt(cover); }
public void setCoverObject(CoverObject coverObject) { currentCoverObject_ = coverObject; }
public virtual void setCoverObject(CoverObject cObj) { if (lastCoverObject_ == null || CommonFunctions.distance(lastCoverObject_.getPosition(), position_) > CommonFunctions.distance(cObj.getPosition(), position_)) { lastCoverObject_ = cObj; } }