// Start is called before the first frame update.
 void Start()
 {
     currentAmmoReadout       = GameObject.Find("Current Ammo").GetComponent <Text>();
     reserveAmmoReadout       = GameObject.Find("Reserve Ammo").GetComponent <Text>();
     currentGunDisplayName    = GameObject.Find("Reserve Ammo").GetComponent <Text>();
     firstPersonGunController = player.GetComponentInChildren <FirstPersonGunController>();
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     audioSource = GetComponent <AudioSource>();
     gargoyle    = GameObject.FindGameObjectWithTag("Gargoyle").GetComponent <GargoyleController>();
 }
Пример #3
0
 // Initialize Controller.
 void Start()
 {
     gunController = GetComponentInChildren <FirstPersonGunController>();
     character     = transform.parent.gameObject;
     parentLastPos = transform.parent.position;
     playerCamera  = GetComponent <Camera>();
 }
Пример #4
0
 // Start is called before the first frame update.
 void Start()
 {
     gunController = transform.parent.GetComponentInChildren <FirstPersonGunController>();
     playerLayer   = 1 << 10;
     playerLayer   = ~playerLayer;
     spreadCurrent = spreadMin;
 }
Пример #5
0
 // Start is called before the first frame update
 void Start()
 {
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     warehouse   = GameObject.FindGameObjectWithTag("Warehouse").GetComponentInChildren <WarehouseController>();
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     //discriptionText.enabled = false;
 }
Пример #6
0
 void Start()
 {
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     ScifiGun    = player.ScifiGun;
     rb          = GetComponent <Rigidbody>();
     rb.velocity = transform.forward.normalized * speed;
 }
Пример #7
0
 // Start is called before the first frame update
 void Start()
 {
     start       = GameObject.FindGameObjectWithTag("KnifeStart").GetComponent <Transform>();
     finish      = GameObject.FindGameObjectWithTag("KnifeFinish").GetComponent <Transform>();
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     weaponOut   = GameObject.FindGameObjectWithTag("WeaponOut").GetComponent <Transform>();
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     audioSource = GetComponent <AudioSource>();
 }
Пример #8
0
 // Start is called before the first frame update
 void Start()
 {
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     boxTop      = GameObject.FindGameObjectWithTag("BoxTop");
     spawner     = GameObject.FindGameObjectWithTag("WeaponBoxSpawner").GetComponent <WeaponBoxSpawner>();
     discription = GameObject.Find("Discription").GetComponent <Text>();
     audioSource = GetComponent <AudioSource>();
 }
Пример #9
0
 // Start is called before the first frame update
 void Start()
 {
     player         = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     TitanSphere    = transform.GetChild(1).gameObject;
     ReptileSphere  = transform.GetChild(0).gameObject;
     MagmadarSphere = transform.GetChild(2).gameObject;
     TitanSphere.SetActive(false);
     ReptileSphere.SetActive(false);
     MagmadarSphere.SetActive(false);
 }
Пример #10
0
 // Start is called before the first frame update
 void Start()
 {
     player    = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     redKey    = transform.GetChild(0).gameObject;
     yellowKey = transform.GetChild(1).gameObject;
     blueKey   = transform.GetChild(2).gameObject;
     redKey.SetActive(false);
     yellowKey.SetActive(false);
     blueKey.SetActive(false);
 }
 void Start()
 {
     animator    = GetComponent <Animator>();
     boxCollider = GetComponent <BoxCollider>();
     rigidBody   = GetComponent <Rigidbody>();
     agent       = GetComponent <NavMeshAgent>();
     target      = GameObject.FindGameObjectWithTag(targetTag).transform;
     gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     InitCharacter();
 }
