Пример #1
0
 void Awake()
 {
     // Determine which components this weapon will have
     _cartridgeSpawPoint = GetComponentInChildren <CartridgeSpawnPoint>();
     if (_cartridgeSpawPoint == null)
     {
         Debug.LogWarning("There is no Cartridge Spawn Point defined in the weapon");
     }
     _shootSpawnPoint = GetComponentInChildren <ShootSpawnPoint>();
     if (_shootSpawnPoint == null)
     {
         Debug.LogWarning("There is no Shoot Spawn Point defined in the weapon");
     }
     _spotlightSpawnPoint = GetComponentInChildren <SpotLightSpawnPoint>();
     if (_spotlightSpawnPoint == null)
     {
         Debug.LogWarning("There is no SpotLight Spawn Point defined in the weapon");
     }
 }
Пример #2
0
 // Setup the required variables
 public void Setup(CartridgeSpawnPoint cartridgeSpawnPoint, GameObject shootPrefab)
 {
     _cartridgeSpawnPoint = cartridgeSpawnPoint;
     _shootPrefab         = shootPrefab;
 }