首页 > 代码库 > OnComeInvisible

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;
}

}

OnComeInvisible