Unity oyunu başlat tuşuna basıldığında Unity bozuluyor

emir97

Centipat
Katılım
16 Aralık 2020
Mesajlar
187
Daha fazla  
Cinsiyet
Erkek
Oyunu baya kodladım ama Unity oyunu çalıştıra her bastığımda çöküyor ne yapmalıyım bilmiyorum sürekli olarak bilgisayarı yeniden başlatmak zorunda kalıyorum lütfen yardım edin. (Bu arada flappy bird yapıyordum)😉


spawner kodları bunlar:
{

public GameObject borular;
public float higth;
public birdy birdy_script;
public float time;
// Start is called before the first frame update
void Start()
{
StartCoroutine(spawnobject(time));
}

// Update is called once per frame
void Update()
{

}
public IEnumerator spawnobject(float time)
{
while(!birdy_script.is_dead)
Instantiate(borular, new Vector3(3, Random.Range(-higth, higth), 0), Quaternion.identity);
yield return new WaitForSeconds(time);
}
}[/CODE]
[CODE title="kuşun kodları"]using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class birdy : MonoBehaviour
{
public float velocity = 1f;
public Rigidbody2D rb2d;
public bool is_dead;



void Start()
{

}


void Update()
{
if(Input.GetMouseButtonDown(0))
{
rb2d.velocity = Vector2.up * velocity;
}
}
}[/CODE]
[CODE lang="csharp" title="engel kodları"]using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class move : MonoBehaviour
{
public float speed;
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{
transform.position += Vector3.left * speed * Time.deltaTime;
}
}[/CODE]
 

Geri
Yukarı