Adım 5: Oyuncuyu sahada tutun

Oyuncunun bir if-then ifadesi ile ekranın kenarından çıkmasını engellemeliyiz.

  • Update()'de, oyuncunun sol X pozisyonu belirli bir değerden küçükse bir if-ifadesi kontrolü yazın.
  • if ifadesinde, oyuncunun konumunu mevcut konumuna ayarlayın, ancak sabit bir X konumu ile

figures

Lesson discussion

Swap insights and ask questions about Unity Junior Programmer

Be the first to start the discussion

Ask a question or share your thoughts about this lesson.