Unityで2Dシューティングゲームを作ってます。
今回はTriggerEnterでプレイヤーがNormalStageに当たった時の処理をしたいので、OnTriggerEnter2Dでプログラムを組んでいるのですが、書いた通りに処理してくれません。
今回はちゃんと普通にDebug.Log()だけなら表示したので、プログラムの書き方の問題だと思います。
よろしくお願いします。
using UnityEngine;
using System.Collections;
public class PPP : MonoBehaviour {
// Use this for initialization void Start () { } // Update is called once per frame void Update () { } void OnTriggerEnter2D(Collider2D C) { if (C == GameObject.FindGameObjectWithTag("NormalStage")) { Debug.Log("NormalStageSuccess"); } }
}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/09/28 04:50