码迷,mamicode.com
首页 > 其他好文 > 详细

OnComeInvisible

时间:2016-08-31 13:49:00      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:

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

标签:

原文地址:http://www.cnblogs.com/ZeroMurder/p/5825302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!