/// <summary>
        /// Initialize the LocomotionTypes used by BotFlyable
        /// </summary>
        protected override void InitLocomotionTypes()
        {
            BotLogicNavMeshRef = new BotLogicNavMesh(BotFSMLocomotionComponent, NavMeshAgentComponent, JumpProximityChecker);
            BotLogicFlyingRef  = new BotLogicFlight(BotFSMLocomotionComponent, Flying3DObjectComponent);
            InitStates();

            BTFiniteStateMachineManagerComponent.AddFSM(FSMFlyable);
        }
Beispiel #2
0
        /*
         * /// <summary>
         * /// Turn on/off components depending if this bot is a host or a peer
         * /// </summary>
         * /// <param name="toggleKinematic">Should the IsKinematic value of a Rigidbody be toggled as well</param>
         * protected override void ToggleComponentsForNetwork(bool toggleKinematic = true)
         * {
         *  base.ToggleComponentsForNetwork(toggleKinematic);
         *
         *  if (_IsNetworkPeer)
         *  {
         *      NavMeshAgentComponent.enabled = false;
         *      if (CurrentStatesGround != StatesGround.NOTGROUNDED)
         *      {
         *          // IsFreefall = false;
         *          CurrentStatesGround = StatesGround.GROUNDED_NAVMESH_SUCCESS;
         *      }
         *  }
         *  else
         *  {
         *      HandleFailling();
         *  }
         *
         * }
         */

        /// <summary>
        /// Initialize the LocomotionTypes used by BotFlyable
        /// </summary>
        protected override void InitLocomotionTypes()
        {
            BotLogicNavMeshRef    = new BotLogicNavMesh(this, NavMeshAgentComponent, JumpProximityChecker);
            CurrentLocomotionType = BotLogicNavMeshRef;
        }