c#질문 입니다.

조회수 400회
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class randomspawn : MonoBehaviour
{
    public GameObject poopPrefab;
    public float spawnInterval = 2f;

    private float timer = 0f;

    void Update()
    {
        timer -= Time.deltaTime;
        if (timer <= 0f)
        {
            SpawnPoop();
            timer -= spawnInterval;
        }
    }

    void SpawnPoop()
    {
        float randomX = Random.Range(-2.7f, 2.7f);
        Vector2 spawnPosition = new Vector2(randomX, 5.4f);
        Instantiate(poopPrefab, spawnPosition, Quaternion.identity);
    }
}

오브젝트가 너무 많이 많이 내려와요 이거 조금씩 내려오게 하는 방법 없나요?

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)