Пример #1
0
 void Start()
 {
     pulseReady       = true;
     weapon           = GameObject.Find("Extraction_Rifle").GetComponent <Weapon>();
     aimScript        = GameObject.Find("Player_Animations_with_rifle").GetComponent <AimDownSight>();
     controller       = GetComponent <CharacterController>();
     anim             = GetComponent <Animator>();
     playerStats      = GetComponent <PlayerStats>();
     Cursor.visible   = false;
     Cursor.lockState = CursorLockMode.Confined;
 }
Пример #2
0
 void assignSecondaryFunction()
 {
     if (_weaponStats.IsADS)
     {
         _ADSFunction = GetComponent <AimDownSight>();
         if (_ADSFunction == null)
         {
             Debug.LogError("No ADS script!");
         }
     }
     else
     {
         _scopeFunction = GetComponent <ScopeIn>();
         if (_scopeFunction == null)
         {
             Debug.LogError("No ScopeIn script!");
         }
     }
 }