Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

If anyone is curious about the code for the Simon Says game, here it was (it literally ran everything from animations to logic and input):

using System.Collections;using System.Collections.Generic;using UnityEngine;class G:MonoBehaviour{[SerializeField]Animator a;List<int> s=new List<int>();bool p;void Start(){StartCoroutine("l");}bool k(string i)=>Input.GetButtonDown(i);void q(int c){a.SetTrigger(c);}IEnumerator l(){while (!p){yield return new WaitForSeconds(0.5f);int val=Random.Range(1,5);s.Add(val);q(val);foreach (var i in s){int c=0;while (c==0){if (k("R")) c=1;if (k("G")) c=2;if (k("Y")) c=3;if (k("B")) c=4;yield return null;}q(c);if (i!=c){p = true;break;}}}}