Пример #12
0
    // Start is called before the first frame update

    /**void Start()
     * {
     *  animator = GetComponent<Animator>();
     *  rigidbody = GetComponent<Rigidbody>();
     *  agent = GetComponent<NavMeshAgent>();
     *
     *  audiosource = GetComponent<AudioSource>();
     *  target = GameObject.FindGameObjectWithTag(targetTag).transform;
     *  gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameManager>();
     *  player = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren<FirstPersonGunController>();
     *  InitCharacter();
     * }**/

    void OnEnable()
    {
        animator  = GetComponent <Animator>();
        rigidbody = GetComponent <Rigidbody>();
        agent     = GetComponent <NavMeshAgent>();

        audiosource = GetComponent <AudioSource>();
        target      = GameObject.FindGameObjectWithTag(targetTag).transform;
        gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
        player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
        InitCharacter();
    }
Пример #13
0
 // Start is called before the first frame update
 void Start()
 {
     animator        = GetComponent <Animator>();
     rigidbody       = GetComponent <Rigidbody>();
     agent           = GetComponent <NavMeshAgent>();
     meshCollider    = GetComponent <MeshCollider>();
     audiosource     = GetComponent <AudioSource>();
     bossBGMSource   = GameObject.FindGameObjectWithTag("BossAudioSource").GetComponent <AudioSource>();
     capsuleCollider = GameObject.FindGameObjectWithTag("TitanHead").GetComponent <CapsuleCollider>();
     target          = GameObject.FindGameObjectWithTag(targetTag).transform;
     gameManager     = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     player          = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     InitCharacter();
 }
Пример #14
0
    void OnEnable()
    {
        animator        = GetComponent <Animator>();
        boxCollider     = GetComponent <BoxCollider>();
        capsuleCollider = transform.Find("Head").gameObject.GetComponent <CapsuleCollider>();
        rigidbody       = GetComponent <Rigidbody>();
        agent           = GetComponent <NavMeshAgent>();
        audiosource     = GetComponent <AudioSource>();

        target       = GameObject.FindGameObjectWithTag(targetTag).transform;
        targetPlayer = GameObject.FindGameObjectWithTag("Player").transform;
        gameManager  = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
        player       = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
        warehouse    = GameObject.FindGameObjectWithTag("Warehouse").GetComponentInChildren <WarehouseController>();
        InitCharacter();
    }
Пример #15
0
 // Start is called before the first frame update
 void Start()
 {
     animator         = GetComponent <Animator>();
     rigidbody        = GetComponent <Rigidbody>();
     agent            = GetComponent <NavMeshAgent>();
     audiosource      = GetComponent <AudioSource>();
     bossBGMSource    = GameObject.FindGameObjectWithTag("BossAudioSource2").GetComponent <AudioSource>();
     capsuleColliders = GetComponentsInChildren <CapsuleCollider>();
     boxColliders     = GetComponentsInChildren <BoxCollider>();
     target           = GameObject.FindGameObjectWithTag(targetTag).transform;
     gameManager      = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>();
     player           = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     fire             = GameObject.FindGameObjectsWithTag("Fire");
     fire[0].SetActive(false);
     fire[1].SetActive(false);
     InitCharacter();
 }
 // Start is called before the first frame update
 void Start()
 {
     player      = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
     weaponBox   = GameObject.FindGameObjectWithTag("WeaponBox").GetComponentInChildren <WeaponBoxController>();
     discription = GameObject.Find("Discription").GetComponent <Text>();
     if (weaponBox.choosedIndex == 0)
     {
         M4A1 = player.M4A1;
     }
     if (weaponBox.choosedIndex == 1)
     {
         LMG = player.LMG;
     }
     if (weaponBox.choosedIndex == 2)
     {
         ScifiGun = player.ScifiGun;
     }
     audioSource = GetComponent <AudioSource>();
 }
 // Start is called before the first frame update.
 void Start()
 {
     currentGunDisplayName    = GameObject.Find("Current Gun").GetComponent <Text>();
     firstPersonGunController = player.GetComponentInChildren <FirstPersonGunController>();
 }
Пример #18
0
 // Start is called before the first frame update
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <FirstPersonGunController>();
 }