void Update() { if (outputTest == true) { timeSystem = new Tai(90.0f, 30.0f, 70.0f); Debug.Log(timeSystem.getTime()); outputTest = false; } }
IEnumerator StartRoutine() { timeToWait = TAI.getTime(); // get time from TAI Debug.Log("Time to wait: " + timeToWait); fear = SAI.FireOnce(); // get fear from SAI Debug.Log("Fear: " + fear.getFear() + "Fear Type: " + fear.getFearType()); yield return(new WaitForSeconds(timeToWait)); //wait time from TAI Debug.Log("Wait over, implementing fear"); fear = doFear(fear); // implement fear doFear(new Fear("A", 50, 3, "Spawn")); yield return(new WaitForSeconds(1f)); //wait reactionScore = Reaction.checkReaction(fear, fear.returnObject()); //check reaction Debug.Log("Reaction Score: " + reactionScore); SAI.reballanceElement(fear, reactionScore); //send reaction score to reballance SAI yield return(new WaitForSeconds(5f)); StartCoroutine(StartRoutine()); //restart }