using UnityEngine;
using System.Collections;

public class PlayerController:MonoBehaviour
{
    public UnityEngine.UI.Text winText;
    void Start(){
        winText.text = "You Win!";
        winText.gameObject.SetActive (false); //hide winText
    }

   ....
   
    void OnTriggerEnter(Collider other){
        if (other.gameObject.tag == "Coin") {
            other.gameObject.SetActive(false); //hide coin
         winText.gameObject.SetActive(true); //show winText
            
        }

}

}

最新文章

  1. 如何权衡自己的angular水准
  2. OncrickListener的实现
  3. JSP 核心标签库
  4. 安卓和ios的lineheight的不一样如何解决?
  5. WPF中多个RadioButton绑定到一个属性
  6. PHP Code Reviewing Learning
  7. IO流 总结三
  8. 您可能不知道的ASP.Net小技巧
  9. PHP+Mysql-表单数据插入数据库及数据提取完整过程
  10. Spyder调试错误-"TypeError: decoding Unicode is not supported"
  11. PC或者手机弹出窗效果
  12. 使用Spring Boot Actuator、Jolokia和Grafana实现准实时监控
  13. ZOJ 4097 Rescue the Princess
  14. list按照某个元素进行排序
  15. HTML超级链接详细讲解
  16. Stack&&Queue
  17. 全网最详细的Windows系统里PLSQL Developer 64bit的下载与安装过程(图文详解)
  18. Rx编程的第一步是将native对象转换为monad对象
  19. C 语言 static、extern与指针函数介绍
  20. 分布式系统的烦恼------《Designing Data-Intensive Applications》读书笔记11

热门文章

  1. C语言:strcpy()和memcpy()
  2. [android错误] requires API level *
  3. Python网络爬虫 - 下载图片
  4. Internal Server Error: /favicon.ico 的解决方法
  5. Java从零开始学四十(反射简述一)
  6. python之函数用法basestring
  7. servlet Servlet例子
  8. &和&&的一点区别
  9. wordpress调用函数大全
  10. LRM-00109-ORACLE启动报错