Skip to content

Commit

Permalink
Unity Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristina Sturm committed Nov 29, 2013
1 parent e86b30d commit 0027f20
Show file tree
Hide file tree
Showing 151 changed files with 6,356 additions and 16 deletions.
38 changes: 30 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,32 @@
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
**NGUI/Examples/.**/.*

# Autogenerated VS/MD solution and project files
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
Library/

# ===================================== #
# Visual Studio / MonoDevelop generated #
# ===================================== #
ExportedObj/
*.svd
*.userprefs
*.csproj
*.unityproj
*.pidb
*.suo
*.sln
*.userprefs
*.user
*.unityproj
*.booproj

# ============ #
# OS generated #
# ============ #
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
Icon?
ehthumbs.db
Thumbs.db
Binary file modified Assembly-CSharp.pidb
Binary file not shown.
Binary file not shown.
Binary file removed Assets/AssetStoreAssets/ScreenShots/02-Flare.jpg
Binary file not shown.
Binary file removed Assets/AssetStoreAssets/ScreenShots/03-Flames.jpg
Binary file not shown.
Binary file removed Assets/AssetStoreAssets/StoreImages/big.png
Binary file not shown.
Binary file removed Assets/AssetStoreAssets/StoreImages/icon.png
Binary file not shown.
Binary file removed Assets/AssetStoreAssets/StoreImages/small.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Assets/NGUI/Examples/Animations/Button.anim
Binary file not shown.
Binary file added Assets/NGUI/Examples/Animations/Checkmark.anim
Binary file not shown.
Binary file added Assets/NGUI/Examples/Animations/Logo.anim
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
193 changes: 193 additions & 0 deletions Assets/NGUI/Examples/Atlases/Fantasy/Fantasy Font - Normal.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
603 changes: 603 additions & 0 deletions Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Header.txt

Large diffs are not rendered by default.

Binary file not shown.
432 changes: 432 additions & 0 deletions Assets/NGUI/Examples/Atlases/Refractive/Refractive Font - Normal.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
603 changes: 603 additions & 0 deletions Assets/NGUI/Examples/Atlases/SciFi/SciFi Font - Header.txt

Large diffs are not rendered by default.

Binary file not shown.
432 changes: 432 additions & 0 deletions Assets/NGUI/Examples/Atlases/SciFi/SciFi Font - Normal.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
253 changes: 253 additions & 0 deletions Assets/NGUI/Examples/Atlases/Wooden/Arimo14.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file added Assets/NGUI/Examples/Atlases/Wooden/Arimo18.tga
Binary file not shown.
266 changes: 266 additions & 0 deletions Assets/NGUI/Examples/Atlases/Wooden/Arimo18.txt

Large diffs are not rendered by default.

Binary file not shown.
Binary file added Assets/NGUI/Examples/Atlases/Wooden/Arimo20.tga
Binary file not shown.
267 changes: 267 additions & 0 deletions Assets/NGUI/Examples/Atlases/Wooden/Arimo20.txt

Large diffs are not rendered by default.

Binary file added Assets/NGUI/Examples/Atlases/Wooden/Sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added Assets/NGUI/Examples/Materials/Backdrop.mat
Binary file not shown.
Binary file added Assets/NGUI/Examples/Materials/brick.mat
Binary file not shown.
Binary file added Assets/NGUI/Examples/Materials/burlap.mat
Binary file not shown.
Binary file added Assets/NGUI/Examples/Materials/sand.mat
Binary file not shown.
Binary file added Assets/NGUI/Examples/Models/Orc Armor/Bracers.FBX
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
99 changes: 99 additions & 0 deletions Assets/NGUI/Examples/Models/Orc Armor/Orc Armor.shader
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
Shader "NGUI/Examples/Orc Armor"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1)
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125
_MainTex ("Diffuse (RGB), Color Mask (A)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
_MaskTex ("Specular (R), Reflection (G)", 2D) = "black" {}
}

// Good quality settings
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 300

CGPROGRAM
#pragma surface surf PPL

sampler2D _MainTex;
sampler2D _BumpMap;
sampler2D _MaskTex;
fixed4 _Color;
float _Shininess;

struct Input
{
float2 uv_MainTex;
};

// Forward lighting
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
{
half3 nNormal = normalize(s.Normal);
half shininess = s.Gloss * 250.0 + 4.0;

#ifndef USING_DIRECTIONAL_LIGHT
lightDir = normalize(lightDir);
#endif

// Phong shading model
//half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal)));

// Blinn-Phong shading model
half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir)));

half diffuseFactor = max(0.0, dot(nNormal, lightDir));
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular;

half4 c;
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb;
c.rgb *= (atten * 2.0);
c.a = s.Alpha;
return c;
}

void surf (Input IN, inout SurfaceOutput o)
{
half4 tex = tex2D(_MainTex, IN.uv_MainTex);
half4 maps = tex2D(_MaskTex, IN.uv_MainTex);

o.Albedo = lerp(tex.rgb, tex.rgb * _Color.rgb, tex.a);
o.Alpha = _Color.a;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
o.Specular = maps.r;
o.Gloss = _Shininess;
}
ENDCG
}

