我尝试在IEnumerator方法上使用StartCoroutine,但它不起作用。
它一直说该方法不能转换为字符串,但我并没有试图将其转换为字符串。这是我的代码:
StartCoroutine(PowerupCountdownRoutine());
IEnumerator PowerupCountdownRoutine()
{
yield return new WaitForSeconds(7);
hasPowerup = false
}
您应该在参数-StartCoroutine(nameof(PowerupCountdownRoutine))
中写入nameof(@name of the method@)