Ejemplo n.º 1
0
 void Start()
 {
     weaponSfx = GetComponent <WeaponSFX>();
     foreach (ProjectilePool projectilePool in projectilePools)
     {
         projectileStacks.Add(new Stack <GameObject>(projectilePool.projectiles));
     }
 }
Ejemplo n.º 2
0
    private void Awake()
    {
        Debug.Log("Weapon Awake");
        weaponUI  = GetComponent <WeaponUI>();
        weaponSFX = GetComponent <WeaponSFX>();

        weaponGFXgameObject = transform.Find("GFX").gameObject;
        weaponUIgameObject  = transform.Find("Canvas").gameObject;

        //Enable UI and Disable GFX
        weaponUIgameObject.SetActive(true);
        weaponGFXgameObject.SetActive(false);

        timeLeftToSpawn  = weaponDetails.timeToConstruct;
        currentShootRate = weaponDetails.shootRate;

        //ADD GIZMO
        gameObject.AddComponent <WeaponGizmo>().radius = weaponDetails.weaponRadius;
    }
Ejemplo n.º 3
0
 private void Start()
 {
     flash = transform.Find("Flash").gameObject;
     sfx   = GetComponent <WeaponSFX>();
 }