foreach http://blog.csdn.net/byondocean/article/details/6871881

yield  http://www.cnblogs.com/CareySon/archive/2009/12/16/1625469.html

unity切换摄像机(两个摄像机都要绑定)

using UnityEngine;
using System.Collections; public class test2 : MonoBehaviour {
public GameObject Maincamel; //// 通过在可视化界面中拖拽赋值
public GameObject Nextcamel;
// Use this for initialization
void Start () { } // Update is called once per frame
void Update () {
if (Input.GetKeyUp(KeyCode.Alpha1))
{
AllCamelFalse();
Maincamel.SetActive(true); /// // SetActive 属性置为false之后对象绑定的脚本也讲不执行
}
if (Input.GetKeyUp(KeyCode.Alpha2))
{
AllCamelFalse();
Nextcamel.SetActive(true);
} }
void AllCamelFalse()
{
Maincamel.SetActive(false);
Nextcamel.SetActive(false);
}
}

防止长武器与墙壁 重叠   http://www.mycmessia.com/2016/06/27/%E7%AC%AC%E4%B8%80%E4%BA%BA%E7%A7%B0%E5%B0%84%E5%87%BB%E6%B8%B8%E6%88%8F%E5%A6%82%E4%BD%95%E9%98%B2%E6%AD%A2%E8%B7%9D%E7%A6%BB%E8%BF%87%E8%BF%91%E6%97%B6%E6%AD%A6%E5%99%A8%E5%92%8C%E5%A2%99%E9%87%8D/

关于unity摄像机的一些使用  http://www.cfanz.cn/index.php?c=article&a=read&id=72433

使用UGUI做列表 http://www.cnblogs.com/neverdie/p/unity_ui_framework.html

http://blog.csdn.net/byondocean/article/details/6871881

iTween  http://www.xuanyusong.com/archives/2052   需要下载该插件先

http://www.cnblogs.com/clar/p/5692062.html  unity常用事件

GetCompent     http://blog.csdn.net/kaixindragon/article/details/44776451

http://www.ceeger.com/Script/GameObject/GameObject.GetComponent.html

Instantiate实例化出的对象是Object类型,需要强制转换一下,as强制把前面的东西转换成后面的

U3D】Unity3D的脚本-script入门   http://blog.163.com/shininglore@126/blog/static/961841802013412101454833/

 //获取目标位置
mTarget = transform.position;
//获取屏幕坐标
mScreen = Camera.main.WorldToScreenPoint(mTarget);
//将屏幕坐标转化为GUI坐标
mPoint = new Vector2(mScreen.x, Screen.height - mScreen.y);
 //炫酷的字体
GUIStyle frontStyle = new GUIStyle();
List<Transform> Body = new List<Transform>();//Transform的表
//保证目标在摄像机前方
if (mScreen.z > )
{
//GUI.color = Color.blue;
//内部使用GUI坐标进行绘制
frontStyle.fontSize = ;
frontStyle.normal.background = null;//设置背景填充
frontStyle.normal.textColor = new Color(, , );//设置字体颜色
GUI.Label(new Rect(, , ContentWidth, ContentHeight), "分数为" + Value.ToString(), frontStyle);
// mPoint.x,mPoint.y
}

Uuuuuunity的更多相关文章

随机推荐

  1. center os 文件读写权限

    五.使用chmod和数字改变文件或目录的访问权限文件和目录的权限表示,是用rwx这三个字符来代表所有者.用户组和其他用户的权限.有时候,字符似乎过于麻烦,因此还有另外一种方法是以数字来表示权限,而且仅 ...

  2. iOS开发 | 自定义不规则label

    其中有一个不太规则的label:   image.png 这个label顶部的两个角是圆角,底部的两个角是直角,底部还有一个小三角. 思路 CAShapeLayer联合UIBezierPath画一个不 ...

  3. C/C++使用Socket通信UDP

    接收端 #include <stdio.h> #include <WinSock2.h> #pragma comment(lib,"WS2_32.lib") ...

  4. Java学习笔记十四:如何定义Java中的类以及使用对象的属性

    如何定义Java中的类以及使用对象的属性 一:类的重要性: 所有Java程序都以类class为组织单元: 二:什么是类: 类是模子,确定对象将会拥有的特征(属性)和行为(方法): 三:类的组成: 属性 ...

  5. narcissus

    public class narcissus { public static void main(String args[]) { long u=0,t=0,h=0,y=0,k=0; for(long ...

  6. Redis 在springBoot中的一个使用示例

    在现系统中使用了一个字典表,更新或插入字典表需要做Redis缓存 @Override @Cache(name = Constants.REDIS_PREFIX_DIC, desc = "变更 ...

  7. Codeforces 845 C Two TVs

    参考:https://blog.csdn.net/xjh_shin/article/details/77491693 #include <iostream> #include <cs ...

  8. python2.7练习小例子(二十一)

        21):1.题目:两个乒乓球队进行比赛,各出三人.甲队为a,b,c三人,乙队为x,y,z三人.已抽签决定比赛名单.有人向队员打听比赛的名单.a说他不和x比,c说他不和x,z比,请编程序找出三队 ...

  9. 4368: [IOI2015]boxes纪念品盒

    4368: [IOI2015]boxes纪念品盒 链接 分析 链接 代码 #include<bits/stdc++.h> using namespace std; typedef long ...

  10. P2212 [USACO14MAR]浇地Watering the Fields

    P2212 [USACO14MAR]浇地Watering the Fields 题目描述 Due to a lack of rain, Farmer John wants to build an ir ...