Time of Update: 2018-12-04
看了以上幾個教程,估計大家對NGUI的前幾個執行個體有所瞭解,建議自己做一遍,這樣可以加深對它的理解。接下來,我將詳細描述創作可拖拽視窗的製作過程。在這裡我分四步來完成:一、製作和布局介面;二、製作gui的動態效果和拖拽功能;三、製作燈光效果;一、 製作和布局介面。1. 在NGUI菜單中,開啟Create a new UI對話方塊,在對話方塊中設定Camera為Advanced3D,並點擊Create your
Time of Update: 2018-12-04
製作滑鼠停留在按鈕上時的按鈕動態效果。建立一個空遊戲對象,命名為animation,把它拖到Button-hello上,成為其子物體,把該按鈕下面的兩個子物件拖到AnimationNull 物件上,成為它的子物體。並為AnimationNull
Time of Update: 2018-12-04
其效果:描述:請輸入描述圖片:1.pngNGUI的ScrollView能夠實現滑鼠或者手勢對表徵圖的滾動操作,現在在很多的遊戲中都能夠見到。例如在《憤怒的小鳥》中的關卡選擇等等。實現表徵圖的滾動操作在NGUI中很容易實現,只要在Panel中加入一個UIDragPanelContents組件,再做些細節上的操作就可以了。在本教程中,我們將分三步來完成這個例子。第一步,建立視窗背景;第二步,建立和實現表徵圖滾動效果;第三步,實現一些小細節上的效果。第一步,建立視窗1.
Time of Update: 2018-12-04
第二步,建立和實現表徵圖滾動效果首先先建立這個視窗的拖動表徵圖。在菜單上選擇NGUI->Create a Panel,在WindowRoot下建立一個新的Panel,並命名為Panel ClipView。:描述:請輸入描述圖片:1.png建立一個空的遊戲對象,命名為UIGrid,該對象用來自動調整它的子物件的相片順序。並把該遊戲對象作為Panel ClipView的子物件,並reset一下。:描述:請輸入描述圖片:2.png建立一個空的遊戲對象,命名為Item
Time of Update: 2018-12-04
var Tu1 : Texture2D;var Time1 : float = 0;function FixedUpdate () {Time1 += Time.deltaTime;}function OnGUI () {GUI.Label(Rect(250,170,161,62),getTime(Time1));GUIUtility.RotateAroundPivot (6*Time1, Vector2(103, 200));GUI.DrawTexture(Rect(100,100,6,100
Time of Update: 2018-12-04
using UnityEngine;using System.Collections; public class SceneManager : MonoBehaviour{ private static SceneManager s_Instance = null; public static SceneManager instance { get { if(s_Instance == null) {
Time of Update: 2018-12-04
Shader "Hidden/Edge Detect Normals" { Properties { _MainTex ("Base (RGB)", RECT) = "white" {} _NormalsTexture ("Normals", RECT) = "white" {} } SubShader { Pass { ZTest Always Cull Off ZWrite Off Fog { Mode off } CGPROGRAM
Time of Update: 2018-12-04
本文摘要 本文首先描述了Unity3.0在支援大型遊戲項目開發時的兩個不足:即對模組化和svn協同缺乏支援。隨後,分析了Unity內建的Export/Import Package 功能,並提出了使用此功能與svn配合實現多人項目協同的方法。有關Unity的其他話題也可以查閱我的其他文章。Unity項目協同的挑戰
Time of Update: 2018-12-04
在NGUI外掛程式中,你可以設定該GUI的輸入方式,例如通過滑鼠、鍵盤、手柄等方式來控制元素的選擇。在官方樣本的Example4 – Input中,展示了屏蔽滑鼠輸入,改為通過鍵盤方向鍵來控制元件選擇的功能。該樣本以前一個樣本作為基礎。http://game.ceeger.com/forum/read.php?tid=4187首先屏蔽滑鼠事件。選擇UI Root(3D)下的Camera對象,在Inspector視窗中找到UICamera組件,把其中的Use Mouse和Use Touch關掉,:
Time of Update: 2018-12-04
Shader "Hidden/RenderNormalsAndDepth" { SubShader { Tags { "RenderType"="Opaque" } Pass { Fog { Mode Off } CGPROGRAM #pragma vertex vert #include "UnityCG.cginc" struct v2f { float4 pos : POSITION; float4 color : COLOR; }; v2f
Time of Update: 2018-12-04
本文摘要本文主要記錄了我在開發格鬥遊戲時用到的幾個運動特效,可以方便地表現武器揮動、移動模糊和其他一些特效。靈活使用可以大幅提升格鬥遊戲的視覺效果和感染力。有關Unity的其他話題也可以查閱我的其他文章。一、運動軌跡運動軌跡常常用於表現武器的揮舞效果,在提高速度感的同時又能讓玩家看清楚招式動作,所以是常見的一種格鬥特效。Unity中可以直接使用TrailRender來實現該效果。二、移動模糊移動模糊就是保留前幾幀影像,形成一定的重影模糊效果,從而突出速度感。配合縮時攝影使用往往能很好地表現運動高
Time of Update: 2018-12-04
NUI這個系統是在是牛,比unity3D裡面內建的gui要好用得多,還可以為GUI添加法線貼圖!哈哈。雖然在EZgui裡面也可以。接下來的例子,我不在使用它自己的例子了。因為重複性勞動太多,大家看了也煩。我就說說如何給它加入法線貼圖,並實現動畫的簡單例子。1. 建立一個Simple2D NGUI結構,:圖片:1.png1.
Time of Update: 2018-12-04
@script ExecuteInEditMode class EdgeDetectEffectNormals extends ImageEffectBase { var renderSceneShader : Shader; private var renderTexture : RenderTexture; private var shaderCamera : GameObject; function OnDisable() { super.OnDisa
Time of Update: 2018-12-04
movieTexture.js[javascript] view plaincopyprint?public var url="file:///c:/sample.ogg"; function Start () { url="file:///" + Application.dataPath + "/video/sample.ogg"; print(url); // Start download var www = new WWW(url); /
Time of Update: 2018-12-04
//以下是實現代碼using UnityEngine;using System.Collections;public class SampleMoveScriptC : MonoBehaviour { public float speed = 3.0f; public float rotatationSpeed = 200.0f; private float curSpeed = 0.0f; private GameObject obj = null; private Vector3
Time of Update: 2018-12-04
Properties { _EnvMap ("EnvMap", 2D) = "black" { TexGen SphereMap } } SubShader { Pass { Name "BASE" BindChannels { Bind "Vertex", vertex
Time of Update: 2018-12-04
Shader "Hidden/Render DOF Factor" { Properties { _MainTex ("Base", 2D) = "white" {} _Cutoff ("Cutoff", float) = 0.5 } // Helper code used in all of the below subshaders CGINCLUDE struct v2f { float4 pos : POSITION; float depth : TEXCOOR
Time of Update: 2018-12-04
原址:http://www.cnblogs.com/solq/archive/2012/05/10/2494146.html /*編寫:圍城(solq)日期:2012-5-8blog:http://www.cnblogs.com/solq/*/using UnityEngine;using System.Collections;using System.Xml;public class ReadXml : MonoBehaviour { void Start () {
Time of Update: 2018-12-04
using System; using System.Collections; using System.Data; using MySql.Data.MySqlClient; public class CMySql : MonoBehaviour { // Global variables public static MySqlConnection dbConnection;//Just like MyConn.conn in StoryTools before
Time of Update: 2018-12-04
Properties { _MainTex ("", RECT) = "white" {} _BlurTex1 ("", RECT) = "white" {} _BlurTex2 ("", RECT) = "white" {} _DepthTex ("", RECT) = "white" {} } SubShader { Pass { ZTest Always Cull Off ZWrite Off Fog { Mode off } CGPROGRAM