Added glow when walking onto tiles.

This commit is contained in:
RosimInc 2016-01-30 16:40:16 -05:00
parent 307643d2f3
commit 7daedf9b55
10 changed files with 333 additions and 11 deletions

View File

@ -29,8 +29,8 @@ TextureImporter:
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
filterMode: 1
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0

View File

@ -29,7 +29,7 @@ TextureImporter:
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
filterMode: 1
aniso: 16
mipBias: -1
wrapMode: 1

View File

@ -29,7 +29,7 @@ TextureImporter:
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
filterMode: 1
aniso: 16
mipBias: -1
wrapMode: 1

View File

@ -29,7 +29,7 @@ TextureImporter:
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
filterMode: 1
aniso: 16
mipBias: -1
wrapMode: 1

View File

@ -0,0 +1,142 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: LuminescentSprite
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: PixelSnap
second: 0
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _Metallic
second: .569999993
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 1.39999998, b: 1.39999998, a: 1}
data:
first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3da65cd7f81224744ace03222fb02732
timeCreated: 1454187825
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

142
Assets/materials/Sprite.mat Normal file
View File

@ -0,0 +1,142 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sprite
m_Shader: {fileID: 10800, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: PIXELSNAP_ON _EMISSION
m_LightmapFlags: 1
m_CustomRenderQueue: 3000
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
data:
first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _BumpMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailNormalMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _MetallicGlossMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _ParallaxMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _OcclusionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _EmissionMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailMask
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
data:
first:
name: _DetailAlbedoMap
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
data:
first:
name: _SrcBlend
second: 1
data:
first:
name: _DstBlend
second: 0
data:
first:
name: _Cutoff
second: .5
data:
first:
name: PixelSnap
second: 1
data:
first:
name: _ZWrite
second: 1
data:
first:
name: _Glossiness
second: .5
data:
first:
name: _Metallic
second: .569999993
data:
first:
name: _BumpScale
second: 1
data:
first:
name: _Parallax
second: .0199999996
data:
first:
name: _OcclusionStrength
second: 1
data:
first:
name: _DetailNormalMapScale
second: 1
data:
first:
name: _UVSec
second: 0
data:
first:
name: _Mode
second: 0
m_Colors:
data:
first:
name: _EmissionColor
second: {r: 0, g: 1.39999998, b: 1.39999998, a: 1}
data:
first:
name: _Color
second: {r: 0, g: 1, b: .917241335, a: 1}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f22965d1d206e164799f1f41e351fdcf
timeCreated: 1454188091
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -100,7 +100,7 @@ GameObject:
- 54: {fileID: 132542570}
m_Layer: 0
m_Name: Capsule
m_TagString: Untagged
m_TagString: Player
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -300,8 +300,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: cc18b8c2e3daedc418978ae09dd589d6, type: 3}
m_Name:
m_EditorClassIdentifier:
numRows: 9
numColumns: 4
numRows: 19
numColumns: 14
xScale: 1
yScale: 1
dimension: .680000007

View File

@ -5,7 +5,9 @@ public class RuneBehaviour : MonoBehaviour {
public static float range;
public SpriteRenderer symbol;
public int letterNum;
public int letterNum;
private float lightState = 0f;
public const float LightTime = 1.5f;
// Use this for initialization
void Start () {
@ -13,8 +15,28 @@ public class RuneBehaviour : MonoBehaviour {
}
// Update is called once per frame
void Update () {
void Update () {
if (lightState > 0f)
{
lightState -= Time.deltaTime / LightTime;
if (lightState < 0)
lightState = 0;
//symbol.color = new Color(1 - lightState, 1f, 1 - lightState);
symbol.color = new Color(1f - lightState * 0.5f, 1f - lightState * 0.8f, 1f);
//symbol.color = new Color(1f - lightState * 0.4f, 1f - lightState * 0.4f, 1f);
}
}
void OnTriggerStay(Collider col)
{
if (col.gameObject.tag == "Player")
{
lightState = 1f;
}
}
public void SetSymbol(int letterNum)