// Simple quality settings -- drop the bump map
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200

CGPROGRAM
#pragma surface surf Lambert

sampler2D _MainTex;
fixed4 _Color;

struct Input
{
float2 uv_MainTex;
};

void surf (Input IN, inout SurfaceOutput o)
{
half4 tex = tex2D(_MainTex, IN.uv_MainTex);
o.Albedo = lerp(tex.rgb, tex.rgb * _Color.rgb, tex.a);
o.Alpha = _Color.a;
}
ENDCG
}
Fallback "Diffuse"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Assets/NGUI/Examples/Models/Orc/FBX.FBX
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/NGUI/Examples/Models/Orc/Orc Skin.mat
Binary file not shown.
124 changes: 124 additions & 0 deletions Assets/NGUI/Examples/Models/Orc/Orc Skin.shader
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
Shader "NGUI/Examples/Orc Skin"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_SpecColor ("Specular Color", Color) = (0.5, 0.5, 0.5, 1)
_Shininess ("Shininess", Range (0.01, 1)) = 0.078125
_MainTex ("Diffuse (RGB), Specular (A)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
}

// Good quality or above
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 300

CGPROGRAM
#pragma surface surf PPL

sampler2D _MainTex;
sampler2D _BumpMap;
fixed4 _Color;
float _Shininess;

struct Input
{
float2 uv_MainTex;
};

// Forward lighting
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
{
half3 nNormal = normalize(s.Normal);
half shininess = s.Gloss * 250.0 + 4.0;

#ifndef USING_DIRECTIONAL_LIGHT
lightDir = normalize(lightDir);
#endif

// Phong shading model
//half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal)));

// Blinn-Phong shading model
half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir)));

half diffuseFactor = max(0.0, dot(nNormal, lightDir));
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular;

half4 c;
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb;
c.rgb *= (atten * 2.0);
c.a = s.Alpha;
return c;
}

void surf (Input IN, inout SurfaceOutput o)
{
half4 tex = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = tex.rgb;
o.Alpha = _Color.a;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
o.Specular = tex.a;
o.Gloss = _Shininess;
}
ENDCG
}

// Simple quality -- drop the normal map
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200

CGPROGRAM
#pragma surface surf PPL

sampler2D _MainTex;
fixed4 _Color;
float _Shininess;

struct Input
{
float2 uv_MainTex;
};

// Forward lighting
half4 LightingPPL (SurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
{
half3 nNormal = normalize(s.Normal);
half shininess = s.Gloss * 250.0 + 4.0;

#ifndef USING_DIRECTIONAL_LIGHT
lightDir = normalize(lightDir);
#endif

// Phong shading model
half reflectiveFactor = max(0.0, dot(-viewDir, reflect(lightDir, nNormal)));

// Blinn-Phong shading model
//half reflectiveFactor = max(0.0, dot(nNormal, normalize(lightDir + viewDir)));

half diffuseFactor = max(0.0, dot(nNormal, lightDir));
half specularFactor = pow(reflectiveFactor, shininess) * s.Specular;

half4 c;
c.rgb = (s.Albedo * diffuseFactor + _SpecColor.rgb * specularFactor) * _LightColor0.rgb;
c.rgb *= (atten * 2.0);
c.a = s.Alpha;
return c;
}

void surf (Input IN, inout SurfaceOutput o)
{
half4 tex = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = tex.rgb;
o.Alpha = _Color.a;
o.Specular = tex.a;
o.Gloss = _Shininess;
}
ENDCG
}
Fallback "Diffuse"
}
Binary file added Assets/NGUI/Examples/Models/Orc/Orc.prefab
Binary file not shown.
9 changes: 9 additions & 0 deletions Assets/NGUI/Examples/Other/English.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Flag = Flag-US
Language = English
English = English
French = Français
Info = Localization example
Sound = Sound
Music = Music
Desc = English localization
Paragraph = This example shows how to implement localization using NGUI. In order to localize a widget, simply attach [000000]UILocalize[-] script to it. The script will localize the sprite if it's a [000000]UISprite[-], or the text if it's a [000000]UILabel[-]. If you want to localize something else, just implement the [000000]OnLocalize[-] function. Either way, the actual data is defined via text assets specified on the [000000]Localization[-] script which must be present in the scene.
9 changes: 9 additions & 0 deletions Assets/NGUI/Examples/Other/French.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Flag = Flag-FR
Language = Français
English = English
French = Français
Info = Par exemple la localisation
Sound = Son
Music = Musique
Desc = La localisation française
Paragraph = Cet exemple montre comment implémenter la localisation en utilisant NGUI. Pour localiser un widget, il suffit d'y attacher le script [000000]UILocalize[-]. Ce script localisera le sprite si c'est un [000000]UISprite[-], ou le texte si c'est un [000000]UILabel[-]. Si vous voulez localiser autre chose, il suffit d'implémenter la fonction [000000]OnLocalize[-]. Dans tous les cas, les données sont définies par l'intermédiaire de documents texte spécifiés dans le script [000000]Localization[-] qui doit être présent dans la scène.
Binary file added Assets/NGUI/Examples/Other/Localization.prefab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0027f20

Please sign in to comment.