Beispiel #1
0
        /// <summary>
        /// On init we grab our CharacterMovement ability
        /// </summary>
        protected override void Initialization()
        {
            _characterMovement     = this.gameObject.GetComponentInParent <Character>()?.FindAbility <CharacterMovement>();
            _characterPathfinder3D = this.gameObject.GetComponentInParent <CharacterPathfinder3D>();
            _aiActionMovePatrol3D  = this.gameObject.GetComponent <AIActionMovePatrol3D>();

            GameObject backToPatrolBeacon = new GameObject();

            backToPatrolBeacon.name = this.gameObject.name + "BackToPatrolBeacon";
            _backToPatrolTransform  = backToPatrolBeacon.transform;
        }
Beispiel #2
0
 /// <summary>
 /// On awake we create a plane to catch our ray
 /// </summary>
 protected virtual void Awake()
 {
     _mainCamera            = Camera.main;
     _characterPathfinder3D = this.gameObject.GetComponent <CharacterPathfinder3D>();
     _playerPlane           = new Plane(Vector3.up, Vector3.zero);
 }
 /// <summary>
 /// On init we grab our CharacterMovement ability
 /// </summary>
 protected override void Initialization()
 {
     _characterMovement     = this.gameObject.GetComponent <CharacterMovement>();
     _characterPathfinder3D = this.gameObject.GetComponent <CharacterPathfinder3D>();
 }