OnComeInvisible

using UnityEngine;
using System.Collections;

public class LOVE : MonoBehaviour {

bool mVisible = true;

// Use this for initialization
void Start()
{

}

// Update is called once per frame
void Update()
{
if (mVisible)
{
// Debug.Log("CubeRed Update");
}

}

void OnBecameVisible()
{
Debug.Log("CubeRed OnBecameVisible");
mVisible = true;
}

void OnBecameInvisible()
{
Debug.Log("CubeRed OnBecameInvisible");
mVisible = false;
}

}

posted @ 2016-08-31 11:43  Fei非非  阅读(146)  评论(0编辑  收藏  举报