示例#1
0
        public AIStateAttack(ArtificialIntelligence brains) : base(brains)
        {
            State = EAIState.Attack;

            _guardBrains           = (GuardBrains)brains;
            _guardBrains.RanAway  += GuardBrainsOnRanAway;
            DeathController.Death += OnDeath;
        }
示例#2
0
 public AIStateAlert(ArtificialIntelligence brains, float searchDistance, float alertTime) : base(brains)
 {
     _searchDistance       = searchDistance;
     _alertTime            = alertTime;
     State                 = EAIState.Alert;
     _timeInState          = alertTime;
     _guardBrains          = (GuardBrains)brains;
     _guardBrains.Spotted += GuardBrainsOnSpotted;
     _player               = GameObject.FindObjectOfType <Core.Characters.Player.PlayerBehaviour>();
 }
示例#3
0
        public AIStateWandering(ArtificialIntelligence brains, float searchDistance, Transform pathRoot, Image suspentionBar) : base(brains)
        {
            _searchDistance = searchDistance;
            State           = EAIState.Wandering;

            _movementController = new SequentialMovement(pathRoot.GetComponentsInChildren <Transform>(),
                                                         _masterBrain.MovableObject,
                                                         true);
            _bellCreepy    = Resources.Load <AudioClip>("Sounds/bellCreepy");
            _whispering    = Resources.Load <AudioClip>("Sounds/whisper");
            _effect        = GameObject.FindObjectOfType <NoiseEffect>();
            _player        = GameObject.FindObjectOfType <PlayerBehaviour>();
            _suspentionBar = suspentionBar;
            _guardBrains   = (GuardBrains)brains;
        }