void GoEast(GoEastEvent eventTest) { currentMat = 2; foreach (GameObject top in wallTops) { if (top != null) { topRender = top.GetComponentsInChildren <Renderer> (); foreach (Renderer rend in topRender) { rend.material.Lerp(rend.material, getColor(eventTest.emotion), 0.5f); } } } }
void GoEast(GoEastEvent eventTest) { Vector3 movement = new Vector3(1.0f, 0.0f, 0.0f); GetComponent <Rigidbody>().AddForce(movement * speed * Time.deltaTime); }