Added new sounds needed for game
Added blackhole swirl texture and materials Added Magnet, Hunter and Drop core powerups and script overhaul for powerups in general Added Scenes and Cinematic changes for the game, win and death screens Added a score Changed the way enemy spawns work Removed unused scripts
This commit is contained in:
41
Assets/Scripts/Other/GoTextFadeHelper.cs
Normal file
41
Assets/Scripts/Other/GoTextFadeHelper.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GoTextFadeHelper : MonoBehaviour
|
||||
{
|
||||
private bool _nowActive = false;
|
||||
public float fadeTime;
|
||||
private TimerHelper _fadeTimer;
|
||||
|
||||
public AudioSource sfxAudioSource;
|
||||
public AudioClip startAudioClip;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_fadeTimer = new TimerHelper(fadeTime, false);
|
||||
}
|
||||
|
||||
public void StartFade()
|
||||
{
|
||||
_nowActive = true;
|
||||
if (sfxAudioSource != null && startAudioClip != null)
|
||||
{
|
||||
sfxAudioSource.clip = startAudioClip;
|
||||
sfxAudioSource.Play();
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (_nowActive)
|
||||
{
|
||||
if (_fadeTimer.HasTicked(Time.deltaTime))
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user