void Start()
    {
        _robot0Behaviour = _enemyRobots[0].GetComponent <EnemyRobotBehaviour>();
        _robot1Behaviour = _enemyRobots[1].GetComponent <EnemyRobotBehaviour>();

        _gunPickupScript          = this.gameObject.GetComponent <GunPickupScript>();
        _animator                 = this.gameObject.GetComponent <Animator>();
        _characterBehaviourScript = this.gameObject.GetComponent <CharacterBehaviourScript>();

        _charController = this.gameObject.GetComponent <CharacterController>();

        _aDSCamera.SetActive(false);
    }
示例#2
0
 //OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     _gunPickupScript = animator.gameObject.GetComponent <GunPickupScript>();
 }