Example #1
0
 /// <summary>
 /// Display level up box
 /// in gameplay screeen.
 /// </summary>
 /// <param name="weaponData">PlasmaGun - wreapon scriptable object data</param>
 /// <param name="levelUpNots">string[] - level up notifications to be displayed.</param>
 public void DisplayBox(PlasmaGun weaponData, string[] levelUpNots)
 {
     if (!displayed && _displayRoutine == null)
     {
         _displayRoutine = StartCoroutine(DisplayBoxRoutine(weaponData, levelUpNots));
     }
 }
Example #2
0
    /// <summary>
    /// Display level up box
    /// in gameplay screeen
    /// coutine.
    /// </summary>
    /// <param name="weaponData">PlasmaGun - wreapon scriptable object data</param>
    /// <param name="levelUpNots">string[] - level up notifications to be displayed.</param>
    /// <returns>IEnumerator</returns>
    public IEnumerator DisplayBoxRoutine(PlasmaGun weaponData, string[] levelUpNots)
    {
        weaponImage.sprite = weaponData.icon;
        weaponName.UpdateContent(weaponData.nameEn);        // TODO: Check for spanish.
        levelUpText.UpdateContent(reachedLevelTextEn + " " + weaponData.level.ToString());

        _anim.SetBool("Displayed", true);
        yield return(new WaitForSeconds(1f));

        // display notifications.
        levelUpFeatures.DisplayElements(levelUpNots);
        displayed       = true;
        _displayRoutine = null;
    }
    //Sets up Referances
    void Awake()
    {
        muzzleFlash = GetComponentInChildren <ParticleSystem>();
        enemyHealth = GetComponent <EnemyHealth>();
        zanicHealth = GetComponent <ZanicHealth>();
        gunAudio    = GetComponent <AudioSource>();
        shotgunPU   = GetComponent <ShotgunPowerup>();
        plasmagunPU = GetComponent <PlasmagunPowerup>();
        plasmagun   = PlayersPlasmagun.GetComponent <PlasmaGun>();
        minigunPU   = GetComponent <MinigunPowerUp>();
        RingPU      = GetComponent <RingPowerup>();
        startTarget = GetComponent <StartTarget>();

        gunFire = GetComponentInChildren <Animation>();
        zem     = GetComponent <ActivateZem>();
    }
Example #4
0
    void Awake()
    {
        shotgunflash = GetComponentInChildren <ParticleSystem>();
        shotgunstart = GetComponent <AudioSource>();
        enemyHealth  = GetComponent <EnemyHealth>();
        gunAudio     = GetComponent <AudioSource>();
        shotgunPU    = GetComponent <ShotgunPowerup>();
        plasmagun    = playersPlasmagun.GetComponent <PlasmaGun>();
        plasmagunPU  = GetComponent <PlasmagunPowerup>();
        flamer       = playersFlamer.GetComponent <FlameThrower2>();
        minigun      = playersMinigun.GetComponent <Minigun>();
        gunFire      = GetComponentInChildren <Animation>();
        // gunFire = GetComponentInChildren<Animation>();

        zanicHealth = GetComponent <ZanicHealth>();
        RingPU      = GetComponent <RingPowerup>();

        zem = GetComponent <ActivateZem>();

        // Start is called before the first frame update
    }
 void Awake()
 {
     plasmagun    = GetComponent <PlasmaGun>();
     shotgun      = GetComponent <Shotgun>();
     flameThrower = GetComponent <FlameThrower2>();
 }