コード例 #1
0
    private IEnumerator Incubate()
    {
        float wait = 10f;

        yield return(new WaitForSeconds(wait));

        GameObject burd = Instantiate(GameManager.Instance.burbPrefab, transform.parent);

        burd.name = "Burd";
        burd.transform.position = transform.position;

        Burb b = burd.GetComponent <Burb>();

        yield return(null);

        Destroy(this.gameObject);
    }
コード例 #2
0
ファイル: Player.cs プロジェクト: benviss/Chicken-Game
 // Start is called before the first frame update
 void Start()
 {
     controller = GetComponent <PlayerController>();
     burb       = GetComponent <Burb>();
 }