文章分类 - Unity3D
摘要:1.向量 1.大小:transform.position.magnitude 2.方向:transform.position.normalized 3.向量运算 1.加 2.减 3.乘 4.除 5.点积 6.叉积 2.欧拉角 3.四元数 4.矩阵 5.三角函数
阅读全文
摘要:public abstract class Singleton where T : new() { private static T _instance; static object _lock = new object(); public static T Instance { get ...
阅读全文
摘要:using UnityEngine;using System;using System.IO;using System.Collections; public class IniParser{ private Hashtable keyPairs = new Hashtable(); p...
阅读全文
摘要:人物和摄像机之间存在例如墙壁等的阻挡时 可以修改阻挡材质的alpha呈现半透明状 1 using UnityEngine; 2 using System.Collections; 3 4 public class example : MonoBehaviour { 5 void Upda...
阅读全文
摘要:public Camera m_UICamera;public int m_Layer;public bool IsUILayer(){ if(m_UICamera== null) { m_UICamera= UICamera.currentCamer...
阅读全文
摘要:1 using UnityEngine; 2 using System.Collections; 3 4 public class BattleHurtNum : MonoBehaviour 5 { 6 7 public Vector3 mVec; 8 9 ...
阅读全文
摘要:Lua脚本绑定Unity的例子http://gfootweb.webspace.virginmedia.com/LuaDemo/
阅读全文
摘要:1 using UnityEngine; 2 using System.Collections; 3 4 public class MapTest : MonoBehaviour 5 { 6 7 public GameObject palyer; 8 Animation anim; 9 // Use this for initialization10 void Start () 11 {12 13 }14 15 // Update is called once per frame16 void pa...
阅读全文

浙公网安备 33010602011771号