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:
33
Assets/Scripts/Other/StaticImageAnimationHelper.cs
Normal file
33
Assets/Scripts/Other/StaticImageAnimationHelper.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class StaticImageAnimationHelper : MonoBehaviour
|
||||
{
|
||||
public Image uiImageHolder;
|
||||
public List<Sprite> sprites = new List<Sprite>();
|
||||
public float frameTime;
|
||||
|
||||
private int _currentFrame;
|
||||
private TimerHelper _frameTimer;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
_currentFrame = 0;
|
||||
_frameTimer = new TimerHelper(frameTime);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (uiImageHolder != null)
|
||||
{
|
||||
if (_frameTimer.HasTicked(Time.deltaTime))
|
||||
{
|
||||
uiImageHolder.sprite = sprites[_frameTimer.TimesRun % sprites.Count];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user