EngediKimHyeYoung / Unity

0 stars 0 forks source link

공 그냥 날라오기 - Ball.cs #4

Open EngediKimHyeYoung opened 2 years ago

EngediKimHyeYoung commented 2 years ago

using System.Collections; using System.Collections.Generic; using UnityEngine;

public class Ball : MonoBehaviour { // Start is called before the first frame update void Start() { this.GetComponent().velocity = new Vector3(-8.0f, 8.0f, 0.0f); }

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

}

}

EngediKimHyeYoung commented 2 years ago

using System.Collections; using System.Collections.Generic; using UnityEngine;

public class Ball : MonoBehaviour { // Start is called before the first frame update void Start() { this.GetComponent().velocity = new Vector3(-8.0f, 8.0f, 0.0f); }

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

}
private void OnBecameInvisible()
{
    Destroy(this.gameObject);
}

}