Exemplo n.º 1
0
 // Use this for initialization
 private void Start()
 {
     // Component reference assignments dependant on other scripts
     tankTf  = tankData.tankTf;
     mover   = tankData.tankMover;
     vision  = controller.vision;
     hearing = controller.hearing;
 }
Exemplo n.º 2
0
    /* Private Variables */

    private void Awake()
    {
        // Component reference assignments
        tankData  = this.gameObject.GetComponent <TankData>();
        behaviors = this.gameObject.GetComponent <AIBehaviors>();
        vision    = this.gameObject.GetComponent <AIVision>();
        hearing   = this.gameObject.GetComponent <AIHearing>();
        roomData  = this.gameObject.GetComponentInParent <RoomData>();
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     fov              = GetComponent <FieldOfView>();
     aiHearing        = GetComponent <AIHearing>();
     NavAgent         = GetComponent <NavMeshAgent>();
     anim             = GetComponent <Animator>();
     civPatrol        = GetComponent <CivillianPatrol>();
     suspicionControl = GetComponent <CivilianSuspicionControl>();
     anim.SetBool("Alive", true);
 }
Exemplo n.º 4
0
    [HideInInspector] public RaycastHit obstacleHit;             // Raycast hit for obstacles (Includes the arena and other enemy tanks)

    public override void Start()
    {
        base.Start();
        characterController = GetComponent <CharacterController>();
        enemyData           = GetComponent <EnemyData>();
        //ptf = GameManager.instance.playerTank.GetComponent<Transform>();
        aiVision  = GetComponentInChildren <AIVision>();
        aiHearing = GetComponentInChildren <AIHearing>();

        // Set investigateTime, searchTime and waitTime to the default values saved in Enemy Data
        investigateTime = enemyData.investigateDuration;
        searchTime      = enemyData.searchDuration;
        waitTime        = enemyData.waitDuration;
        alertTime       = enemyData.alertDuration;
    }