unity 碰撞检测

using UnityEngine;
using System.Collections;

public class move : MonoBehaviour {

    // Use this for initialization
    void Start () {
    
    }
    
    // Update is called once per frame
    void Update () {
    
    }
    
    void OnCollisionEnter2D(Collision2D col)
    {
        UnityEngine.Debug.Log (col.gameObject);
    }
}

 

posted @ 2015-03-19 15:38  yufenghou  阅读(262)  评论(0编辑  收藏  举报