コード例 #1
0
	void OnTriggerEnter(Collider other){
		if (!trig && other.name == "Player")
		{
			trig = true;
			bgmScript = (BoxGameManagerScript) father.GetComponent( typeof(BoxGameManagerScript) );	
			bgmScript.Trigger();
		}
	}
コード例 #2
0
	// Use this for initialization
	void Start () {
		objPlayer = (GameObject) GameObject.FindWithTag ("Player");
		bgmScript = (BoxGameManagerScript) father.GetComponent( typeof(BoxGameManagerScript) );	
	}
コード例 #3
0
	// Use this for initialization
	void Start () {
		bgmScript = (BoxGameManagerScript) father.GetComponent( typeof(BoxGameManagerScript) );	
		xOff = bgmScript.xOffset;
		zOff = bgmScript.zOffset;
		transform.position = new Vector3(x+xOff,0,z+zOff);	
	}