Exemplo n.º 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public FSMStatePatrol()
 {
     mSetTargetObjectMsg    = new PathFollow.SetTargetObjectMessage();
     mGetTileAtPositionMsg  = new Level.GetTileAtPositionMessage();
     mSetDestinationMsg     = new PathFind.SetDestinationMessage();
     mSetSourceMsg          = new PathFind.SetSourceMessage();
     mSetActiveAnimationMsg = new SpriteRender.SetActiveAnimationMessage();
     mSetStateMsg           = new FiniteStateMachine.SetStateMessage();
 }
Exemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public FSMStateWaitAtStandingPosition(String popupScript)
        {
            mPopupScript = popupScript;

            mSetActiveAnimationMsg = new SpriteRender.SetActiveAnimationMessage();
            mGetTileAtObjectMsg    = new Level.GetTileAtObjectMessage();
            mGetAttachmentPointMsg = new SpriteRender.GetAttachmentPointMessage();
            mOnPopupCloseMsg       = new StrandedPopup.OnPopupClosedMessage();
            mSetStateMsg           = new FiniteStateMachine.SetStateMessage();
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 public FSMStateGoToExtraction()
 {
     mSetActiveAnimationMsg        = new SpriteRender.SetActiveAnimationMessage();
     mSetDestinationMsg            = new PathFind.SetDestinationMessage();
     mSetSourceMsg                 = new PathFind.SetSourceMessage();
     mGetCurrentBestNodeMsg        = new PathFind.GetCurrentBestNodeMessage();
     mGetExtractionPointMsg        = new ZombieTaxi.Behaviours.FSMCivilian.GetExtractionPointMessage();
     mIncrementScoreMsg            = new PlayerScore.IncrementScoreMessage();
     mIncrementScoreMsg.mAmount_In = 500;
     mClearDestinationMsg          = new PathFind.ClearDestinationMessage();
     mSetTargetObjectMsg           = new PathFollow.SetTargetObjectMessage();
     mSetStateMsg = new FiniteStateMachine.SetStateMessage();
 }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FSMStateGoToStandingPosition()
        {
            mValidSafeHouses = new List <GameObject>(100);

            mSetActiveAnimationMsg    = new SpriteRender.SetActiveAnimationMessage();
            mSetDestinationMsg        = new PathFind.SetDestinationMessage();
            mSetSourceMsg             = new PathFind.SetSourceMessage();
            mGetCurrentBestNodeMsg    = new PathFind.GetCurrentBestNodeMessage();
            mClearDestinationMsg      = new PathFind.ClearDestinationMessage();
            mSetTargetObjectMsg       = new PathFollow.SetTargetObjectMessage();
            mSetStateMsg              = new FiniteStateMachine.SetStateMessage();
            mGetTileAtObjectMsg       = new Level.GetTileAtObjectMessage();
            mIncrementScoreMsg        = new PlayerScore.IncrementScoreMessage();
            mGetSafeHouseScoreMessage = new Behaviours.FSMCivilian.GetSafeHouseScoreMessage();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FSMStateRepair()
        {
            mDamagedTiles        = new List <Level.Tile>(16);
            mFoundTileObjects    = new List <GameObject>(1);
            mTileClassifications = new List <GameObjectDefinition.Classifications>(1);
            mTileClassifications.Add(GameObjectDefinition.Classifications.WALL);

            mSetTargetObjectMsg    = new PathFollow.SetTargetObjectMessage();
            mGetTileAtPositionMsg  = new Level.GetTileAtPositionMessage();
            mSetDestinationMsg     = new PathFind.SetDestinationMessage();
            mSetSourceMsg          = new PathFind.SetSourceMessage();
            mSetActiveAnimationMsg = new SpriteRender.SetActiveAnimationMessage();
            mSetStateMsg           = new FiniteStateMachine.SetStateMessage();
            mGetHealthMsg          = new Health.GetHealthMessage();
            mSetTileToRepairMsg    = new FSMEngineer.SetTileToRepairMessage();
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public FSMStateFollowTarget(String animationName)
        {
            mAnimationName = animationName;

            // We need to detect when the GameObject reaches a safe house and to do so we need
            // to do a collision check against all objects of a particular classification, in this
            // case "SAFE_HOUSE".  We preallocate the two lists needed to do the check to avoid
            // triggering the GC.
            mSafeHouseInRange         = new List <GameObject>(16);
            mSafeHouseClassifications = new List <GameObjectDefinition.Classifications>();
            mSafeHouseClassifications.Add(GameObjectDefinition.Classifications.SAFE_HOUSE);

            mSetActiveAnimationMsg    = new SpriteRender.SetActiveAnimationMessage();
            mSetDestinationMsg        = new PathFind.SetDestinationMessage();
            mSetSourceMsg             = new PathFind.SetSourceMessage();
            mGetCurrentBestNodeMsg    = new PathFind.GetCurrentBestNodeMessage();
            mClearDestinationMsg      = new PathFind.ClearDestinationMessage();
            mIncrementScoreMsg        = new PlayerScore.IncrementScoreMessage();
            mSetTargetObjectMsg       = new PathFollow.SetTargetObjectMessage();
            mGetTileAtObjectMsg       = new Level.GetTileAtObjectMessage();
            mGetSafeHouseScoreMessage = new Behaviours.FSMCivilian.GetSafeHouseScoreMessage();
            mSetStateMsg = new FiniteStateMachine.SetStateMessage();
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 public FSMStateResearchStatBoost()
 {
     mSetTargetMsg       = new StatBoostResearch.SetTargetMessage();
     mGetTileAtObjectMsg = new Level.GetTileAtObjectMessage();
     mSetStateMsg        = new FiniteStateMachine.SetStateMessage();
 }
Exemplo n.º 8
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public FSMStateWaitAtTarget()
 {
     mGetAttachmentPointMsg = new SpriteRender.GetAttachmentPointMessage();
     mSetActiveAnimationMsg = new SpriteRender.SetActiveAnimationMessage();
     mSetStateMsg           = new FiniteStateMachine.SetStateMessage();
 }