示例#1
0
 public ZombieContextUpdater(TargetChaser chaser,
                             ITargetLocator targetLocator,
                             IPositionDetector positionDetector)
 {
     _chaser           = chaser;
     _targetLocator    = targetLocator;
     _positionDetector = positionDetector;
 }
    // Use this for initialization
    void Start()
    {
        initialPosition = new Vector3(
            transform.position.x,
            transform.position.y,
            transform.position.z);
        initialRotation = new Quaternion(
            transform.rotation.x,
            transform.rotation.y,
            transform.rotation.z,
            transform.rotation.w);

        chaser         = GetComponent <TargetChaser> ();
        chaser.enabled = false;

        xInput = GameObject.FindWithTag("Xbox Input").GetComponent <XboxInput> ();
    }
示例#3
0
 public FSMZombieBrain(ITimeProvider timeProvider,
                       ITargetLocator targetLocator,
                       StateMachineFactory stateMachineFactory,
                       TargetChaser targetChaser,
                       IAttacker attacker,
                       TimeSpan attackInterval,
                       IDoor[] doors,
                       IMover mover,
                       IPositionDetector positionDetector)
 {
     _timeProvider        = timeProvider;
     _targetLocator       = targetLocator;
     _stateMachineFactory = stateMachineFactory;
     _targetChaser        = targetChaser;
     _attacker            = attacker;
     _attackInterval      = attackInterval;
     _doors            = doors;
     _mover            = mover;
     _positionDetector = positionDetector;
 }
示例#4
0
 public FollowingState(TargetChaser targetChaser)
 {
     _targetChaser = targetChaser;
 }