Sounds added

This commit is contained in:
Logic Monkey
2018-04-22 19:11:55 -04:00
parent c6b700f51e
commit 47713e6012
50 changed files with 1979 additions and 146 deletions
+29
View File
@@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LollipopSaysHi : MonoBehaviour {
float timeAccumulated;
public float timeTillWave = 10;
// Use this for initialization
Animator a;
void Start () {
timeAccumulated = Random.Range(0, timeTillWave);
a = GetComponent<Animator>();
}
// Update is called once per frame
void Update () {
timeAccumulated += Time.deltaTime;
if (timeAccumulated >= timeTillWave)
{
if (Random.Range(0, 2) == 0)
{
a.SetTrigger("SayHi");
}
timeAccumulated = 0;
}
}
}