- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class BombChild : MonoBehaviour
- {
- public Vector3 velocity;
- void Update()
- {
- velocity.y += -9.8f * Time.deltaTime * 80;
- transform.localPosition += velocity * Time.deltaTime;
- if (transform.position.y < -(Screen.height / 10)) Destroy(gameObject);
- }
- }
|