void Update() { if (clickable.IsClicked()) { forward = !forward; audioSource.Play(); } float deltaAngle = speed * myDeltaTime; if (forward) { if (angle + deltaAngle > maxAngle) { deltaAngle = maxAngle - angle; } } else { deltaAngle *= -1; if (angle + deltaAngle < minAngle) { deltaAngle = minAngle - angle; } } transform.RotateAround(realHinge, axis, deltaAngle); angle += deltaAngle; }
void Update() { if (clickable.IsClicked()) { active = !active; } radiusSphere.gameObject.SetActive(active); }
void Update() { if (clickable.IsClicked()) { if (narration != null) { FindObjectOfType <Narrator> ().PlayNext(narration); } } }
void Update() { if (clickable.IsClicked()) { primed = true; } if (primed) { life += myDeltaTime / lifeSpan; } UpdateMaterial(); }