Mostly finished, just needs sound, polish and hosting online

This commit is contained in:
2020-04-19 02:49:55 +10:00
parent a3b19da551
commit 499d572dfb
101 changed files with 14591 additions and 26 deletions

View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Claws : MonoBehaviour {
SpriteRenderer spriteRenderer;
void Awake() {
spriteRenderer = GetComponent<SpriteRenderer>();
StartCoroutine(FadeOverTime(2f));
StartCoroutine(SwitchScenesAfter("MainMenu", 5f));
}
IEnumerator FadeOverTime(float delay) {
while (true) {
Color color = spriteRenderer.color;
color.a -= delay / 60f;
spriteRenderer.color = color;
yield return new WaitForSeconds(delay / 60f);
}
}
IEnumerator SwitchScenesAfter(string sceneName, float delay) {
yield return new WaitForSeconds(delay);
SceneManager.LoadScene(sceneName);
}
}