Ошибка при запуске скрипта.
Вот скрипт
using System.Collections;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Threading;
using UnityEngine;
public class Cut : MonoBehaviour
{
private Animator anim;
private int time;
void Start()
{
StartCoroutine(tt());
anim = GetComponent();
}
void FixedUpdate ()
{
if (Input.GetKey(KeyCode.E)) Rep();
else if (time = 20)
{
time = 0;
anim.SetBool("Tree", false);
}
}
void Rep()
{
StartCoroutine(tt());
}
IEnumerator tt()
{
anim.SetBool("Tree", true);
while (time < 20)
{
time++;
}
Rep();
}
}
Вот ошибки
Assets\okrujenie\resyrs\tree\Cut.cs(26,18): error CS0029: Cannot implicitly convert type 'int' to 'bool'
-------------------------------------------------
Assets\okrujenie\resyrs\tree\Cut.cs(38,21): error CS0161: 'Cut.tt()': not all code paths return a value