@mm2021 mm2021 / BubbleUp.cs
Created at Wed Jun 30 13:38:17 JST 2021
消去される基準を位置から離れた時に変更
BubbleUp.cs
Raw
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BubbleUp : MonoBehaviour
{

    private Vector3 _moveVelocity;

    // Update is called once per frame
    private void Update()
    {
        this.transform.position += new Vector3(0, 1, 0);

        if(this.transform.position.y >= 200)
        {
            Destroy(gameObject);
        }
    }
}