Esempio n. 1
0
    IEnumerator Bugmove()
    {
        bug.SetActive(true);
        bug.transform.position = bugposi[0];
        timewatch = Time.time;
        while (Time.time - timewatch < bugmovetime)
        {
            bug.transform.position = (bugposi[1] - bugposi[0]) * (Time.time - timewatch) / bugmovetime + bugposi[0];
            yield return(null);
        }
        yield return(new WaitForSeconds(0.1f));

        bug.SetActive(false);
        itemdropcs.Cat_ItemDrop(catnum);
    }