Ejemplo n.º 1
0
 void Start()
 {
     paremeter           = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <fps_PlayerParameter>();
     playerControl       = GameObject.FindGameObjectWithTag(Tags.player).GetComponent <fps_PlayerControl>();
     anim                = GetComponent <Animation>();
     flash               = this.transform.Find("muzzle_flash").GetComponent <MeshRenderer>();
     flash.enabled       = false;
     currentBllet        = bulletCount;
     currentChargeBullet = chargeBulletCount;
     bulletText.text     = currentBllet + "/" + currentChargeBullet;
 }
Ejemplo n.º 2
0
 void Start()
 {
     nav           = GetComponent <NavMeshAgent>();
     col           = GetComponentInChildren <SphereCollider>();
     anim          = GetComponent <Animator>();
     hash          = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent <HashIDs>();
     player        = GameObject.FindGameObjectWithTag(Tags.player);
     playerHealth  = player.GetComponent <fps_PlayreHealth>();
     playreControl = player.GetComponent <fps_PlayerControl>();
     fps_GunScript.playerShootEvent += ListenPlayer;
 }