diff --git a/Chromacore/.gitignore.txt b/Chromacore/.gitignore.txt
new file mode 100644
index 000000000..aad62359c
--- /dev/null
+++ b/Chromacore/.gitignore.txt
@@ -0,0 +1,10 @@
+# Unity .gitignore file.
+.DS_Store
+Library
+Library/*
+*.csproj
+*.sln
+*.userprefs
+Temp
+*.pidb
+Build
\ No newline at end of file
diff --git a/Chromacore/Assembly-CSharp-Editor-vs.csproj b/Chromacore/Assembly-CSharp-Editor-vs.csproj
new file mode 100644
index 000000000..55de9468f
--- /dev/null
+++ b/Chromacore/Assembly-CSharp-Editor-vs.csproj
@@ -0,0 +1,208 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {428C9111-9B47-8908-0876-04CEFA00FDE5}
+ Library
+ Properties
+
+ Assembly-CSharp-Editor
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library\ScriptAssemblies\Assembly-UnityScript-firstpass.dll
+
+
+ Assets\TK2DROOT\tk2d\Editor\tk2dExternal.dll
+
+
+ Assets\TK2DROOT\tk2d\Editor\tk2dSkin.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\iPhonePlayer\EditorExtensions\UnityEditor.iOS.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WP8Support\EditorExtensions\UnityEditor.WP8.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\MetroSupport\EditorExtensions\UnityEditor.Metro.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\BB10Player\EditorExtensions\UnityEditor.BB10.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\EditorExtensions\UnityEditor.Android.Extensions.dll
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass-vs
+
+ {079123E3-C33D-91B0-78E0-38829B9F7DFF} Assembly-CSharp-vs
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp-Editor.csproj b/Chromacore/Assembly-CSharp-Editor.csproj
new file mode 100644
index 000000000..2e27600ad
--- /dev/null
+++ b/Chromacore/Assembly-CSharp-Editor.csproj
@@ -0,0 +1,207 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {428C9111-9B47-8908-0876-04CEFA00FDE5}
+ Library
+ Properties
+
+ Assembly-CSharp-Editor
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assets\TK2DROOT\tk2d\Editor\tk2dExternal.dll
+
+
+ Assets\TK2DROOT\tk2d\Editor\tk2dSkin.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\iPhonePlayer\EditorExtensions\UnityEditor.iOS.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\WP8Support\EditorExtensions\UnityEditor.WP8.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\MetroSupport\EditorExtensions\UnityEditor.Metro.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\BB10Player\EditorExtensions\UnityEditor.BB10.Extensions.dll
+
+
+ C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\AndroidPlayer\EditorExtensions\UnityEditor.Android.Extensions.dll
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass
+
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601} Assembly-UnityScript-firstpass
+
+ {079123E3-C33D-91B0-78E0-38829B9F7DFF} Assembly-CSharp
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp-Editor.pidb b/Chromacore/Assembly-CSharp-Editor.pidb
new file mode 100644
index 000000000..8a74153ec
Binary files /dev/null and b/Chromacore/Assembly-CSharp-Editor.pidb differ
diff --git a/Chromacore/Assembly-CSharp-firstpass-vs.csproj b/Chromacore/Assembly-CSharp-firstpass-vs.csproj
new file mode 100644
index 000000000..b47c958f0
--- /dev/null
+++ b/Chromacore/Assembly-CSharp-firstpass-vs.csproj
@@ -0,0 +1,163 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}
+ Library
+ Properties
+
+ Assembly-CSharp-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp-firstpass.csproj b/Chromacore/Assembly-CSharp-firstpass.csproj
new file mode 100644
index 000000000..b47c958f0
--- /dev/null
+++ b/Chromacore/Assembly-CSharp-firstpass.csproj
@@ -0,0 +1,163 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}
+ Library
+ Properties
+
+ Assembly-CSharp-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp-firstpass.pidb b/Chromacore/Assembly-CSharp-firstpass.pidb
new file mode 100644
index 000000000..d026ef37f
Binary files /dev/null and b/Chromacore/Assembly-CSharp-firstpass.pidb differ
diff --git a/Chromacore/Assembly-CSharp-vs.csproj b/Chromacore/Assembly-CSharp-vs.csproj
new file mode 100644
index 000000000..d98da0f1c
--- /dev/null
+++ b/Chromacore/Assembly-CSharp-vs.csproj
@@ -0,0 +1,105 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {079123E3-C33D-91B0-78E0-38829B9F7DFF}
+ Library
+ Properties
+
+ Assembly-CSharp
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library\ScriptAssemblies\Assembly-UnityScript-firstpass.dll
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass-vs
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp.csproj b/Chromacore/Assembly-CSharp.csproj
new file mode 100644
index 000000000..f6c27429e
--- /dev/null
+++ b/Chromacore/Assembly-CSharp.csproj
@@ -0,0 +1,104 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {079123E3-C33D-91B0-78E0-38829B9F7DFF}
+ Library
+ Properties
+
+ Assembly-CSharp
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass
+
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601} Assembly-UnityScript-firstpass
+
+
+
+
+
diff --git a/Chromacore/Assembly-CSharp.pidb b/Chromacore/Assembly-CSharp.pidb
new file mode 100644
index 000000000..5553a3d69
Binary files /dev/null and b/Chromacore/Assembly-CSharp.pidb differ
diff --git a/Chromacore/Assembly-UnityScript-firstpass-vs.unityproj b/Chromacore/Assembly-UnityScript-firstpass-vs.unityproj
new file mode 100644
index 000000000..8e1992c03
--- /dev/null
+++ b/Chromacore/Assembly-UnityScript-firstpass-vs.unityproj
@@ -0,0 +1,96 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}
+ Library
+ Properties
+
+ Assembly-UnityScript-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assembly-UnityScript-firstpass.pidb b/Chromacore/Assembly-UnityScript-firstpass.pidb
new file mode 100644
index 000000000..5db7dd307
Binary files /dev/null and b/Chromacore/Assembly-UnityScript-firstpass.pidb differ
diff --git a/Chromacore/Assembly-UnityScript-firstpass.unityproj b/Chromacore/Assembly-UnityScript-firstpass.unityproj
new file mode 100644
index 000000000..8e1992c03
--- /dev/null
+++ b/Chromacore/Assembly-UnityScript-firstpass.unityproj
@@ -0,0 +1,96 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}
+ Library
+ Properties
+
+ Assembly-UnityScript-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_WEBPLAYER;WEBPLUG;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_2;UNITY_4_2;DEVELOPMENT_BUILD;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN;light
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assembly-UnityScript-vs.unityproj b/Chromacore/Assembly-UnityScript-vs.unityproj
new file mode 100644
index 000000000..e20d54ada
--- /dev/null
+++ b/Chromacore/Assembly-UnityScript-vs.unityproj
@@ -0,0 +1,73 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {049C355B-3257-E8D2-23F2-8A5ED9819886}
+ Library
+ Properties
+
+ Assembly-UnityScript
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Library\ScriptAssemblies\Assembly-UnityScript-firstpass.dll
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass-vs
+
+
+
+
+
diff --git a/Chromacore/Assembly-UnityScript.pidb b/Chromacore/Assembly-UnityScript.pidb
new file mode 100644
index 000000000..07dc130a2
Binary files /dev/null and b/Chromacore/Assembly-UnityScript.pidb differ
diff --git a/Chromacore/Assembly-UnityScript.unityproj b/Chromacore/Assembly-UnityScript.unityproj
new file mode 100644
index 000000000..2508c65d0
--- /dev/null
+++ b/Chromacore/Assembly-UnityScript.unityproj
@@ -0,0 +1,72 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {049C355B-3257-E8D2-23F2-8A5ED9819886}
+ Library
+ Properties
+
+ Assembly-UnityScript
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD} Assembly-CSharp-firstpass
+
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601} Assembly-UnityScript-firstpass
+
+
+
+
+
diff --git a/Chromacore/Assets/-tk2d.asset b/Chromacore/Assets/-tk2d.asset
new file mode 100644
index 000000000..921cfbfde
Binary files /dev/null and b/Chromacore/Assets/-tk2d.asset differ
diff --git a/Chromacore/Assets/-tk2d.asset.meta b/Chromacore/Assets/-tk2d.asset.meta
new file mode 100644
index 000000000..a1a992289
--- /dev/null
+++ b/Chromacore/Assets/-tk2d.asset.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c962cc3763fe096459095ba056831194
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets.meta b/Chromacore/Assets/Art Assets.meta
new file mode 100644
index 000000000..1c6503e05
--- /dev/null
+++ b/Chromacore/Assets/Art Assets.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 188d38dd083379a40bf1982ce8dc3fc0
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Billboard.png b/Chromacore/Assets/Art Assets/Billboard.png
new file mode 100644
index 000000000..5d7712cae
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Billboard.png differ
diff --git a/Chromacore/Assets/Art Assets/Billboard.png.meta b/Chromacore/Assets/Art Assets/Billboard.png.meta
new file mode 100644
index 000000000..08ab176b2
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Billboard.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: c0394e019cc896d49801641aa20c94e9
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Brainflower.meta b/Chromacore/Assets/Art Assets/Brainflower.meta
new file mode 100644
index 000000000..be1a9de81
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Brainflower.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 44bc13aa355fb794186f5cdc132729dd
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg b/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg
new file mode 100644
index 000000000..faf3f5adb
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg differ
diff --git a/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg.meta b/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg.meta
new file mode 100644
index 000000000..8a5cff87c
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Brainflower/BRAINPREV.jpg.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 51021f6565eaa5e4db1a9f0db957e45d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf b/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf
new file mode 100644
index 000000000..6da4d72ff
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf differ
diff --git a/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf.meta b/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf.meta
new file mode 100644
index 000000000..a0ab84e52
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Brainflower/Brain Flower Euro.ttf.meta
@@ -0,0 +1,14 @@
+fileFormatVersion: 2
+guid: 4a64fe8c13ac4224180071bd624f50d0
+TrueTypeFontImporter:
+ serializedVersion: 2
+ fontSize: 16
+ forceTextureCase: -2
+ characterSpacing: 1
+ characterPadding: 0
+ includeFontData: 1
+ use2xBehaviour: 0
+ fontNames: []
+ customCharacters:
+ fontRenderingMode: 0
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Brainflower/readme.txt b/Chromacore/Assets/Art Assets/Brainflower/readme.txt
new file mode 100644
index 000000000..4d2689f91
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Brainflower/readme.txt
@@ -0,0 +1,19 @@
+FONT BY DENISE BENTULAN (c) 2013
+http://deathmunkey.deviantart.com
+http://www.dafont.com/denise-bentulan.d2156
+http://douxie.tumblr.com
+
+-----------------------------------------------------------------------------------------
+
+Free for personal use ONLY.
+For commercial use, please email the designer at dnn.bntln@yahoo.com.
+
+-----------------------------------------------------------------------------------------
+
+PayPal donations are highly appreciated!
+these help me in a way through college.
+you may send them to my PayPal account, dnn.bntln@yahoo.com.
+
+thank you.
+
+-----------------------------------------------------------------------------------------
\ No newline at end of file
diff --git a/Chromacore/Assets/Art Assets/Brainflower/readme.txt.meta b/Chromacore/Assets/Art Assets/Brainflower/readme.txt.meta
new file mode 100644
index 000000000..1ddb3c6c8
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Brainflower/readme.txt.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: ce63d86989b445e4e8119744afef11a2
+TextScriptImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/FadeToBlackTexture.png b/Chromacore/Assets/Art Assets/FadeToBlackTexture.png
new file mode 100644
index 000000000..a3fa3f88a
Binary files /dev/null and b/Chromacore/Assets/Art Assets/FadeToBlackTexture.png differ
diff --git a/Chromacore/Assets/Art Assets/FadeToBlackTexture.png.meta b/Chromacore/Assets/Art Assets/FadeToBlackTexture.png.meta
new file mode 100644
index 000000000..e76aa47a4
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/FadeToBlackTexture.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 74aba1abaaabcaa478a606c39e0be4b9
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Level Art Data.meta b/Chromacore/Assets/Art Assets/Level Art Data.meta
new file mode 100644
index 000000000..e86aab106
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Level Art Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 6d196622a9861384face96f29b0924f5
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab b/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab
new file mode 100644
index 000000000..8d5404c1c
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab differ
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab.meta b/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab.meta
new file mode 100644
index 000000000..933d4fb44
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Level Art Data/Level Art.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 6e48b51c56211e14784b2dca57726a3c
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat b/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat
new file mode 100644
index 000000000..85470a7c0
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat.meta b/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..3112e0cc0
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Level Art Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 79299fd866477a3459ccd00271636ad8
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png b/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png
new file mode 100644
index 000000000..62268ca2b
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png differ
diff --git a/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png.meta b/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png.meta
new file mode 100644
index 000000000..6a5f13e27
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Level Art Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: f04008bf1f71ce049bab1db65f8e047d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Level Art.prefab b/Chromacore/Assets/Art Assets/Level Art.prefab
new file mode 100644
index 000000000..efb03a6ed
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Level Art.prefab differ
diff --git a/Chromacore/Assets/Art Assets/Level Art.prefab.meta b/Chromacore/Assets/Art Assets/Level Art.prefab.meta
new file mode 100644
index 000000000..2638506c6
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Level Art.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3cf14b65d5555424f89d9e08dd5ce19d
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Materials.meta b/Chromacore/Assets/Art Assets/Materials.meta
new file mode 100644
index 000000000..49a34b402
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Materials.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 2bebebe6adcde3b40bf802bb870093d5
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Materials/Billboard.mat b/Chromacore/Assets/Art Assets/Materials/Billboard.mat
new file mode 100644
index 000000000..0b891c6f4
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Materials/Billboard.mat differ
diff --git a/Chromacore/Assets/Art Assets/Materials/Billboard.mat.meta b/Chromacore/Assets/Art Assets/Materials/Billboard.mat.meta
new file mode 100644
index 000000000..e9652b2b0
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Materials/Billboard.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: f4e6d42dc1548f64f8842b0a13306242
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Materials/antenae.mat b/Chromacore/Assets/Art Assets/Materials/antenae.mat
new file mode 100644
index 000000000..da2dfe4bc
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Materials/antenae.mat differ
diff --git a/Chromacore/Assets/Art Assets/Materials/antenae.mat.meta b/Chromacore/Assets/Art Assets/Materials/antenae.mat.meta
new file mode 100644
index 000000000..c367683dd
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Materials/antenae.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 0ee9cf1d1ce7add4c8bfbaa3d9eb5e2a
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat b/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat
new file mode 100644
index 000000000..58ddb8ae5
Binary files /dev/null and b/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat differ
diff --git a/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat.meta b/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat.meta
new file mode 100644
index 000000000..4f34b482e
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/Materials/roughBG_loop_BW.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: ea2bf09280d2927428e293a97575c418
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/PropAnimations.prefab b/Chromacore/Assets/Art Assets/PropAnimations.prefab
new file mode 100644
index 000000000..49bbda573
Binary files /dev/null and b/Chromacore/Assets/Art Assets/PropAnimations.prefab differ
diff --git a/Chromacore/Assets/Art Assets/PropAnimations.prefab.meta b/Chromacore/Assets/Art Assets/PropAnimations.prefab.meta
new file mode 100644
index 000000000..0cadab8f6
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/PropAnimations.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 1596eeda7efd30b4abf8e925d51abbbf
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Art Assets/antenae.png b/Chromacore/Assets/Art Assets/antenae.png
new file mode 100644
index 000000000..36f4eab15
Binary files /dev/null and b/Chromacore/Assets/Art Assets/antenae.png differ
diff --git a/Chromacore/Assets/Art Assets/antenae.png.meta b/Chromacore/Assets/Art Assets/antenae.png.meta
new file mode 100644
index 000000000..315476087
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/antenae.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 17900c2305b67274b98d4849b98e9f2f
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/building_WIP.png b/Chromacore/Assets/Art Assets/building_WIP.png
new file mode 100644
index 000000000..d60316983
Binary files /dev/null and b/Chromacore/Assets/Art Assets/building_WIP.png differ
diff --git a/Chromacore/Assets/Art Assets/building_WIP.png.meta b/Chromacore/Assets/Art Assets/building_WIP.png.meta
new file mode 100644
index 000000000..3eb16bb52
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/building_WIP.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: bfb1f482e6ea52c4d8f5e5462b279030
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/generator.png b/Chromacore/Assets/Art Assets/generator.png
new file mode 100644
index 000000000..3c4a786d9
Binary files /dev/null and b/Chromacore/Assets/Art Assets/generator.png differ
diff --git a/Chromacore/Assets/Art Assets/generator.png.meta b/Chromacore/Assets/Art Assets/generator.png.meta
new file mode 100644
index 000000000..dd379ad99
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/generator.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: cf56a86bc7f736f4a9960884abfd3175
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/hydrant.png b/Chromacore/Assets/Art Assets/hydrant.png
new file mode 100644
index 000000000..6493f76b7
Binary files /dev/null and b/Chromacore/Assets/Art Assets/hydrant.png differ
diff --git a/Chromacore/Assets/Art Assets/hydrant.png.meta b/Chromacore/Assets/Art Assets/hydrant.png.meta
new file mode 100644
index 000000000..5145a2a76
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/hydrant.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0b9fa0e64a1652647adb6ba76ced80ec
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/hydrant_splash.png b/Chromacore/Assets/Art Assets/hydrant_splash.png
new file mode 100644
index 000000000..a9c0ad2d2
Binary files /dev/null and b/Chromacore/Assets/Art Assets/hydrant_splash.png differ
diff --git a/Chromacore/Assets/Art Assets/hydrant_splash.png.meta b/Chromacore/Assets/Art Assets/hydrant_splash.png.meta
new file mode 100644
index 000000000..b556faf9c
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/hydrant_splash.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 6f6ded1a16fc48d4cac68b01e00f76d8
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/item_still.png b/Chromacore/Assets/Art Assets/item_still.png
new file mode 100644
index 000000000..d0e4e8717
Binary files /dev/null and b/Chromacore/Assets/Art Assets/item_still.png differ
diff --git a/Chromacore/Assets/Art Assets/item_still.png.meta b/Chromacore/Assets/Art Assets/item_still.png.meta
new file mode 100644
index 000000000..b75afbfb9
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/item_still.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 38d59340154d2d74996adacfcde40aea
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/light.png b/Chromacore/Assets/Art Assets/light.png
new file mode 100644
index 000000000..aa5e54be3
Binary files /dev/null and b/Chromacore/Assets/Art Assets/light.png differ
diff --git a/Chromacore/Assets/Art Assets/light.png.meta b/Chromacore/Assets/Art Assets/light.png.meta
new file mode 100644
index 000000000..22489c1f7
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/light.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ba8ad0fc3795ad24d97635b0b619dffe
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg b/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg
new file mode 100644
index 000000000..ccb70825b
Binary files /dev/null and b/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg differ
diff --git a/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg.meta b/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg.meta
new file mode 100644
index 000000000..e2336ee6c
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/roughBG_loop_BW.jpg.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: abfe1bb0c7869744487555d5f41df28d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg b/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg
new file mode 100644
index 000000000..36561e4e9
Binary files /dev/null and b/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg differ
diff --git a/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg.meta b/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg.meta
new file mode 100644
index 000000000..bdd4b3bb8
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/roughBG_loop_color.jpg.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 38ec6d679c410044a868a5918f607222
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/trash_close.png b/Chromacore/Assets/Art Assets/trash_close.png
new file mode 100644
index 000000000..af8a6a9fb
Binary files /dev/null and b/Chromacore/Assets/Art Assets/trash_close.png differ
diff --git a/Chromacore/Assets/Art Assets/trash_close.png.meta b/Chromacore/Assets/Art Assets/trash_close.png.meta
new file mode 100644
index 000000000..003539cae
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/trash_close.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 602327134858dd243ba6fd621b63149d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/trash_open.png b/Chromacore/Assets/Art Assets/trash_open.png
new file mode 100644
index 000000000..ff45ad4dc
Binary files /dev/null and b/Chromacore/Assets/Art Assets/trash_open.png differ
diff --git a/Chromacore/Assets/Art Assets/trash_open.png.meta b/Chromacore/Assets/Art Assets/trash_open.png.meta
new file mode 100644
index 000000000..303c8afde
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/trash_open.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 330ad3dd3c87ef249b1781f277a014f7
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/tv_1.png b/Chromacore/Assets/Art Assets/tv_1.png
new file mode 100644
index 000000000..98ff11a8e
Binary files /dev/null and b/Chromacore/Assets/Art Assets/tv_1.png differ
diff --git a/Chromacore/Assets/Art Assets/tv_1.png.meta b/Chromacore/Assets/Art Assets/tv_1.png.meta
new file mode 100644
index 000000000..da0017f05
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/tv_1.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 982f28167329f4a488be53a59044fb30
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/tv_2.png b/Chromacore/Assets/Art Assets/tv_2.png
new file mode 100644
index 000000000..1cabdfbfe
Binary files /dev/null and b/Chromacore/Assets/Art Assets/tv_2.png differ
diff --git a/Chromacore/Assets/Art Assets/tv_2.png.meta b/Chromacore/Assets/Art Assets/tv_2.png.meta
new file mode 100644
index 000000000..26e8f0452
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/tv_2.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 74a45039bf3aa4d45aaecd75e3312ea4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Art Assets/tv_3.png b/Chromacore/Assets/Art Assets/tv_3.png
new file mode 100644
index 000000000..758837ebf
Binary files /dev/null and b/Chromacore/Assets/Art Assets/tv_3.png differ
diff --git a/Chromacore/Assets/Art Assets/tv_3.png.meta b/Chromacore/Assets/Art Assets/tv_3.png.meta
new file mode 100644
index 000000000..c43ed7d80
--- /dev/null
+++ b/Chromacore/Assets/Art Assets/tv_3.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d20182c5c4f3ff14d8cede05a70183f3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj b/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj
new file mode 100644
index 000000000..adb9a82d5
--- /dev/null
+++ b/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj
@@ -0,0 +1,66 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}
+ Library
+ Properties
+
+ Assembly-CSharp-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj.meta b/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj.meta
new file mode 100644
index 000000000..1c2e14f8e
--- /dev/null
+++ b/Chromacore/Assets/Assembly-CSharp-firstpass-vs.csproj.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 8f8b9585488eb2f4695c22b6450ab12e
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass.csproj b/Chromacore/Assets/Assembly-CSharp-firstpass.csproj
new file mode 100644
index 000000000..adb9a82d5
--- /dev/null
+++ b/Chromacore/Assets/Assembly-CSharp-firstpass.csproj
@@ -0,0 +1,66 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}
+ Library
+ Properties
+
+ Assembly-CSharp-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass.csproj.meta b/Chromacore/Assets/Assembly-CSharp-firstpass.csproj.meta
new file mode 100644
index 000000000..13b622a27
--- /dev/null
+++ b/Chromacore/Assets/Assembly-CSharp-firstpass.csproj.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3d2137571a25f08488506ddbb08efe21
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass.pidb b/Chromacore/Assets/Assembly-CSharp-firstpass.pidb
new file mode 100644
index 000000000..f57d1412e
Binary files /dev/null and b/Chromacore/Assets/Assembly-CSharp-firstpass.pidb differ
diff --git a/Chromacore/Assets/Assembly-CSharp-firstpass.pidb.meta b/Chromacore/Assets/Assembly-CSharp-firstpass.pidb.meta
new file mode 100644
index 000000000..c467ab3d5
--- /dev/null
+++ b/Chromacore/Assets/Assembly-CSharp-firstpass.pidb.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 540962d19fc7ceb4eab63e30bd6d617a
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj b/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj
new file mode 100644
index 000000000..8e648b282
--- /dev/null
+++ b/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj
@@ -0,0 +1,67 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}
+ Library
+ Properties
+
+ Assembly-UnityScript-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj.meta b/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj.meta
new file mode 100644
index 000000000..b9e0f409f
--- /dev/null
+++ b/Chromacore/Assets/Assembly-UnityScript-firstpass-vs.unityproj.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3d71c2981f917a54eaa49c971aeb8d4a
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb b/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb
new file mode 100644
index 000000000..6a8873ab3
Binary files /dev/null and b/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb differ
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb.meta b/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb.meta
new file mode 100644
index 000000000..4718f8dd6
--- /dev/null
+++ b/Chromacore/Assets/Assembly-UnityScript-firstpass.pidb.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c34ddf1e5486ccd46af46a03f5578a02
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj b/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj
new file mode 100644
index 000000000..8e648b282
--- /dev/null
+++ b/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj
@@ -0,0 +1,67 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}
+ Library
+ Properties
+
+ Assembly-UnityScript-firstpass
+ v3.5
+ 512
+
+
+ true
+ full
+ false
+ Temp\bin\Debug\
+ DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_TEXTUREID_MAP;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_MONO;ENABLE_TERRAIN;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_MOVIES;ENABLE_WWW;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;RENDER_SOFTWARE_CURSOR;ENABLE_NETWORK;ENABLE_PHYSICS;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_SHADOWS;ENABLE_AUDIO;ENABLE_DUCK_TYPING;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;UNITY_4_2_1;UNITY_4_2;ENABLE_PROFILER;UNITY_EDITOR;UNITY_EDITOR_WIN
+ prompt
+ 4
+ 0169
+
+
+ pdbonly
+ true
+ Temp\bin\Release\
+ TRACE
+ prompt
+ 4
+ 0169
+
+
+
+
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
+
+
+ C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj.meta b/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj.meta
new file mode 100644
index 000000000..1bafd663a
--- /dev/null
+++ b/Chromacore/Assets/Assembly-UnityScript-firstpass.unityproj.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2ebe7d5cd17cb9d4e8679cdf34782edb
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Chromacore-csharp.sln b/Chromacore/Assets/Chromacore-csharp.sln
new file mode 100644
index 000000000..06cc2de0e
--- /dev/null
+++ b/Chromacore/Assets/Chromacore-csharp.sln
@@ -0,0 +1,39 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2008
+
+Project("{DBC62298-6D1A-4770-F7BE-CC28879D1540}") = "Chromacore", "Assembly-CSharp-firstpass-vs.csproj", "{F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Assembly-CSharp.csproj
+ Policies = $0
+ $0.TextStylePolicy = $1
+ $1.inheritsSet = null
+ $1.scope = text/x-csharp
+ $0.CSharpFormattingPolicy = $2
+ $2.inheritsSet = Mono
+ $2.inheritsScope = text/x-csharp
+ $2.scope = text/x-csharp
+ $0.TextStylePolicy = $3
+ $3.FileWidth = 120
+ $3.TabWidth = 4
+ $3.EolMarker = Unix
+ $3.inheritsSet = Mono
+ $3.inheritsScope = text/plain
+ $3.scope = text/plain
+ EndGlobalSection
+
+EndGlobal
diff --git a/Chromacore/Assets/Chromacore-csharp.sln.meta b/Chromacore/Assets/Chromacore-csharp.sln.meta
new file mode 100644
index 000000000..0b6bfb0de
--- /dev/null
+++ b/Chromacore/Assets/Chromacore-csharp.sln.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 727041a3de72b484ea2d4d4d6c47d107
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Chromacore.sln b/Chromacore/Assets/Chromacore.sln
new file mode 100644
index 000000000..da14720b2
--- /dev/null
+++ b/Chromacore/Assets/Chromacore.sln
@@ -0,0 +1,44 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2008
+
+Project("{DBC62298-6D1A-4770-F7BE-CC28879D1540}") = "Chromacore", "Assembly-CSharp-firstpass.csproj", "{F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}"
+EndProject
+Project("{DBC62298-6D1A-4770-F7BE-CC28879D1540}") = "Chromacore", "Assembly-UnityScript-firstpass.unityproj", "{AE6DD8DA-5073-88A5-CCCB-6C9523A73601}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F7EAD6A8-1D86-8A82-744C-F08CDC221DDD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AE6DD8DA-5073-88A5-CCCB-6C9523A73601}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Assembly-CSharp.csproj
+ Policies = $0
+ $0.TextStylePolicy = $1
+ $1.inheritsSet = null
+ $1.scope = text/x-csharp
+ $0.CSharpFormattingPolicy = $2
+ $2.inheritsSet = Mono
+ $2.inheritsScope = text/x-csharp
+ $2.scope = text/x-csharp
+ $0.TextStylePolicy = $3
+ $3.FileWidth = 120
+ $3.TabWidth = 4
+ $3.EolMarker = Unix
+ $3.inheritsSet = Mono
+ $3.inheritsScope = text/plain
+ $3.scope = text/plain
+ EndGlobalSection
+EndGlobal
diff --git a/Chromacore/Assets/Chromacore.sln.meta b/Chromacore/Assets/Chromacore.sln.meta
new file mode 100644
index 000000000..2a8235910
--- /dev/null
+++ b/Chromacore/Assets/Chromacore.sln.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: db479b32eb8cc07449b5258270bc7d5b
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Chromacore.userprefs b/Chromacore/Assets/Chromacore.userprefs
new file mode 100644
index 000000000..955428bf8
--- /dev/null
+++ b/Chromacore/Assets/Chromacore.userprefs
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chromacore/Assets/Chromacore.userprefs.meta b/Chromacore/Assets/Chromacore.userprefs.meta
new file mode 100644
index 000000000..e2c84014c
--- /dev/null
+++ b/Chromacore/Assets/Chromacore.userprefs.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: ae6ed86401e6590418ce74176be8d079
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/MainLevel.unity b/Chromacore/Assets/MainLevel.unity
new file mode 100644
index 000000000..82702d549
Binary files /dev/null and b/Chromacore/Assets/MainLevel.unity differ
diff --git a/Chromacore/Assets/MainLevel.unity.meta b/Chromacore/Assets/MainLevel.unity.meta
new file mode 100644
index 000000000..935cc7485
--- /dev/null
+++ b/Chromacore/Assets/MainLevel.unity.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 54aefb38a8c671a4b8ee7f37d1451ca8
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins.meta b/Chromacore/Assets/Plugins.meta
new file mode 100644
index 000000000..1651abf97
--- /dev/null
+++ b/Chromacore/Assets/Plugins.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 452304dd739bc9843b32d931f0272cf2
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d.meta b/Chromacore/Assets/Plugins/tk2d.meta
new file mode 100644
index 000000000..2ec6fcd12
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: a1db83399898afc4a8e1f696f1263226
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code.meta b/Chromacore/Assets/Plugins/tk2d/Code.meta
new file mode 100644
index 000000000..c43a673a0
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 2e4c11bdb69426d418d8ad90cc36e7c0
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera.meta b/Chromacore/Assets/Plugins/tk2d/Code/Camera.meta
new file mode 100644
index 000000000..fd1a5f2d4
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: a1d34cb24257f814290b888c721a43ae
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs
new file mode 100644
index 000000000..b9e722dd4
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs
@@ -0,0 +1,765 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+[AddComponentMenu("2D Toolkit/Camera/tk2dCamera")]
+[ExecuteInEditMode]
+///
+/// Maintains a screen resolution camera.
+/// Whole number increments seen through this camera represent one pixel.
+/// For example, setting an object to 300, 300 will position it at exactly that pixel position.
+///
+public class tk2dCamera : MonoBehaviour
+{
+ static int CURRENT_VERSION = 1;
+ public int version = 0;
+
+ [SerializeField] private tk2dCameraSettings cameraSettings = new tk2dCameraSettings();
+
+ ///
+ /// The unity camera settings.
+ /// Use this instead of camera.XXX to change parameters.
+ ///
+ public tk2dCameraSettings CameraSettings {
+ get {
+ return cameraSettings;
+ }
+ }
+
+ ///
+ /// Resolution overrides, if necessary. See
+ ///
+ public tk2dCameraResolutionOverride[] resolutionOverride = new tk2dCameraResolutionOverride[1] {
+ tk2dCameraResolutionOverride.DefaultOverride
+ };
+
+ ///
+ /// The currently used override
+ ///
+ public tk2dCameraResolutionOverride CurrentResolutionOverride {
+ get {
+ tk2dCamera settings = SettingsRoot;
+ Camera cam = ScreenCamera;
+
+ float pixelWidth = cam.pixelWidth;
+ float pixelHeight = cam.pixelHeight;
+#if UNITY_EDITOR
+ if (settings.useGameWindowResolutionInEditor) {
+ pixelWidth = settings.gameWindowResolution.x;
+ pixelHeight = settings.gameWindowResolution.y;
+ }
+ else if (settings.forceResolutionInEditor)
+ {
+ pixelWidth = settings.forceResolution.x;
+ pixelHeight = settings.forceResolution.y;
+ }
+#endif
+
+ tk2dCameraResolutionOverride currentResolutionOverride = null;
+
+ if ((currentResolutionOverride == null ||
+ (currentResolutionOverride != null && (currentResolutionOverride.width != pixelWidth || currentResolutionOverride.height != pixelHeight))
+ ))
+ {
+ currentResolutionOverride = null;
+
+ // find one if it matches the current resolution
+ if (settings.resolutionOverride != null)
+ {
+ foreach (var ovr in settings.resolutionOverride)
+ {
+ if (ovr.Match((int)pixelWidth, (int)pixelHeight))
+ {
+ currentResolutionOverride = ovr;
+ break;
+ }
+ }
+ }
+ }
+
+ return currentResolutionOverride;
+ }
+ }
+
+ ///
+ /// A tk2dCamera to inherit configuration from.
+ /// All resolution and override settings will be pulled from the root inherited camera.
+ /// This allows you to create a tk2dCamera prefab in your project or a master camera
+ /// in the scene and guarantee that multiple instances of tk2dCameras referencing this
+ /// will use exactly the same paramaters.
+ ///
+ public tk2dCamera InheritConfig {
+ get { return inheritSettings; }
+ set {
+ if (inheritSettings != value) {
+ inheritSettings = value;
+ _settingsRoot = null;
+ }
+ }
+ }
+
+ [SerializeField]
+ private tk2dCamera inheritSettings = null;
+
+ ///
+ /// Native resolution width of the camera. Override this in the inspector.
+ /// Don't change this at runtime unless you understand the implications.
+ ///
+ public int nativeResolutionWidth = 960;
+
+ ///
+ /// Native resolution height of the camera. Override this in the inspector.
+ /// Don't change this at runtime unless you understand the implications.
+ ///
+ public int nativeResolutionHeight = 640;
+
+ [SerializeField]
+ private Camera _unityCamera;
+ private Camera UnityCamera {
+ get {
+ if (_unityCamera == null) {
+ _unityCamera = camera;
+ if (_unityCamera == null) {
+ Debug.LogError("A unity camera must be attached to the tk2dCamera script");
+ }
+ }
+ return _unityCamera;
+ }
+ }
+
+
+ static tk2dCamera inst;
+
+ ///
+ /// Global instance, used by sprite and textmesh class to quickly find the tk2dCamera instance.
+ ///
+ public static tk2dCamera Instance {
+ get {
+ return inst;
+ }
+ }
+
+ // Global instance of active tk2dCameras, used to quickly find cameras matching a particular layer.
+ private static List allCameras = new List();
+
+ ///
+ /// Returns the first camera in the list that can "see" this layer, or null if none can be found
+ ///
+ public static tk2dCamera CameraForLayer( int layer ) {
+ int layerMask = 1 << layer;
+ int cameraCount = allCameras.Count;
+ for (int i = 0; i < cameraCount; ++i) {
+ tk2dCamera cam = allCameras[i];
+ if ((cam.UnityCamera.cullingMask & layerMask) == layerMask) {
+ return cam;
+ }
+ }
+ return null;
+ }
+
+ ///
+ /// Returns screen extents - top, bottom, left and right will be the extent of the physical screen
+ /// Regardless of resolution or override
+ ///
+ public Rect ScreenExtents { get { return _screenExtents; } }
+
+ ///
+ /// Returns screen extents - top, bottom, left and right will be the extent of the native screen
+ /// before it gets scaled and processed by overrides
+ ///
+ public Rect NativeScreenExtents { get { return _nativeScreenExtents; } }
+
+ ///
+ /// Enable/disable viewport clipping.
+ /// ScreenCamera must be valid for it to be actually enabled when rendering.
+ ///
+ public bool viewportClippingEnabled = false;
+
+ ///
+ /// Viewport clipping region.
+ ///
+ public Vector4 viewportRegion = new Vector4(0, 0, 100, 100);
+
+ ///
+ /// Target resolution
+ /// The target resolution currently being used.
+ /// If displaying on a 960x640 display, this will be the number returned here, regardless of scale, etc.
+ /// If the editor resolution is forced, the returned value will be the forced resolution.
+ ///
+ public Vector2 TargetResolution { get { return _targetResolution; } }
+ Vector2 _targetResolution = Vector2.zero;
+
+ ///
+ /// Native resolution
+ /// The native resolution of this camera.
+ /// This is the native resolution of the camera before any scaling is performed.
+ /// The resolution the game is set up to run at initially.
+ ///
+ public Vector2 NativeResolution { get { return new Vector2(nativeResolutionWidth, nativeResolutionHeight); } }
+
+ // Some obselete functions, use ScreenExtents instead
+ [System.Obsolete] public Vector2 ScreenOffset { get { return new Vector2(ScreenExtents.xMin - NativeScreenExtents.xMin, ScreenExtents.yMin - NativeScreenExtents.yMin); } }
+ [System.Obsolete] public Vector2 resolution { get { return new Vector2( ScreenExtents.xMax, ScreenExtents.yMax ); } }
+ [System.Obsolete] public Vector2 ScreenResolution { get { return new Vector2( ScreenExtents.xMax, ScreenExtents.yMax ); } }
+ [System.Obsolete] public Vector2 ScaledResolution { get { return new Vector2( ScreenExtents.width, ScreenExtents.height ); } }
+
+ ///
+ /// Zooms the current display
+ /// A zoom factor of 2 will zoom in 2x, i.e. the object on screen will be twice as large
+ /// Anchors will still be anchored, but will be scaled with the zoomScale.
+ /// It is recommended to use a second camera for HUDs if necessary to avoid this behaviour.
+ ///
+ public float ZoomFactor {
+ get { return zoomFactor; }
+ set { zoomFactor = Mathf.Max(0.01f, value); }
+ }
+
+ // Fallback obselete interface
+ [System.Obsolete]
+ public float zoomScale {
+ get { return 1.0f / Mathf.Max(0.01f, zoomFactor); }
+ }
+
+ [SerializeField] float zoomFactor = 1.0f;
+
+
+ [HideInInspector]
+ ///
+ /// Forces the resolution in the editor. This option is only used when tk2dCamera can't detect the game window resolution.
+ ///
+ public bool forceResolutionInEditor = false;
+
+ // When true, overrides the "forceResolutionInEditor" flag above
+ bool useGameWindowResolutionInEditor = false;
+
+ [HideInInspector]
+ ///
+ /// The resolution to force the game window to when is enabled.
+ ///
+ public Vector2 forceResolution = new Vector2(960, 640);
+
+ // Usred when useGameWindowResolutionInEditor == true
+ Vector2 gameWindowResolution = new Vector2(960, 640);
+
+ ///
+ /// The camera that sees the screen - i.e. if viewport clipping is enabled, its the camera that sees the entire screen
+ ///
+ public Camera ScreenCamera {
+ get {
+ bool viewportClippingEnabled = this.viewportClippingEnabled && this.inheritSettings != null && this.inheritSettings.UnityCamera.rect == unitRect;
+ return viewportClippingEnabled ? this.inheritSettings.UnityCamera : UnityCamera;
+ }
+ }
+
+ // Use this for initialization
+ void Awake () {
+ Upgrade();
+ if (allCameras.IndexOf(this) == -1) {
+ allCameras.Add(this);
+ }
+ }
+
+ void OnEnable() {
+ if (UnityCamera != null) {
+ UpdateCameraMatrix();
+ }
+ else {
+ this.camera.enabled = false;
+ }
+
+ if (!viewportClippingEnabled) // the main camera can't display rect
+ inst = this;
+
+ if (allCameras.IndexOf(this) == -1) {
+ allCameras.Add(this);
+ }
+ }
+
+ void OnDestroy() {
+ int idx = allCameras.IndexOf(this);
+ if (idx != -1) {
+ allCameras.RemoveAt( idx );
+ }
+ }
+
+ void OnPreCull() {
+ // Commit all pending changes - this more or less guarantees
+ // everything is committed before drawing this camera.
+ tk2dUpdateManager.FlushQueues();
+ UpdateCameraMatrix();
+ }
+
+#if UNITY_EDITOR
+ void LateUpdate() {
+ if (!Application.isPlaying) {
+ UpdateCameraMatrix();
+ }
+ }
+#endif
+
+ Rect _screenExtents;
+ Rect _nativeScreenExtents;
+ Rect unitRect = new Rect(0, 0, 1, 1);
+
+ // Gives you the size of one pixel in world units at the native resolution
+ // For perspective cameras, it is dependent on the distance to the camera.
+ public float GetSizeAtDistance(float distance) {
+ tk2dCameraSettings cameraSettings = SettingsRoot.CameraSettings;
+ switch (cameraSettings.projection) {
+ case tk2dCameraSettings.ProjectionType.Orthographic:
+ if (cameraSettings.orthographicType == tk2dCameraSettings.OrthographicType.PixelsPerMeter) {
+ return 1.0f / cameraSettings.orthographicPixelsPerMeter;
+ }
+ else {
+ return 2.0f * cameraSettings.orthographicSize / SettingsRoot.nativeResolutionHeight;
+ }
+ case tk2dCameraSettings.ProjectionType.Perspective:
+ return Mathf.Tan(CameraSettings.fieldOfView * Mathf.Deg2Rad * 0.5f) * distance * 2.0f / SettingsRoot.nativeResolutionHeight;
+ }
+ return 1;
+ }
+
+
+ // This returns the tk2dCamera object which has the settings stored on it
+ // Trace back to the source, however far up the hierarchy that may be
+ // You can't change this at runtime
+ tk2dCamera _settingsRoot;
+ public tk2dCamera SettingsRoot {
+ get {
+ if (_settingsRoot == null) {
+ _settingsRoot = (inheritSettings == null || inheritSettings == this) ? this : inheritSettings.SettingsRoot;
+ }
+ return _settingsRoot;
+ }
+ }
+
+#if UNITY_EDITOR
+ public static tk2dCamera Editor__Inst {
+ get {
+ if (inst != null) {
+ return inst;
+ }
+ return GameObject.FindObjectOfType(typeof(tk2dCamera)) as tk2dCamera;
+ }
+ }
+#endif
+
+#if UNITY_EDITOR
+ static bool Editor__getGameViewSizeError = false;
+ public static bool Editor__gameViewReflectionError = false;
+
+ // Try and get game view size
+ // Will return true if it is able to work this out
+ // If width / height == 0, it means the user has selected an aspect ratio "Resolution"
+ public static bool Editor__GetGameViewSize(out float width, out float height, out float aspect) {
+ try {
+ Editor__gameViewReflectionError = false;
+
+ System.Type gameViewType = System.Type.GetType("UnityEditor.GameView,UnityEditor");
+ System.Reflection.MethodInfo GetMainGameView = gameViewType.GetMethod("GetMainGameView", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic);
+ object mainGameViewInst = GetMainGameView.Invoke(null, null);
+ if (mainGameViewInst == null) {
+ width = height = aspect = 0;
+ return false;
+ }
+ System.Reflection.FieldInfo s_viewModeResolutions = gameViewType.GetField("s_viewModeResolutions", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic);
+ if (s_viewModeResolutions == null) {
+ System.Reflection.PropertyInfo currentGameViewSize = gameViewType.GetProperty("currentGameViewSize", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic);
+ object gameViewSize = currentGameViewSize.GetValue(mainGameViewInst, null);
+ System.Type gameViewSizeType = gameViewSize.GetType();
+ int gvWidth = (int)gameViewSizeType.GetProperty("width").GetValue(gameViewSize, null);
+ int gvHeight = (int)gameViewSizeType.GetProperty("height").GetValue(gameViewSize, null);
+ int gvSizeType = (int)gameViewSizeType.GetProperty("sizeType").GetValue(gameViewSize, null);
+ if (gvWidth == 0 || gvHeight == 0) {
+ width = height = aspect = 0;
+ return false;
+ }
+ else if (gvSizeType == 0) {
+ width = height = 0;
+ aspect = (float)gvWidth / (float)gvHeight;
+ return true;
+ }
+ else {
+ width = gvWidth; height = gvHeight;
+ aspect = (float)gvWidth / (float)gvHeight;
+ return true;
+ }
+ }
+ else {
+ Vector2[] viewModeResolutions = (Vector2[])s_viewModeResolutions.GetValue(null);
+ float[] viewModeAspects = (float[])gameViewType.GetField("s_viewModeAspects", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic).GetValue(null);
+ string[] viewModeStrings = (string[])gameViewType.GetField("s_viewModeAspectStrings", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic).GetValue(null);
+ if (mainGameViewInst != null
+ && viewModeStrings != null
+ && viewModeResolutions != null && viewModeAspects != null) {
+ int aspectRatio = (int)gameViewType.GetField("m_AspectRatio", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic).GetValue(mainGameViewInst);
+ string thisViewModeString = viewModeStrings[aspectRatio];
+ if (thisViewModeString.Contains("Standalone")) {
+ width = UnityEditor.PlayerSettings.defaultScreenWidth; height = UnityEditor.PlayerSettings.defaultScreenHeight;
+ aspect = width / height;
+ }
+ else if (thisViewModeString.Contains("Web")) {
+ width = UnityEditor.PlayerSettings.defaultWebScreenWidth; height = UnityEditor.PlayerSettings.defaultWebScreenHeight;
+ aspect = width / height;
+ }
+ else {
+ width = viewModeResolutions[ aspectRatio ].x; height = viewModeResolutions[ aspectRatio ].y;
+ aspect = viewModeAspects[ aspectRatio ];
+ // this is an error state
+ if (width == 0 && height == 0 && aspect == 0) {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+ }
+ catch (System.Exception e) {
+ if (Editor__getGameViewSizeError == false) {
+ Debug.LogError("tk2dCamera.GetGameViewSize - has a Unity update broken this?\nThis is not a fatal error, but a warning that you've probably not got the latest 2D Toolkit update.\n\n" + e.ToString());
+ Editor__getGameViewSizeError = true;
+ }
+ Editor__gameViewReflectionError = true;
+ }
+ width = height = aspect = 0;
+ return false;
+ }
+#endif
+
+ public Matrix4x4 OrthoOffCenter(Vector2 scale, float left, float right, float bottom, float top, float near, float far) {
+ // Additional half texel offset
+ // Takes care of texture unit offset, if necessary.
+
+ float x = (2.0f) / (right - left) * scale.x;
+ float y = (2.0f) / (top - bottom) * scale.y;
+ float z = -2.0f / (far - near);
+
+ float a = -(right + left) / (right - left);
+ float b = -(bottom + top) / (top - bottom);
+ float c = -(far + near) / (far - near);
+
+ Matrix4x4 m = new Matrix4x4();
+ m[0,0] = x; m[0,1] = 0; m[0,2] = 0; m[0,3] = a;
+ m[1,0] = 0; m[1,1] = y; m[1,2] = 0; m[1,3] = b;
+ m[2,0] = 0; m[2,1] = 0; m[2,2] = z; m[2,3] = c;
+ m[3,0] = 0; m[3,1] = 0; m[3,2] = 0; m[3,3] = 1;
+
+ return m;
+ }
+
+ Vector2 GetScaleForOverride(tk2dCamera settings, tk2dCameraResolutionOverride currentOverride, float width, float height) {
+ Vector2 scale = Vector2.one;
+ float s = 1.0f;
+
+ if (currentOverride == null) {
+ return scale;
+ }
+
+ switch (currentOverride.autoScaleMode)
+ {
+ case tk2dCameraResolutionOverride.AutoScaleMode.PixelPerfect:
+ s = 1;
+ scale.Set(s, s);
+ break;
+
+ case tk2dCameraResolutionOverride.AutoScaleMode.FitHeight:
+ s = height / settings.nativeResolutionHeight;
+ scale.Set(s, s);
+ break;
+
+ case tk2dCameraResolutionOverride.AutoScaleMode.FitWidth:
+ s = width / settings.nativeResolutionWidth;
+ scale.Set(s, s);
+ break;
+
+ case tk2dCameraResolutionOverride.AutoScaleMode.FitVisible:
+ case tk2dCameraResolutionOverride.AutoScaleMode.ClosestMultipleOfTwo:
+ float nativeAspect = (float)settings.nativeResolutionWidth / settings.nativeResolutionHeight;
+ float currentAspect = width / height;
+ if (currentAspect < nativeAspect)
+ s = width / settings.nativeResolutionWidth;
+ else
+ s = height / settings.nativeResolutionHeight;
+
+ if (currentOverride.autoScaleMode == tk2dCameraResolutionOverride.AutoScaleMode.ClosestMultipleOfTwo)
+ {
+ if (s > 1.0f)
+ s = Mathf.Floor(s); // round number
+ else
+ s = Mathf.Pow(2, Mathf.Floor(Mathf.Log(s, 2))); // minimise only as power of two
+ }
+
+ scale.Set(s, s);
+ break;
+
+ case tk2dCameraResolutionOverride.AutoScaleMode.StretchToFit:
+ scale.Set(width / settings.nativeResolutionWidth, height / settings.nativeResolutionHeight);
+ break;
+
+ default:
+ case tk2dCameraResolutionOverride.AutoScaleMode.None:
+ s = currentOverride.scale;
+ scale.Set(s, s);
+ break;
+ }
+
+ return scale;
+ }
+
+ Vector2 GetOffsetForOverride(tk2dCamera settings, tk2dCameraResolutionOverride currentOverride, Vector2 scale, float width, float height) {
+ Vector2 offset = Vector2.zero;
+ if (currentOverride == null) {
+ return offset;
+ }
+
+ switch (currentOverride.fitMode) {
+ case tk2dCameraResolutionOverride.FitMode.Center:
+ if (settings.cameraSettings.orthographicOrigin == tk2dCameraSettings.OrthographicOrigin.BottomLeft) {
+ offset = new Vector2(Mathf.Round((settings.nativeResolutionWidth * scale.x - width ) / 2.0f),
+ Mathf.Round((settings.nativeResolutionHeight * scale.y - height) / 2.0f));
+ }
+ break;
+
+ default:
+ case tk2dCameraResolutionOverride.FitMode.Constant:
+ offset = -currentOverride.offsetPixels;
+ break;
+ }
+ return offset;
+ }
+
+#if UNITY_EDITOR
+ private Matrix4x4 Editor__GetPerspectiveMatrix() {
+ float aspect = (float)nativeResolutionWidth / (float)nativeResolutionHeight;
+ return Matrix4x4.Perspective(SettingsRoot.CameraSettings.fieldOfView, aspect, UnityCamera.nearClipPlane, UnityCamera.farClipPlane);
+ }
+
+ public Matrix4x4 Editor__GetNativeProjectionMatrix( ) {
+ tk2dCamera settings = SettingsRoot;
+ if (settings.CameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ return Editor__GetPerspectiveMatrix();
+ }
+ Rect rect1 = new Rect(0, 0, 1, 1);
+ Rect rect2 = new Rect(0, 0, 1, 1);
+ return GetProjectionMatrixForOverride( settings, null, nativeResolutionWidth, nativeResolutionHeight, false, out rect1, out rect2 );
+ }
+
+ public Matrix4x4 Editor__GetFinalProjectionMatrix( ) {
+ tk2dCamera settings = SettingsRoot;
+ if (settings.CameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ return Editor__GetPerspectiveMatrix();
+ }
+ Vector2 resolution = GetScreenPixelDimensions(settings);
+ Rect rect1 = new Rect(0, 0, 1, 1);
+ Rect rect2 = new Rect(0, 0, 1, 1);
+ return GetProjectionMatrixForOverride( settings, settings.CurrentResolutionOverride, resolution.x, resolution.y, false, out rect1, out rect2 );
+ }
+#endif
+
+ Matrix4x4 GetProjectionMatrixForOverride( tk2dCamera settings, tk2dCameraResolutionOverride currentOverride, float pixelWidth, float pixelHeight, bool halfTexelOffset, out Rect screenExtents, out Rect unscaledScreenExtents ) {
+ Vector2 scale = GetScaleForOverride( settings, currentOverride, pixelWidth, pixelHeight );
+ Vector2 offset = GetOffsetForOverride( settings, currentOverride, scale, pixelWidth, pixelHeight);
+
+ float left = offset.x, bottom = offset.y;
+ float right = pixelWidth + offset.x, top = pixelHeight + offset.y;
+ Vector2 nativeResolutionOffset = Vector2.zero;
+
+ // Correct for viewport clipping rendering
+ // Coordinates in subrect are "native" pixels, but origin is from the extrema of screen
+ if (this.viewportClippingEnabled && this.InheritConfig != null) {
+ float vw = (right - left) / scale.x;
+ float vh = (top - bottom) / scale.y;
+ Vector4 sr = new Vector4((int)this.viewportRegion.x, (int)this.viewportRegion.y,
+ (int)this.viewportRegion.z, (int)this.viewportRegion.w);
+
+ float viewportLeft = -offset.x / pixelWidth + sr.x / vw;
+ float viewportBottom = -offset.y / pixelHeight + sr.y / vh;
+ float viewportWidth = sr.z / vw;
+ float viewportHeight = sr.w / vh;
+
+ Rect r = new Rect( viewportLeft, viewportBottom, viewportWidth, viewportHeight );
+ if (UnityCamera.rect.x != viewportLeft ||
+ UnityCamera.rect.y != viewportBottom ||
+ UnityCamera.rect.width != viewportWidth ||
+ UnityCamera.rect.height != viewportHeight) {
+ UnityCamera.rect = r;
+ }
+
+ float maxWidth = Mathf.Min( 1.0f - r.x, r.width );
+ float maxHeight = Mathf.Min( 1.0f - r.y, r.height );
+
+ float rectOffsetX = sr.x * scale.x - offset.x;
+ float rectOffsetY = sr.y * scale.y - offset.y;
+
+ if (r.x < 0.0f) {
+ rectOffsetX += -r.x * pixelWidth;
+ maxWidth = (r.x + r.width);
+ }
+ if (r.y < 0.0f) {
+ rectOffsetY += -r.y * pixelHeight;
+ maxHeight = (r.y + r.height);
+ }
+
+ left += rectOffsetX;
+ bottom += rectOffsetY;
+ right = pixelWidth * maxWidth + offset.x + rectOffsetX;
+ top = pixelHeight * maxHeight + offset.y + rectOffsetY;
+ }
+ else {
+ if (UnityCamera.rect != CameraSettings.rect) {
+ UnityCamera.rect = CameraSettings.rect;
+ }
+ }
+
+ // By default the camera is orthographic, bottom left, 1 pixel per meter
+ if (settings.cameraSettings.orthographicOrigin == tk2dCameraSettings.OrthographicOrigin.Center) {
+ float w = (right - left) * 0.5f;
+ left -= w; right -= w;
+ float h = (top - bottom) * 0.5f;
+ top -= h; bottom -= h;
+ nativeResolutionOffset.Set(-nativeResolutionWidth / 2.0f, -nativeResolutionHeight / 2.0f);
+ }
+
+ float orthoSize = settings.cameraSettings.orthographicSize;
+ switch (settings.cameraSettings.orthographicType) {
+ case tk2dCameraSettings.OrthographicType.OrthographicSize:
+ orthoSize = 2.0f * settings.cameraSettings.orthographicSize / settings.nativeResolutionHeight;
+ break;
+ case tk2dCameraSettings.OrthographicType.PixelsPerMeter:
+ orthoSize = 1.0f / settings.cameraSettings.orthographicPixelsPerMeter;
+ break;
+ }
+
+ float zoomScale = 1.0f / ZoomFactor;
+
+ // Only need the half texel offset on PC/D3D
+ bool needHalfTexelOffset = (Application.platform == RuntimePlatform.WindowsPlayer ||
+ Application.platform == RuntimePlatform.WindowsWebPlayer ||
+ Application.platform == RuntimePlatform.WindowsEditor);
+ float halfTexel = (halfTexelOffset && needHalfTexelOffset) ? 0.5f : 0.0f;
+
+ float s = orthoSize * zoomScale;
+ screenExtents = new Rect(left * s / scale.x, bottom * s / scale.y,
+ (right - left) * s / scale.x, (top - bottom) * s / scale.y);
+
+ unscaledScreenExtents = new Rect(nativeResolutionOffset.x * s, nativeResolutionOffset.y * s,
+ nativeResolutionWidth * s, nativeResolutionHeight * s);
+
+ // Near and far clip planes are tweakable per camera, so we pull from current camera instance regardless of inherited values
+ return OrthoOffCenter(scale, orthoSize * (left + halfTexel) * zoomScale, orthoSize * (right + halfTexel) * zoomScale,
+ orthoSize * (bottom - halfTexel) * zoomScale, orthoSize * (top - halfTexel) * zoomScale,
+ UnityCamera.nearClipPlane, UnityCamera.farClipPlane);
+ }
+
+ Vector2 GetScreenPixelDimensions(tk2dCamera settings) {
+ Vector2 dimensions = new Vector2(ScreenCamera.pixelWidth, ScreenCamera.pixelHeight);
+
+#if UNITY_EDITOR
+ // This bit here allocates memory, but only runs in the editor
+ float gameViewPixelWidth = 0, gameViewPixelHeight = 0;
+ float gameViewAspect = 0;
+ settings.useGameWindowResolutionInEditor = false;
+ if (Editor__GetGameViewSize( out gameViewPixelWidth, out gameViewPixelHeight, out gameViewAspect)) {
+ if (gameViewPixelWidth != 0 && gameViewPixelHeight != 0) {
+ if (!settings.useGameWindowResolutionInEditor ||
+ settings.gameWindowResolution.x != gameViewPixelWidth ||
+ settings.gameWindowResolution.y != gameViewPixelHeight) {
+ settings.useGameWindowResolutionInEditor = true;
+ settings.gameWindowResolution.x = gameViewPixelWidth;
+ settings.gameWindowResolution.y = gameViewPixelHeight;
+ }
+ dimensions.x = settings.gameWindowResolution.x;
+ dimensions.y = settings.gameWindowResolution.y;
+ }
+ }
+
+ if (!settings.useGameWindowResolutionInEditor && settings.forceResolutionInEditor)
+ {
+ dimensions.x = settings.forceResolution.x;
+ dimensions.y = settings.forceResolution.y;
+ }
+#endif
+
+ return dimensions;
+ }
+
+ private void Upgrade() {
+ if (version != CURRENT_VERSION) {
+ if (version == 0) {
+ // Backwards compatibility
+ cameraSettings.orthographicPixelsPerMeter = 1;
+ cameraSettings.orthographicType = tk2dCameraSettings.OrthographicType.PixelsPerMeter;
+ cameraSettings.orthographicOrigin = tk2dCameraSettings.OrthographicOrigin.BottomLeft;
+ cameraSettings.projection = tk2dCameraSettings.ProjectionType.Orthographic;
+
+ foreach (tk2dCameraResolutionOverride ovr in resolutionOverride) {
+ ovr.Upgrade( version );
+ }
+
+ // Mirror camera settings
+ Camera unityCamera = camera;
+ if (unityCamera != null) {
+ cameraSettings.rect = unityCamera.rect;
+ if (!unityCamera.isOrthoGraphic) {
+ cameraSettings.projection = tk2dCameraSettings.ProjectionType.Perspective;
+ cameraSettings.fieldOfView = unityCamera.fieldOfView * ZoomFactor;
+ }
+
+ unityCamera.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
+ }
+ }
+
+ Debug.Log("tk2dCamera '" + this.name + "' - Upgraded from version " + version.ToString());
+ version = CURRENT_VERSION;
+ }
+ }
+
+ ///
+ /// Updates the camera matrix to ensure 1:1 pixel mapping
+ /// Or however the override is set up.
+ ///
+ public void UpdateCameraMatrix()
+ {
+ Upgrade();
+
+ if (!this.viewportClippingEnabled)
+ inst = this;
+
+ Camera unityCamera = UnityCamera;
+ tk2dCamera settings = SettingsRoot;
+ tk2dCameraSettings inheritedCameraSettings = settings.CameraSettings;
+
+ if (unityCamera.rect != cameraSettings.rect) unityCamera.rect = cameraSettings.rect;
+
+ // Projection type is inherited from base camera
+ _targetResolution = GetScreenPixelDimensions(settings);
+
+ if (inheritedCameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ if (unityCamera.orthographic == true) unityCamera.orthographic = false;
+ float fov = Mathf.Min(179.9f, inheritedCameraSettings.fieldOfView / Mathf.Max(0.001f, ZoomFactor));
+ if (unityCamera.fieldOfView != fov) unityCamera.fieldOfView = fov;
+ _screenExtents.Set( -unityCamera.aspect, -1, unityCamera.aspect * 2, 2 );
+ _nativeScreenExtents = _screenExtents;
+ unityCamera.ResetProjectionMatrix();
+ }
+ else {
+ if (unityCamera.orthographic == false) unityCamera.orthographic = true;
+ // Find an override if necessary
+ Matrix4x4 m = GetProjectionMatrixForOverride( settings, settings.CurrentResolutionOverride, _targetResolution.x, _targetResolution.y, true, out _screenExtents, out _nativeScreenExtents );
+
+#if !(UNITY_3_5 || UNITY_4_0 || UNITY_4_1)
+ // Windows phone?
+ if (Application.platform == RuntimePlatform.WP8Player &&
+ (Screen.orientation == ScreenOrientation.LandscapeLeft || Screen.orientation == ScreenOrientation.LandscapeRight)) {
+ float angle = (Screen.orientation == ScreenOrientation.LandscapeRight) ? 90.0f : -90.0f;
+ Matrix4x4 m2 = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, angle), Vector3.one);
+ m = m2 * m;
+ }
+#endif
+
+ if (unityCamera.projectionMatrix != m) {
+ unityCamera.projectionMatrix = m;
+ }
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs.meta
new file mode 100644
index 000000000..6bfb37c9f
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCamera.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d60c017246963b14c9806a06670568b5
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31115
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs
new file mode 100644
index 000000000..96fa77b78
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs
@@ -0,0 +1,201 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Camera/tk2dCameraAnchor")]
+[ExecuteInEditMode]
+///
+/// Anchors children to anchor position, offset by number of pixels
+///
+public class tk2dCameraAnchor : MonoBehaviour
+{
+ // Legacy anchor
+ // Order: Upper [Left, Center, Right], Middle, Lower
+ [SerializeField]
+ int anchor = -1;
+
+ // Backing variable for AnchorPoint accessor
+ [SerializeField]
+ tk2dBaseSprite.Anchor _anchorPoint = tk2dBaseSprite.Anchor.UpperLeft;
+
+ [SerializeField]
+ bool anchorToNativeBounds = false;
+
+ ///
+ /// Anchor point location
+ ///
+ public tk2dBaseSprite.Anchor AnchorPoint {
+ get {
+ if (anchor != -1) {
+ if (anchor >= 0 && anchor <= 2) _anchorPoint = (tk2dBaseSprite.Anchor)( anchor + 6 );
+ else if (anchor >= 6 && anchor <= 8) _anchorPoint = (tk2dBaseSprite.Anchor)( anchor - 6 );
+ else _anchorPoint = (tk2dBaseSprite.Anchor)( anchor );
+ anchor = -1;
+#if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(this);
+#endif
+ }
+ return _anchorPoint;
+ }
+ set {
+ _anchorPoint = value;
+ }
+ }
+
+ [SerializeField]
+ Vector2 offset = Vector2.zero;
+
+ ///
+ /// Offset in pixels from the anchor.
+ /// This is consistently in screen space, i.e. +y = top of screen, +x = right of screen
+ /// Eg. If you need to inset 10 pixels from from top right anchor, you'd use (-10, -10)
+ ///
+ public Vector2 AnchorOffsetPixels {
+ get {
+ return offset;
+ }
+ set {
+ offset = value;
+ }
+ }
+
+ ///
+ /// Anchor this to the tk2dCamera native bounds, instead of the screen bounds.
+ ///
+ public bool AnchorToNativeBounds {
+ get {
+ return anchorToNativeBounds;
+ }
+ set {
+ anchorToNativeBounds = value;
+ }
+ }
+
+ // Another backwards compatiblity only thing here
+ [SerializeField]
+ tk2dCamera tk2dCamera = null;
+
+ // New field
+ [SerializeField]
+ Camera _anchorCamera = null;
+
+ // Used to decide when to try to find the tk2dCamera component again
+ Camera _anchorCameraCached = null;
+ tk2dCamera _anchorTk2dCamera = null;
+
+ ///
+ /// Offset in pixels from the anchor.
+ /// This is consistently in screen space, i.e. +y = top of screen, +x = right of screen
+ /// Eg. If you need to inset 10 pixels from from top right anchor, you'd use (-10, -10)
+ ///
+ public Camera AnchorCamera {
+ get {
+ if (tk2dCamera != null) {
+ _anchorCamera = tk2dCamera.camera;
+ tk2dCamera = null;
+#if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(this);
+#endif
+ }
+ return _anchorCamera;
+ }
+ set {
+ _anchorCamera = value;
+ _anchorCameraCached = null;
+ }
+ }
+
+ tk2dCamera AnchorTk2dCamera {
+ get {
+ if (_anchorCameraCached != _anchorCamera) {
+ _anchorTk2dCamera = _anchorCamera.GetComponent();
+ _anchorCameraCached = _anchorCamera;
+ }
+ return _anchorTk2dCamera;
+ }
+ }
+
+ // cache transform locally
+ Transform _myTransform;
+ Transform myTransform {
+ get {
+ if (_myTransform == null) _myTransform = transform;
+ return _myTransform;
+ }
+ }
+
+ void Start()
+ {
+ UpdateTransform();
+ }
+
+ void UpdateTransform()
+ {
+ // Break out if anchor camera is not bound
+ if (AnchorCamera == null) {
+ return;
+ }
+
+ float pixelScale = 1; // size of one pixel
+ Vector3 position = myTransform.localPosition;
+
+ // we're ignoring perspective tk2dCameras for now
+ tk2dCamera = (AnchorTk2dCamera != null && AnchorTk2dCamera.CameraSettings.projection != tk2dCameraSettings.ProjectionType.Perspective) ? AnchorTk2dCamera : null;
+
+ Rect rect = new Rect();
+ if (tk2dCamera != null) {
+ rect = anchorToNativeBounds ? tk2dCamera.NativeScreenExtents : tk2dCamera.ScreenExtents;
+ pixelScale = tk2dCamera.GetSizeAtDistance( 1 );
+ }
+ else {
+ rect.Set(0, 0, AnchorCamera.pixelWidth, AnchorCamera.pixelHeight);
+ }
+
+ float y_bot = rect.yMin;
+ float y_top = rect.yMax;
+ float y_ctr = (y_bot + y_top) * 0.5f;
+
+ float x_lhs = rect.xMin;
+ float x_rhs = rect.xMax;
+ float x_ctr = (x_lhs + x_rhs) * 0.5f;
+
+ Vector3 anchoredPosition = Vector3.zero;
+
+ switch (AnchorPoint)
+ {
+ case tk2dBaseSprite.Anchor.UpperLeft: anchoredPosition = new Vector3(x_lhs, y_top, position.z); break;
+ case tk2dBaseSprite.Anchor.UpperCenter: anchoredPosition = new Vector3(x_ctr, y_top, position.z); break;
+ case tk2dBaseSprite.Anchor.UpperRight: anchoredPosition = new Vector3(x_rhs, y_top, position.z); break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: anchoredPosition = new Vector3(x_lhs, y_ctr, position.z); break;
+ case tk2dBaseSprite.Anchor.MiddleCenter: anchoredPosition = new Vector3(x_ctr, y_ctr, position.z); break;
+ case tk2dBaseSprite.Anchor.MiddleRight: anchoredPosition = new Vector3(x_rhs, y_ctr, position.z); break;
+ case tk2dBaseSprite.Anchor.LowerLeft: anchoredPosition = new Vector3(x_lhs, y_bot, position.z); break;
+ case tk2dBaseSprite.Anchor.LowerCenter: anchoredPosition = new Vector3(x_ctr, y_bot, position.z); break;
+ case tk2dBaseSprite.Anchor.LowerRight: anchoredPosition = new Vector3(x_rhs, y_bot, position.z); break;
+ }
+
+ Vector3 screenAnchoredPosition = anchoredPosition + new Vector3(pixelScale * offset.x, pixelScale * offset.y, 0);
+ if (tk2dCamera == null) { // not a tk2dCamera, we need to transform
+ Vector3 worldAnchoredPosition = AnchorCamera.ScreenToWorldPoint( screenAnchoredPosition );
+ if (myTransform.position != worldAnchoredPosition) {
+ myTransform.position = worldAnchoredPosition;
+ }
+ }
+ else {
+ Vector3 oldPosition = myTransform.localPosition;
+ if (oldPosition != screenAnchoredPosition) {
+ myTransform.localPosition = screenAnchoredPosition;
+ }
+ }
+ }
+
+ public void ForceUpdateTransform()
+ {
+ UpdateTransform();
+ }
+
+ // Update is called once per frame
+ void LateUpdate ()
+ {
+ UpdateTransform();
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs.meta
new file mode 100644
index 000000000..721c70901
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraAnchor.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6b223ab045d4e8544b4e8a23f604b903
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31114
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs
new file mode 100644
index 000000000..a40bc7906
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs
@@ -0,0 +1,138 @@
+using UnityEngine;
+using System.Collections;
+
+[System.Serializable]
+///
+/// Mirrors the Unity camera class properties
+///
+public class tk2dCameraSettings {
+ public enum ProjectionType {
+ Orthographic,
+ Perspective
+ }
+
+ public enum OrthographicType {
+ PixelsPerMeter,
+ OrthographicSize,
+ }
+
+ public enum OrthographicOrigin {
+ BottomLeft,
+ Center
+ }
+
+ public ProjectionType projection = ProjectionType.Orthographic;
+ public float orthographicSize = 10.0f;
+ public float orthographicPixelsPerMeter = 20;
+ public OrthographicOrigin orthographicOrigin = OrthographicOrigin.Center;
+ public OrthographicType orthographicType = OrthographicType.PixelsPerMeter;
+ public float fieldOfView = 60.0f;
+ public Rect rect = new Rect( 0, 0, 1, 1 );
+}
+
+[System.Serializable]
+///
+/// Controls camera scale for different resolutions.
+/// Use this to display at 0.5x scale on iPhone3G or 2x scale on iPhone4
+///
+public class tk2dCameraResolutionOverride {
+ ///
+ /// Name of the override
+ ///
+ public string name;
+
+ public enum MatchByType {
+ Resolution,
+ AspectRatio,
+ Wildcard
+ };
+
+ ///
+ /// How to identify matches for this override.
+ ///
+ public MatchByType matchBy = MatchByType.Resolution;
+
+ ///
+ /// Screen width to match.
+ ///
+ public int width;
+ ///
+ /// Screen height to match.
+ ///
+ public int height;
+
+ ///
+ /// Aspect ratio to match to, stored as numerator and denominator
+ /// to make it easier to match accurately.
+ ///
+ public float aspectRatioNumerator = 4.0f;
+ public float aspectRatioDenominator = 3.0f;
+
+ ///
+ /// Amount to scale the matched resolution by
+ /// 1.0 = pixel perfect, 0.5 = 50% of pixel perfect size
+ ///
+ public float scale = 1.0f;
+
+ ///
+ /// Amount to offset from the bottom left, in number of pixels in target resolution. Example, if override resolution is
+ /// 1024x768, an offset of 20 will offset in by 20 pixels
+ ///
+ public Vector2 offsetPixels = new Vector2(0, 0);
+
+ public enum AutoScaleMode
+ {
+ None, // explicitly use the scale parameter
+ FitWidth, // fits the width to the current resolution
+ FitHeight, // fits the height to the current resolution
+ FitVisible, // best fit (either width or height)
+ StretchToFit, // stretch to fit, could be non-uniform and/or very ugly
+ ClosestMultipleOfTwo, // fits to the closest power of two
+ PixelPerfect, // keeps this pixel perfect always
+ };
+ public AutoScaleMode autoScaleMode = AutoScaleMode.None;
+
+ public enum FitMode
+ {
+ Constant, // Use the screenOffset
+ Center, // Align to center of screen
+ };
+ public FitMode fitMode = FitMode.Constant;
+
+
+ ///
+ /// Returns true if this instance of tk2dCameraResolutionOverride matches the curent resolution.
+ /// In future versions this may change to support ranges of resolutions in addition to explict ones.
+ ///
+ public bool Match(int pixelWidth, int pixelHeight)
+ {
+ switch (matchBy) {
+ case MatchByType.Wildcard:
+ return true;
+ case MatchByType.Resolution:
+ return (pixelWidth == width && pixelHeight == height);
+ case MatchByType.AspectRatio:
+ float aspectTest = (float)(pixelWidth * aspectRatioDenominator) / (float)aspectRatioNumerator;
+ return Mathf.Approximately(aspectTest, pixelHeight);
+ }
+
+ return false;
+ }
+
+ public void Upgrade(int version) {
+ if (version == 0) {
+ matchBy = ((width == -1 && height == -1) || (width == 0 && height == 0)) ? MatchByType.Wildcard : MatchByType.Resolution;
+ }
+ }
+
+ public static tk2dCameraResolutionOverride DefaultOverride {
+ get {
+ tk2dCameraResolutionOverride res = new tk2dCameraResolutionOverride();
+ res.name = "Override";
+ res.matchBy = MatchByType.Wildcard;
+ res.autoScaleMode = AutoScaleMode.FitVisible;
+ res.fitMode = FitMode.Center;
+ return res;
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs.meta
new file mode 100644
index 000000000..bde063e5b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Camera/tk2dCameraUtil.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b82a48290594b4a92bdbbf893c956fc0
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts.meta b/Chromacore/Assets/Plugins/tk2d/Code/Fonts.meta
new file mode 100644
index 000000000..8bbf8eee9
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 1dd4eb1fb031db9438e43ddea78fea77
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs
new file mode 100644
index 000000000..1e3d88a5c
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs
@@ -0,0 +1,52 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dFont")]
+public class tk2dFont : MonoBehaviour
+{
+ public Object bmFont;
+ public Material material;
+ public Texture texture;
+ public Texture2D gradientTexture;
+ public bool dupeCaps = false; // duplicate lowercase into uc, or vice-versa, depending on which exists
+ public bool flipTextureY = false;
+
+ [HideInInspector]
+ public bool proxyFont = false;
+
+ [HideInInspector]
+ private bool useTk2dCamera = false;
+ [HideInInspector]
+ private int targetHeight = 640;
+ [HideInInspector]
+ private float targetOrthoSize = 1.0f;
+
+ public tk2dSpriteCollectionSize sizeDef = tk2dSpriteCollectionSize.Default();
+
+ public int gradientCount = 1;
+
+ public bool manageMaterial = false;
+
+ [HideInInspector]
+ public bool loadable = false;
+
+ public int charPadX = 0;
+
+ public tk2dFontData data;
+
+ public static int CURRENT_VERSION = 1;
+ public int version = 0;
+
+ public void Upgrade() {
+ if (version >= CURRENT_VERSION) {
+ return;
+ }
+ Debug.Log("Font '" + this.name + "' - Upgraded from version " + version.ToString());
+
+ if (version == 0) {
+ sizeDef.CopyFromLegacy( useTk2dCamera, targetOrthoSize, targetHeight );
+ }
+
+ version = CURRENT_VERSION;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs.meta
new file mode 100644
index 000000000..e75d324bc
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFont.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 35be0f790243a0c46b505c114d7122ae
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs
new file mode 100644
index 000000000..ecf30d665
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs
@@ -0,0 +1,269 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+[System.Serializable]
+///
+/// Defines one character in a font
+///
+public class tk2dFontChar
+{
+ ///
+ /// End points forming a quad
+ ///
+ public Vector3 p0, p1;
+ ///
+ /// Uv for quad end points
+ ///
+ public Vector3 uv0, uv1;
+
+ public bool flipped = false;
+ ///
+ /// Gradient Uvs for quad end points
+ ///
+ public Vector2[] gradientUv;
+ ///
+ /// Spacing required for current character, mix with to get true advance value
+ ///
+ public float advance;
+
+ public int channel = 0; // channel data for multi channel fonts. Lookup into an array (R=0, G=1, B=2, A=3)
+}
+
+[System.Serializable]
+///
+/// Defines kerning within a font
+///
+public class tk2dFontKerning
+{
+ ///
+ /// First character to match
+ ///
+ public int c0;
+
+ ///
+ /// Second character to match
+ ///
+ public int c1;
+
+ ///
+ /// Kern amount.
+ ///
+ public float amount;
+}
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dFontData")]
+///
+/// Stores data to draw and display a font
+///
+public class tk2dFontData : MonoBehaviour
+{
+ public const int CURRENT_VERSION = 2;
+
+ [HideInInspector]
+ public int version = 0;
+
+ ///
+ /// The height of the line in local units.
+ ///
+ public float lineHeight;
+
+ ///
+ /// Array of .
+ /// If this.useDictionary is true, charDict will be used instead.
+ ///
+ public tk2dFontChar[] chars;
+
+ [SerializeField]
+ List charDictKeys;
+ [SerializeField]
+ List charDictValues;
+
+ ///
+ /// Returns an array of platform names.
+ ///
+ public string[] fontPlatforms = null;
+
+ ///
+ /// Returns an array of GUIDs, each referring to an actual tk2dFontData object
+ /// This object contains the actual font for the platform.
+ ///
+ public string[] fontPlatformGUIDs = null;
+
+ tk2dFontData platformSpecificData = null;
+ public bool hasPlatformData = false;
+ public bool managedFont = false;
+ public bool needMaterialInstance = false;
+ public bool isPacked = false;
+ public bool premultipliedAlpha = false;
+
+ public tk2dSpriteCollectionData spriteCollection = null;
+
+ // Returns the active instance
+ public tk2dFontData inst
+ {
+ get
+ {
+ if (platformSpecificData == null || platformSpecificData.materialInst == null)
+ {
+ if (hasPlatformData)
+ {
+ string systemPlatform = tk2dSystem.CurrentPlatform;
+ string guid = "";
+
+ for (int i = 0; i < fontPlatforms.Length; ++i)
+ {
+ if (fontPlatforms[i] == systemPlatform)
+ {
+ guid = fontPlatformGUIDs[i];
+ break;
+ }
+ }
+ if (guid.Length == 0)
+ guid = fontPlatformGUIDs[0]; // failed to find platform, pick the first one
+
+ platformSpecificData = tk2dSystem.LoadResourceByGUID(guid);
+ }
+ else
+ {
+ platformSpecificData = this;
+ }
+ platformSpecificData.Init(); // awake is never called, so we initialize explicitly
+ }
+ return platformSpecificData;
+ }
+ }
+
+ void Init()
+ {
+ if (needMaterialInstance)
+ {
+ if (spriteCollection)
+ {
+ tk2dSpriteCollectionData spriteCollectionInst = spriteCollection.inst;
+ for (int i = 0; i < spriteCollectionInst.materials.Length; ++i)
+ {
+ if (spriteCollectionInst.materials[i] == material)
+ {
+ materialInst = spriteCollectionInst.materialInsts[i];
+ break;
+ }
+ }
+ if (materialInst == null)
+ Debug.LogError("Fatal error - font from sprite collection is has an invalid material");
+ }
+ else
+ {
+ materialInst = Instantiate(material) as Material;
+ materialInst.hideFlags = HideFlags.DontSave;
+ }
+ }
+ else
+ {
+ materialInst = material;
+ }
+ }
+
+ public void ResetPlatformData()
+ {
+ if (hasPlatformData && platformSpecificData)
+ {
+ platformSpecificData = null;
+ }
+
+ materialInst = null;
+ }
+
+ void OnDestroy()
+ {
+ // if material is from a sprite collection
+ if (needMaterialInstance && spriteCollection == null)
+ DestroyImmediate(materialInst);
+ }
+
+ ///
+ /// Dictionary of characters. This is used when chars is null. Chars is preferred when number of characters is low (< 2048).
+ ///
+ ///
+ public Dictionary charDict;
+
+ ///
+ /// Whether this font uses the dictionary or an array for character lookup.
+ ///
+ public bool useDictionary = false;
+
+ ///
+ /// Array of
+ ///
+ public tk2dFontKerning[] kerning;
+
+ ///
+ /// Width of the largest character
+ ///
+ public float largestWidth;
+
+ ///
+ /// Material used by this font
+ ///
+ public Material material;
+
+ [System.NonSerialized]
+ public Material materialInst;
+
+ // Gradients
+
+ ///
+ /// Reference to gradient texture
+ ///
+ public Texture2D gradientTexture;
+ ///
+ /// Does this font have gradients? Used to determine if second uv channel is necessary.
+ ///
+ public bool textureGradients;
+ ///
+ /// Number of gradients in list.
+ /// Used to determine how large the gradient uvs are and the offsets into the gradient lookup texture.
+ ///
+ public int gradientCount = 1;
+
+ public Vector2 texelSize;
+
+ [HideInInspector]
+ ///
+ /// The size of the inv ortho size used to generate the sprite collection.
+ ///
+ public float invOrthoSize = 1.0f;
+
+ [HideInInspector]
+ ///
+ /// Half of the target height used to generate the sprite collection.
+ ///
+ public float halfTargetHeight = 1.0f;
+
+ ///
+ /// Initializes the dictionary, if it is required
+ ///
+ public void InitDictionary()
+ {
+ if (useDictionary && charDict == null)
+ {
+ charDict = new Dictionary(charDictKeys.Count);
+ for (int i = 0; i < charDictKeys.Count; ++i)
+ {
+ charDict[charDictKeys[i]] = charDictValues[i];
+ }
+ }
+ }
+
+ ///
+ /// Internal function to set up the dictionary
+ ///
+ public void SetDictionary(Dictionary dict)
+ {
+ charDictKeys = new List(dict.Keys);
+ charDictValues = new List();
+ for (int i = 0; i < charDictKeys.Count; ++i)
+ {
+ charDictValues.Add(dict[charDictKeys[i]]);
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs.meta
new file mode 100644
index 000000000..ddf2ba91c
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dFontData.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 023bfc31841d2f24ba7eb00462467382
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31050
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs
new file mode 100644
index 000000000..af9844e8b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs
@@ -0,0 +1,460 @@
+using UnityEngine;
+
+public static class tk2dTextGeomGen
+{
+ public class GeomData
+ {
+ internal tk2dTextMeshData textMeshData = null;
+ internal tk2dFontData fontInst = null;
+ internal string formattedText = "";
+ }
+
+ // Use this to get a correctly set up textgeomdata object
+ // This uses a static global tmpData object and is not thread safe
+ // Fortunately for us, neither is the rest of Unity.
+ public static GeomData Data(tk2dTextMeshData textMeshData, tk2dFontData fontData, string formattedText) {
+ tmpData.textMeshData = textMeshData;
+ tmpData.fontInst = fontData;
+ tmpData.formattedText = formattedText;
+ return tmpData;
+ }
+ private static GeomData tmpData = new GeomData();
+
+ ///
+ /// Calculates the mesh dimensions for the given string
+ /// and returns a width and height.
+ ///
+ public static Vector2 GetMeshDimensionsForString(string str, GeomData geomData)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+ tk2dFontData _fontInst = geomData.fontInst;
+
+ float maxWidth = 0.0f;
+
+ float cursorX = 0.0f;
+ float cursorY = 0.0f;
+
+ bool ignoreNextCharacter = false;
+ int target = 0;
+ for (int i = 0; i < str.Length && target < data.maxChars; ++i)
+ {
+ if (ignoreNextCharacter) {
+ ignoreNextCharacter = false;
+ continue;
+ }
+
+ int idx = str[i];
+ if (idx == '\n')
+ {
+ maxWidth = Mathf.Max(cursorX, maxWidth);
+ cursorX = 0.0f;
+ cursorY -= (_fontInst.lineHeight + data.lineSpacing) * data.scale.y;
+ continue;
+ }
+ else if (data.inlineStyling)
+ {
+ if (idx == '^' && i + 1 < str.Length)
+ {
+ if (str[i + 1] == '^') {
+ ignoreNextCharacter = true;
+ } else {
+ int cmdLength = 0;
+ switch (str[i + 1]) {
+ case 'c': cmdLength = 5; break;
+ case 'C': cmdLength = 9; break;
+ case 'g': cmdLength = 9; break;
+ case 'G': cmdLength = 17; break;
+ }
+ i += cmdLength;
+ continue;
+ }
+ }
+ }
+
+ bool inlineHatChar = (idx == '^');
+
+ // Get the character from dictionary / array
+ tk2dFontChar chr;
+ if (_fontInst.useDictionary)
+ {
+ if (!_fontInst.charDict.ContainsKey(idx)) idx = 0;
+ chr = _fontInst.charDict[idx];
+ }
+ else
+ {
+ if (idx >= _fontInst.chars.Length) idx = 0; // should be space
+ chr = _fontInst.chars[idx];
+ }
+
+ if (inlineHatChar) idx = '^';
+
+ cursorX += (chr.advance + data.spacing) * data.scale.x;
+ if (data.kerning && i < str.Length - 1)
+ {
+ foreach (var k in _fontInst.kerning)
+ {
+ if (k.c0 == str[i] && k.c1 == str[i+1])
+ {
+ cursorX += k.amount * data.scale.x;
+ break;
+ }
+ }
+ }
+
+ ++target;
+ }
+
+ maxWidth = Mathf.Max(cursorX, maxWidth);
+ cursorY -= (_fontInst.lineHeight + data.lineSpacing) * data.scale.y;
+
+ return new Vector2(maxWidth, cursorY);
+ }
+
+ public static float GetYAnchorForHeight(float textHeight, GeomData geomData)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+ tk2dFontData _fontInst = geomData.fontInst;
+
+ int heightAnchor = (int)data.anchor / 3;
+ float lineHeight = (_fontInst.lineHeight + data.lineSpacing) * data.scale.y;
+ switch (heightAnchor)
+ {
+ case 0: return -lineHeight;
+ case 1:
+ {
+ float y = -textHeight / 2.0f - lineHeight;
+ if (_fontInst.version >= 2)
+ {
+ float ty = _fontInst.texelSize.y * data.scale.y;
+ return Mathf.Floor(y / ty) * ty;
+ }
+ else return y;
+ }
+ case 2: return -textHeight - lineHeight;
+ }
+ return -lineHeight;
+ }
+
+ public static float GetXAnchorForWidth(float lineWidth, GeomData geomData)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+ tk2dFontData _fontInst = geomData.fontInst;
+
+ int widthAnchor = (int)data.anchor % 3;
+ switch (widthAnchor)
+ {
+ case 0: return 0.0f; // left
+ case 1: // center
+ {
+ float x = -lineWidth / 2.0f;
+ if (_fontInst.version >= 2)
+ {
+ float tx = _fontInst.texelSize.x * data.scale.x;
+ return Mathf.Floor(x / tx) * tx;
+ }
+ return x;
+ }
+ case 2: return -lineWidth; // right
+ }
+ return 0.0f;
+ }
+
+ static void PostAlignTextData(Vector3[] pos, int offset, int targetStart, int targetEnd, float offsetX)
+ {
+ for (int i = targetStart * 4; i < targetEnd * 4; ++i)
+ {
+ Vector3 v = pos[offset + i];
+ v.x += offsetX;
+ pos[offset + i] = v;
+ }
+ }
+
+ // Channel select color constants
+ static readonly Color32[] channelSelectColors = new Color32[] { new Color32(0,0,255,0), new Color(0,255,0,0), new Color(255,0,0,0), new Color(0,0,0,255) };
+
+ // Inline styling
+ static Color32 meshTopColor = new Color32(255, 255, 255, 255);
+ static Color32 meshBottomColor = new Color32(255, 255, 255, 255);
+ static float meshGradientTexU = 0.0f;
+ static int curGradientCount = 1;
+
+ static Color32 errorColor = new Color32(255, 0, 255, 255);
+
+ static int GetFullHexColorComponent(int c1, int c2) {
+ int result = 0;
+ if (c1 >= '0' && c1 <= '9') result += (c1 - '0') * 16;
+ else if (c1 >= 'a' && c1 <= 'f') result += (10 + c1 - 'a') * 16;
+ else if (c1 >= 'A' && c1 <= 'F') result += (10 + c1 - 'A') * 16;
+ else return -1;
+ if (c2 >= '0' && c2 <= '9') result += (c2 - '0');
+ else if (c2 >= 'a' && c2 <= 'f') result += (10 + c2 - 'a');
+ else if (c2 >= 'A' && c2 <= 'F') result += (10 + c2 - 'A');
+ else return -1;
+ return result;
+ }
+
+ static int GetCompactHexColorComponent(int c) {
+ if (c >= '0' && c <= '9') return (c - '0') * 17;
+ if (c >= 'a' && c <= 'f') return (10 + c - 'a') * 17;
+ if (c >= 'A' && c <= 'F') return (10 + c - 'A') * 17;
+ return -1;
+ }
+
+ static int GetStyleHexColor(string str, bool fullHex, ref Color32 color) {
+ int r, g, b, a;
+ if (fullHex) {
+ if (str.Length < 8) return 1;
+ r = GetFullHexColorComponent(str[0], str[1]);
+ g = GetFullHexColorComponent(str[2], str[3]);
+ b = GetFullHexColorComponent(str[4], str[5]);
+ a = GetFullHexColorComponent(str[6], str[7]);
+ } else {
+ if (str.Length < 4) return 1;
+ r = GetCompactHexColorComponent(str[0]);
+ g = GetCompactHexColorComponent(str[1]);
+ b = GetCompactHexColorComponent(str[2]);
+ a = GetCompactHexColorComponent(str[3]);
+ }
+ if (r == -1 || g == -1 || b == -1 || a == -1) {
+ return 1;
+ }
+ color = new Color32((byte)r, (byte)g, (byte)b, (byte)a);
+ return 0;
+ }
+
+ static int SetColorsFromStyleCommand(string args, bool twoColors, bool fullHex) {
+ int argLength = (twoColors ? 2 : 1) * (fullHex ? 8 : 4);
+ bool error = false;
+ if (args.Length >= argLength) {
+ if (GetStyleHexColor(args, fullHex, ref meshTopColor) != 0) {
+ error = true;
+ }
+ if (twoColors) {
+ string color2 = args.Substring (fullHex ? 8 : 4);
+ if (GetStyleHexColor(color2, fullHex, ref meshBottomColor) != 0) {
+ error = true;
+ }
+ }
+ else {
+ meshBottomColor = meshTopColor;
+ }
+ }
+ else {
+ error = true;
+ }
+ if (error) {
+ meshTopColor = meshBottomColor = errorColor;
+ }
+ return argLength;
+ }
+
+ static void SetGradientTexUFromStyleCommand(int arg) {
+ meshGradientTexU = (float)(arg - '0') / (float)((curGradientCount > 0) ? curGradientCount : 1);
+ }
+
+ static int HandleStyleCommand(string cmd) {
+ if (cmd.Length == 0) return 0;
+
+ int cmdSymbol = cmd[0];
+ string cmdArgs = cmd.Substring(1);
+ int cmdLength = 0;
+
+ switch (cmdSymbol) {
+ case 'c': cmdLength = 1 + SetColorsFromStyleCommand(cmdArgs, false, false); break;
+ case 'C': cmdLength = 1 + SetColorsFromStyleCommand(cmdArgs, false, true); break;
+ case 'g': cmdLength = 1 + SetColorsFromStyleCommand(cmdArgs, true, false); break;
+ case 'G': cmdLength = 1 + SetColorsFromStyleCommand(cmdArgs, true, true); break;
+ }
+ if (cmdSymbol >= '0' && cmdSymbol <= '9') {
+ SetGradientTexUFromStyleCommand(cmdSymbol);
+ cmdLength = 1;
+ }
+
+ return cmdLength;
+ }
+
+
+
+
+ public static void GetTextMeshGeomDesc(out int numVertices, out int numIndices, GeomData geomData)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+
+ numVertices = data.maxChars * 4;
+ numIndices = data.maxChars * 6;
+ }
+
+ public static int SetTextMeshGeom(Vector3[] pos, Vector2[] uv, Vector2[] uv2, Color32[] color, int offset, GeomData geomData)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+ tk2dFontData fontInst = geomData.fontInst;
+ string formattedText = geomData.formattedText;
+
+ meshTopColor = new Color32(255, 255, 255, 255);
+ meshBottomColor = new Color32(255, 255, 255, 255);
+ meshGradientTexU = (float)data.textureGradient / (float)((fontInst.gradientCount > 0) ? fontInst.gradientCount : 1);
+ curGradientCount = fontInst.gradientCount;
+
+ Vector2 dims = GetMeshDimensionsForString(geomData.formattedText, geomData);
+ float offsetY = GetYAnchorForHeight(dims.y, geomData);
+
+ float cursorX = 0.0f;
+ float cursorY = 0.0f;
+ int target = 0;
+ int alignStartTarget = 0;
+ for (int i = 0; i < formattedText.Length && target < data.maxChars; ++i)
+ {
+ int idx = formattedText[i];
+ tk2dFontChar chr;
+
+ bool inlineHatChar = (idx == '^');
+
+ if (fontInst.useDictionary)
+ {
+ if (!fontInst.charDict.ContainsKey(idx)) idx = 0;
+ chr = fontInst.charDict[idx];
+ }
+ else
+ {
+ if (idx >= fontInst.chars.Length) idx = 0; // should be space
+ chr = fontInst.chars[idx];
+ }
+
+ if (inlineHatChar) idx = '^';
+
+ if (idx == '\n')
+ {
+ float lineWidth = cursorX;
+ int alignEndTarget = target; // this is one after the last filled character
+ if (alignStartTarget != target)
+ {
+ float xOffset = GetXAnchorForWidth(lineWidth, geomData);
+ PostAlignTextData(pos, offset, alignStartTarget, alignEndTarget, xOffset);
+ }
+
+
+ alignStartTarget = target;
+ cursorX = 0.0f;
+ cursorY -= (fontInst.lineHeight + data.lineSpacing) * data.scale.y;
+ continue;
+ }
+ else if (data.inlineStyling)
+ {
+ if (idx == '^')
+ {
+ if (i + 1 < formattedText.Length && formattedText[i + 1] == '^') {
+ ++i;
+ } else {
+ i += HandleStyleCommand(formattedText.Substring(i + 1));
+ continue;
+ }
+ }
+ }
+
+ pos[offset + target * 4 + 0] = new Vector3(cursorX + chr.p0.x * data.scale.x, offsetY + cursorY + chr.p0.y * data.scale.y, 0);
+ pos[offset + target * 4 + 1] = new Vector3(cursorX + chr.p1.x * data.scale.x, offsetY + cursorY + chr.p0.y * data.scale.y, 0);
+ pos[offset + target * 4 + 2] = new Vector3(cursorX + chr.p0.x * data.scale.x, offsetY + cursorY + chr.p1.y * data.scale.y, 0);
+ pos[offset + target * 4 + 3] = new Vector3(cursorX + chr.p1.x * data.scale.x, offsetY + cursorY + chr.p1.y * data.scale.y, 0);
+
+ if (chr.flipped)
+ {
+ uv[offset + target * 4 + 0] = new Vector2(chr.uv1.x, chr.uv1.y);
+ uv[offset + target * 4 + 1] = new Vector2(chr.uv1.x, chr.uv0.y);
+ uv[offset + target * 4 + 2] = new Vector2(chr.uv0.x, chr.uv1.y);
+ uv[offset + target * 4 + 3] = new Vector2(chr.uv0.x, chr.uv0.y);
+ }
+ else
+ {
+ uv[offset + target * 4 + 0] = new Vector2(chr.uv0.x, chr.uv0.y);
+ uv[offset + target * 4 + 1] = new Vector2(chr.uv1.x, chr.uv0.y);
+ uv[offset + target * 4 + 2] = new Vector2(chr.uv0.x, chr.uv1.y);
+ uv[offset + target * 4 + 3] = new Vector2(chr.uv1.x, chr.uv1.y);
+ }
+
+ if (fontInst.textureGradients)
+ {
+ uv2[offset + target * 4 + 0] = chr.gradientUv[0] + new Vector2(meshGradientTexU, 0);
+ uv2[offset + target * 4 + 1] = chr.gradientUv[1] + new Vector2(meshGradientTexU, 0);
+ uv2[offset + target * 4 + 2] = chr.gradientUv[2] + new Vector2(meshGradientTexU, 0);
+ uv2[offset + target * 4 + 3] = chr.gradientUv[3] + new Vector2(meshGradientTexU, 0);
+ }
+
+ if (fontInst.isPacked)
+ {
+ Color32 c = channelSelectColors[chr.channel];
+ color[offset + target * 4 + 0] = c;
+ color[offset + target * 4 + 1] = c;
+ color[offset + target * 4 + 2] = c;
+ color[offset + target * 4 + 3] = c;
+ }
+ else {
+ color[offset + target * 4 + 0] = meshTopColor;
+ color[offset + target * 4 + 1] = meshTopColor;
+ color[offset + target * 4 + 2] = meshBottomColor;
+ color[offset + target * 4 + 3] = meshBottomColor;
+ }
+
+ cursorX += (chr.advance + data.spacing) * data.scale.x;
+
+ if (data.kerning && i < formattedText.Length - 1)
+ {
+ foreach (var k in fontInst.kerning)
+ {
+ if (k.c0 == formattedText[i] && k.c1 == formattedText[i+1])
+ {
+ cursorX += k.amount * data.scale.x;
+ break;
+ }
+ }
+ }
+
+ ++target;
+ }
+
+ if (alignStartTarget != target)
+ {
+ float lineWidth = cursorX;
+ int alignEndTarget = target;
+ float xOffset = GetXAnchorForWidth(lineWidth, geomData);
+ PostAlignTextData(pos, offset, alignStartTarget, alignEndTarget, xOffset);
+ }
+
+ for (int i = target; i < data.maxChars; ++i)
+ {
+ pos[offset + i * 4 + 0] = pos[offset + i * 4 + 1] = pos[offset + i * 4 + 2] = pos[offset + i * 4 + 3] = Vector3.zero;
+ uv[offset + i * 4 + 0] = uv[offset + i * 4 + 1] = uv[offset + i * 4 + 2] = uv[offset + i * 4 + 3] = Vector2.zero;
+ if (fontInst.textureGradients)
+ {
+ uv2[offset + i * 4 + 0] = uv2[offset + i * 4 + 1] = uv2[offset + i * 4 + 2] = uv2[offset + i * 4 + 3] = Vector2.zero;
+ }
+
+ if (!fontInst.isPacked)
+ {
+ color[offset + i * 4 + 0] = color[offset + i * 4 + 1] = meshTopColor;
+ color[offset + i * 4 + 2] = color[offset + i * 4 + 3] = meshBottomColor;
+ }
+ else
+ {
+ color[offset + i * 4 + 0] = color[offset + i * 4 + 1] = color[offset + i * 4 + 2] = color[offset + i * 4 + 3] = Color.clear;
+ }
+
+
+ }
+
+ return target;
+ }
+
+ public static void SetTextMeshIndices(int[] indices, int offset, int vStart, GeomData geomData, int target)
+ {
+ tk2dTextMeshData data = geomData.textMeshData;
+ for (int i = 0; i < data.maxChars; ++i)
+ {
+ indices[offset + i * 6 + 0] = vStart + i * 4 + 0;
+ indices[offset + i * 6 + 1] = vStart + i * 4 + 1;
+ indices[offset + i * 6 + 2] = vStart + i * 4 + 3;
+ indices[offset + i * 6 + 3] = vStart + i * 4 + 2;
+ indices[offset + i * 6 + 4] = vStart + i * 4 + 0;
+ indices[offset + i * 6 + 5] = vStart + i * 4 + 3;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs.meta
new file mode 100644
index 000000000..f877ab14f
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextGeomGen.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cbb6cb96904453e40b32d2886bf7a1e2
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs
new file mode 100644
index 000000000..ca48c06a1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs
@@ -0,0 +1,724 @@
+using UnityEngine;
+using System.Collections;
+
+[System.Serializable]
+public class tk2dTextMeshData
+{
+ public int version = 0;
+
+ public tk2dFontData font;
+ public string text = "";
+ public Color color = Color.white;
+ public Color color2 = Color.white;
+ public bool useGradient = false;
+ public int textureGradient = 0;
+ public TextAnchor anchor = TextAnchor.LowerLeft;
+ public int renderLayer = 0;
+ public Vector3 scale = Vector3.one;
+ public bool kerning = false;
+ public int maxChars = 16;
+ public bool inlineStyling = false;
+
+ public bool formatting = false;
+ public int wordWrapWidth = 0;
+
+ public float spacing = 0.0f;
+ public float lineSpacing = 0.0f;
+}
+
+[ExecuteInEditMode]
+[RequireComponent(typeof(MeshFilter))]
+[RequireComponent(typeof(MeshRenderer))]
+[AddComponentMenu("2D Toolkit/Text/tk2dTextMesh")]
+///
+/// Text mesh
+///
+public class tk2dTextMesh : MonoBehaviour, tk2dRuntime.ISpriteCollectionForceBuild
+{
+ tk2dFontData _fontInst;
+ string _formattedText = "";
+
+ // This stuff now kept in tk2dTextMeshData. Remove in future version.
+ [SerializeField] tk2dFontData _font = null;
+ [SerializeField] string _text = "";
+ [SerializeField] Color _color = Color.white;
+ [SerializeField] Color _color2 = Color.white;
+ [SerializeField] bool _useGradient = false;
+ [SerializeField] int _textureGradient = 0;
+ [SerializeField] TextAnchor _anchor = TextAnchor.LowerLeft;
+ [SerializeField] Vector3 _scale = new Vector3(1.0f, 1.0f, 1.0f);
+ [SerializeField] bool _kerning = false;
+ [SerializeField] int _maxChars = 16;
+ [SerializeField] bool _inlineStyling = false;
+
+ [SerializeField] bool _formatting = false;
+ [SerializeField] int _wordWrapWidth = 0;
+
+ [SerializeField] float spacing = 0.0f;
+ [SerializeField] float lineSpacing = 0.0f;
+
+ // Holding the data in this struct for the next version
+ [SerializeField] tk2dTextMeshData data = new tk2dTextMeshData();
+
+ // Batcher needs to grab this
+ public string FormattedText {
+ get {return _formattedText;}
+ }
+
+ void UpgradeData()
+ {
+ if (data.version != 1)
+ {
+ data.font = _font;
+ data.text = _text;
+ data.color = _color;
+ data.color2 = _color2;
+ data.useGradient = _useGradient;
+ data.textureGradient = _textureGradient;
+ data.anchor = _anchor;
+ data.scale = _scale;
+ data.kerning = _kerning;
+ data.maxChars = _maxChars;
+ data.inlineStyling = _inlineStyling;
+ data.formatting = _formatting;
+ data.wordWrapWidth = _wordWrapWidth;
+ data.spacing = spacing;
+ data.lineSpacing = lineSpacing;
+ }
+ data.version = 1;
+ }
+
+ Vector3[] vertices;
+ Vector2[] uvs;
+ Vector2[] uv2;
+ Color32[] colors;
+ Color32[] untintedColors;
+
+ static int GetInlineStyleCommandLength(int cmdSymbol) {
+ int val = 0;
+ switch (cmdSymbol) {
+ case 'c': val = 5; break; // cRGBA
+ case 'C': val = 9; break; // CRRGGBBAA
+ case 'g': val = 9; break; // gRGBARGBA
+ case 'G': val = 17; break; // GRRGGBBAARRGGBBAA
+ }
+ return val;
+ }
+
+ ///
+ /// Formats the string using the current settings, and returns the formatted string.
+ /// You can use this if you need to calculate how many lines your string is going to be wrapped to.
+ ///
+ public string FormatText(string unformattedString) {
+ string returnValue = "";
+ FormatText(ref returnValue, unformattedString);
+ return returnValue;
+ }
+
+ void FormatText() {
+ FormatText(ref _formattedText, data.text);
+ }
+
+ void FormatText(ref string _targetString, string _source)
+ {
+ if (formatting == false || wordWrapWidth == 0 || _fontInst.texelSize == Vector2.zero)
+ {
+ _targetString = _source;
+ return;
+ }
+
+ float lineWidth = _fontInst.texelSize.x * wordWrapWidth;
+
+ System.Text.StringBuilder target = new System.Text.StringBuilder(_source.Length);
+ float widthSoFar = 0.0f;
+ float wordStart = 0.0f;
+ int targetWordStartIndex = -1;
+ int fmtWordStartIndex = -1;
+ bool ignoreNextCharacter = false;
+ for (int i = 0; i < _source.Length; ++i)
+ {
+ char idx = _source[i];
+ tk2dFontChar chr;
+
+ bool inlineHatChar = (idx == '^');
+
+ if (_fontInst.useDictionary)
+ {
+ if (!_fontInst.charDict.ContainsKey(idx)) idx = (char)0;
+ chr = _fontInst.charDict[idx];
+ }
+ else
+ {
+ if (idx >= _fontInst.chars.Length) idx = (char)0; // should be space
+ chr = _fontInst.chars[idx];
+ }
+
+ if (inlineHatChar) idx = '^';
+
+ if (ignoreNextCharacter) {
+ ignoreNextCharacter = false;
+ continue;
+ }
+
+ if (data.inlineStyling && idx == '^' && i + 1 < _source.Length) {
+ if (_source[i + 1] == '^') {
+ ignoreNextCharacter = true;
+ target.Append('^'); // add the second hat that we'll skip
+ } else {
+ int cmdLength = GetInlineStyleCommandLength(_source[i + 1]);
+ int skipLength = 1 + cmdLength; // The ^ plus the command
+ for (int j = 0; j < skipLength; ++j) {
+ if (i + j < _source.Length) {
+ target.Append(_source[i + j]);
+ }
+ }
+ i += skipLength - 1;
+ continue;
+ }
+ }
+
+ if (idx == '\n')
+ {
+ widthSoFar = 0.0f;
+ wordStart = 0.0f;
+ targetWordStartIndex = target.Length;
+ fmtWordStartIndex = i;
+ }
+ else if (idx == ' '/* || idx == '.' || idx == ',' || idx == ':' || idx == ';' || idx == '!'*/)
+ {
+ /*if ((widthSoFar + chr.p1.x * data.scale.x) > lineWidth)
+ {
+ target.Append('\n');
+ widthSoFar = chr.advance * data.scale.x;
+ }
+ else
+ {*/
+ widthSoFar += (chr.advance + data.spacing) * data.scale.x;
+ //}
+
+ wordStart = widthSoFar;
+ targetWordStartIndex = target.Length;
+ fmtWordStartIndex = i;
+ }
+ else
+ {
+ if ((widthSoFar + chr.p1.x * data.scale.x) > lineWidth)
+ {
+ // If the last word started after the start of the line
+ if (wordStart > 0.0f)
+ {
+ wordStart = 0.0f;
+ widthSoFar = 0.0f;
+ // rewind
+ target.Remove(targetWordStartIndex + 1, target.Length - targetWordStartIndex - 1);
+ target.Append('\n');
+ i = fmtWordStartIndex;
+ continue; // don't add this character
+ }
+ else
+ {
+ target.Append('\n');
+ widthSoFar = (chr.advance + data.spacing) * data.scale.x;
+ }
+ }
+ else
+ {
+ widthSoFar += (chr.advance + data.spacing) * data.scale.x;
+ }
+ }
+
+ target.Append(idx);
+ }
+ _targetString = target.ToString();
+ }
+
+ [System.FlagsAttribute]
+ enum UpdateFlags
+ {
+ UpdateNone = 0,
+ UpdateText = 1, // update text vertices & uvs
+ UpdateColors = 2, // only colors have changed
+ UpdateBuffers = 4, // update buffers (maxchars has changed)
+ };
+ UpdateFlags updateFlags = UpdateFlags.UpdateBuffers;
+
+ Mesh mesh;
+ MeshFilter meshFilter;
+
+ void SetNeedUpdate(UpdateFlags uf) {
+ if (updateFlags == UpdateFlags.UpdateNone) {
+ updateFlags |= uf;
+ tk2dUpdateManager.QueueCommit(this);
+ }
+ else {
+ // Already queued
+ updateFlags |= uf;
+ }
+ }
+
+ // accessors
+ /// Gets or sets the font. Call to commit changes.
+ public tk2dFontData font
+ {
+ get { UpgradeData(); return data.font; }
+ set
+ {
+ UpgradeData();
+ data.font = value;
+ _fontInst = data.font.inst;
+ SetNeedUpdate( UpdateFlags.UpdateText );
+
+ UpdateMaterial();
+ }
+ }
+
+ /// Enables or disables formatting. Call to commit changes.
+ public bool formatting
+ {
+ get { UpgradeData(); return data.formatting; }
+ set
+ {
+ UpgradeData();
+ if (data.formatting != value)
+ {
+ data.formatting = value;
+ SetNeedUpdate( UpdateFlags.UpdateText );
+ }
+ }
+ }
+
+ /// Change word wrap width. This only works when formatting is enabled.
+ /// Call to commit changes.
+ public int wordWrapWidth
+ {
+ get { UpgradeData(); return data.wordWrapWidth; }
+ set { UpgradeData(); if (data.wordWrapWidth != value) { data.wordWrapWidth = value; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ }
+
+ /// Gets or sets the text. Call to commit changes.
+ public string text
+ {
+ get { UpgradeData(); return data.text; }
+ set
+ {
+ UpgradeData();
+ data.text = value;
+ SetNeedUpdate(UpdateFlags.UpdateText);
+ }
+ }
+
+ /// Gets or sets the color. Call to commit changes.
+ public Color color { get { UpgradeData(); return data.color; } set { UpgradeData(); data.color = value; SetNeedUpdate(UpdateFlags.UpdateColors); } }
+ /// Gets or sets the secondary color (used in the gradient). Call to commit changes.
+ public Color color2 { get { UpgradeData(); return data.color2; } set { UpgradeData(); data.color2 = value; SetNeedUpdate(UpdateFlags.UpdateColors); } }
+ /// Use vertex vertical gradient. Call to commit changes.
+ public bool useGradient { get { UpgradeData(); return data.useGradient; } set { UpgradeData(); data.useGradient = value; SetNeedUpdate(UpdateFlags.UpdateColors); } }
+ /// Gets or sets the text anchor. Call to commit changes.
+ public TextAnchor anchor { get { UpgradeData(); return data.anchor; } set { UpgradeData(); data.anchor = value; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ /// Gets or sets the scale. Call to commit changes.
+ public Vector3 scale { get { UpgradeData(); return data.scale; } set { UpgradeData(); data.scale = value; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ /// Gets or sets kerning state. Call to commit changes.
+ public bool kerning { get { UpgradeData(); return data.kerning; } set { UpgradeData(); data.kerning = value; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ /// Gets or sets maxChars. Call to commit changes.
+ /// NOTE: This will free & allocate memory, avoid using at runtime.
+ ///
+ public int maxChars { get { UpgradeData(); return data.maxChars; } set { UpgradeData(); data.maxChars = value; SetNeedUpdate(UpdateFlags.UpdateBuffers); } }
+ /// Gets or sets the default texture gradient.
+ /// You can also change texture gradient inline by using ^1 - ^9 sequences within your text.
+ /// Call to commit changes.
+ public int textureGradient { get { UpgradeData(); return data.textureGradient; } set { UpgradeData(); data.textureGradient = value % font.gradientCount; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ /// Enables or disables inline styling (texture gradient). Call to commit changes.
+ public bool inlineStyling { get { UpgradeData(); return data.inlineStyling; } set { UpgradeData(); data.inlineStyling = value; SetNeedUpdate(UpdateFlags.UpdateText); } }
+ /// Additional spacing between characters.
+ /// This can be negative to bring characters closer together.
+ /// Call to commit changes.
+ public float Spacing { get { UpgradeData(); return data.spacing; } set { UpgradeData(); if (data.spacing != value) { data.spacing = value; SetNeedUpdate(UpdateFlags.UpdateText); } } }
+ /// Additional line spacing for multieline text.
+ /// This can be negative to bring lines closer together.
+ /// Call to commit changes.
+ public float LineSpacing { get { UpgradeData(); return data.lineSpacing; } set { UpgradeData(); if (data.lineSpacing != value) { data.lineSpacing = value; SetNeedUpdate(UpdateFlags.UpdateText); } } }
+
+ ///
+ /// Gets or sets the sorting order
+ /// The sorting order lets you override draw order for sprites which are at the same z position
+ /// It is similar to offsetting in z - the sprite stays at the original position
+ /// This corresponds to the renderer.sortingOrder property in Unity 4.3
+ ///
+ public int SortingOrder { get { return data.renderLayer; } set { if (data.renderLayer != value) { data.renderLayer = value; SetNeedUpdate(UpdateFlags.UpdateText); } } }
+
+ void InitInstance()
+ {
+ if (_fontInst == null && data.font != null)
+ _fontInst = data.font.inst;
+ }
+
+ // Use this for initialization
+ void Awake()
+ {
+ UpgradeData();
+ if (data.font != null)
+ _fontInst = data.font.inst;
+
+ // force rebuild when awakened, for when the object has been pooled, etc
+ // this is probably not the best way to do it
+ updateFlags = UpdateFlags.UpdateBuffers;
+
+ if (data.font != null)
+ {
+ Init();
+ UpdateMaterial();
+ }
+
+ // Sensibly reset, so tk2dUpdateManager can deal with this properly
+ updateFlags = UpdateFlags.UpdateNone;
+ }
+
+ protected void OnDestroy()
+ {
+ if (meshFilter == null)
+ {
+ meshFilter = GetComponent();
+ }
+ if (meshFilter != null)
+ {
+ mesh = meshFilter.sharedMesh;
+ }
+
+ if (mesh)
+ {
+ DestroyImmediate(mesh, true);
+ meshFilter.mesh = null;
+ }
+ }
+
+ bool useInlineStyling { get { return inlineStyling && _fontInst.textureGradients; } }
+
+ ///
+ /// Returns the number of characters drawn for the currently active string.
+ /// This may be less than string.Length - some characters are used as escape codes for switching texture gradient ^0-^9
+ /// Also, there might be more characters in the string than have been allocated for the textmesh, in which case
+ /// the string will be truncated.
+ ///
+ public int NumDrawnCharacters()
+ {
+ int charsDrawn = NumTotalCharacters();
+ if (charsDrawn > data.maxChars) charsDrawn = data.maxChars;
+ return charsDrawn;
+ }
+
+ ///
+ /// Returns the number of characters excluding texture gradient escape codes.
+ ///
+ public int NumTotalCharacters()
+ {
+ InitInstance();
+
+ if ((updateFlags & (UpdateFlags.UpdateText | UpdateFlags.UpdateBuffers)) != 0)
+ FormatText();
+
+ int numChars = 0;
+ for (int i = 0; i < _formattedText.Length; ++i)
+ {
+ int idx = _formattedText[i];
+
+ bool inlineHatChar = (idx == '^');
+
+ if (_fontInst.useDictionary)
+ {
+ if (!_fontInst.charDict.ContainsKey(idx)) idx = 0;
+ }
+ else
+ {
+ if (idx >= _fontInst.chars.Length) idx = 0; // should be space
+ }
+
+ if (inlineHatChar) idx = '^';
+
+ if (idx == '\n')
+ {
+ continue;
+ }
+ else if (data.inlineStyling)
+ {
+ if (idx == '^' && i + 1 < _formattedText.Length)
+ {
+ if (_formattedText[i + 1] == '^') {
+ ++i;
+ } else {
+ i += GetInlineStyleCommandLength(_formattedText[i + 1]);
+ continue;
+ }
+ }
+ }
+
+ ++numChars;
+ }
+ return numChars;
+ }
+
+ [System.Obsolete]
+ public Vector2 GetMeshDimensionsForString(string str) {
+ return tk2dTextGeomGen.GetMeshDimensionsForString(str, tk2dTextGeomGen.Data( data, _fontInst, _formattedText ));
+ }
+
+ ///
+ /// Calculates an estimated bounds for the given string if it were rendered
+ /// using the current settings.
+ /// This expects an unformatted string and will wrap the string if required.
+ ///
+ public Bounds GetEstimatedMeshBoundsForString( string str ) {
+ tk2dTextGeomGen.GeomData geomData = tk2dTextGeomGen.Data( data, _fontInst, _formattedText );
+ Vector2 dims = tk2dTextGeomGen.GetMeshDimensionsForString( FormatText( str ), geomData);
+ float offsetY = tk2dTextGeomGen.GetYAnchorForHeight(dims.y, geomData);
+ float offsetX = tk2dTextGeomGen.GetXAnchorForWidth(dims.x, geomData);
+ float lineHeight = (_fontInst.lineHeight + data.lineSpacing) * data.scale.y;
+ return new Bounds( new Vector3(offsetX + dims.x * 0.5f, offsetY + dims.y * 0.5f + lineHeight, 0), Vector3.Scale(dims, new Vector3(1, -1, 1)) );
+ }
+
+ public void Init(bool force)
+ {
+ if (force)
+ {
+ SetNeedUpdate(UpdateFlags.UpdateBuffers);
+ }
+ Init();
+ }
+
+ public void Init()
+ {
+ if (_fontInst && ((updateFlags & UpdateFlags.UpdateBuffers) != 0 || mesh == null))
+ {
+ _fontInst.InitDictionary();
+ FormatText();
+
+ var geomData = tk2dTextGeomGen.Data( data, _fontInst, _formattedText );
+
+ // volatile data
+ int numVertices;
+ int numIndices;
+ tk2dTextGeomGen.GetTextMeshGeomDesc(out numVertices, out numIndices, geomData);
+ vertices = new Vector3[numVertices];
+ uvs = new Vector2[numVertices];
+ colors = new Color32[numVertices];
+ untintedColors = new Color32[numVertices];
+ if (_fontInst.textureGradients)
+ {
+ uv2 = new Vector2[numVertices];
+ }
+ int[] triangles = new int[numIndices];
+
+
+ int target = tk2dTextGeomGen.SetTextMeshGeom(vertices, uvs, uv2, untintedColors, 0, geomData);
+
+ if (!_fontInst.isPacked) {
+ Color32 topColor = data.color;
+ Color32 bottomColor = data.useGradient ? data.color2 : data.color;
+ for (int i = 0; i < numVertices; ++i) {
+ Color32 c = ((i % 4) < 2) ? topColor : bottomColor;
+ byte red = (byte)(((int)untintedColors[i].r * (int)c.r) / 255);
+ byte green = (byte)(((int)untintedColors[i].g * (int)c.g) / 255);
+ byte blue = (byte)(((int)untintedColors[i].b * (int)c.b) / 255);
+ byte alpha = (byte)(((int)untintedColors[i].a * (int)c.a) / 255);
+ if (_fontInst.premultipliedAlpha) {
+ red = (byte)(((int)red * (int)alpha) / 255);
+ green = (byte)(((int)green * (int)alpha) / 255);
+ blue = (byte)(((int)blue * (int)alpha) / 255);
+ }
+ colors[i] = new Color32(red, green, blue, alpha);
+ }
+ }
+ else {
+ colors = untintedColors;
+ }
+
+ tk2dTextGeomGen.SetTextMeshIndices(triangles, 0, 0, geomData, target);
+
+
+
+ if (mesh == null)
+ {
+ if (meshFilter == null)
+ meshFilter = GetComponent();
+
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ meshFilter.mesh = mesh;
+ }
+ else
+ {
+ mesh.Clear();
+ }
+ mesh.vertices = vertices;
+ mesh.uv = uvs;
+ if (font.textureGradients)
+ {
+ mesh.uv2 = uv2;
+ }
+ mesh.triangles = triangles;
+ mesh.colors32 = colors;
+ mesh.RecalculateBounds();
+ mesh.bounds = tk2dBaseSprite.AdjustedMeshBounds( mesh.bounds, data.renderLayer );
+
+ updateFlags = UpdateFlags.UpdateNone;
+ }
+ }
+
+ ///
+ /// Calling commit is no longer required on text meshes.
+ /// You can still call commit to manually commit all changes so far in the frame.
+ ///
+ public void Commit() {
+ tk2dUpdateManager.FlushQueues();
+ }
+
+ // Do not call this, its meant fo internal use
+ public void DoNotUse__CommitInternal()
+ {
+ // Make sure instance is set up, might not be when calling from Awake.
+ InitInstance();
+
+ // make sure fonts dictionary is initialized properly before proceeding
+ if (_fontInst == null) {
+ return;
+ }
+ _fontInst.InitDictionary();
+
+ // Can come in here without anything initalized when
+ // instantiated in code
+ if ((updateFlags & UpdateFlags.UpdateBuffers) != 0 || mesh == null)
+ {
+ Init();
+ }
+ else
+ {
+ if ((updateFlags & UpdateFlags.UpdateText) != 0)
+ {
+ FormatText();
+
+ var geomData = tk2dTextGeomGen.Data( data, _fontInst, _formattedText );
+ int target = tk2dTextGeomGen.SetTextMeshGeom(vertices, uvs, uv2, untintedColors, 0, geomData);
+
+ for (int i = target; i < data.maxChars; ++i)
+ {
+ // was/is unnecessary to fill anything else
+ vertices[i * 4 + 0] = vertices[i * 4 + 1] = vertices[i * 4 + 2] = vertices[i * 4 + 3] = Vector3.zero;
+ }
+
+ mesh.vertices = vertices;
+ mesh.uv = uvs;
+ if (_fontInst.textureGradients)
+ {
+ mesh.uv2 = uv2;
+ }
+ if (_fontInst.isPacked) {
+ colors = untintedColors;
+ mesh.colors32 = colors;
+ }
+ if (data.inlineStyling) {
+ SetNeedUpdate(UpdateFlags.UpdateColors);
+ }
+
+ mesh.RecalculateBounds();
+ mesh.bounds = tk2dBaseSprite.AdjustedMeshBounds( mesh.bounds, data.renderLayer );
+ }
+
+ if (!font.isPacked && (updateFlags & UpdateFlags.UpdateColors) != 0) // packed fonts don't support tinting
+ {
+ Color32 topColor = data.color;
+ Color32 bottomColor = data.useGradient ? data.color2 : data.color;
+ for (int i = 0; i < colors.Length; ++i) {
+ Color32 c = ((i % 4) < 2) ? topColor : bottomColor;
+ byte red = (byte)(((int)untintedColors[i].r * (int)c.r) / 255);
+ byte green = (byte)(((int)untintedColors[i].g * (int)c.g) / 255);
+ byte blue = (byte)(((int)untintedColors[i].b * (int)c.b) / 255);
+ byte alpha = (byte)(((int)untintedColors[i].a * (int)c.a) / 255);
+ if (_fontInst.premultipliedAlpha) {
+ red = (byte)(((int)red * (int)alpha) / 255);
+ green = (byte)(((int)green * (int)alpha) / 255);
+ blue = (byte)(((int)blue * (int)alpha) / 255);
+ }
+ colors[i] = new Color32(red, green, blue, alpha);
+ }
+
+ mesh.colors32 = colors;
+ }
+ }
+
+ updateFlags = UpdateFlags.UpdateNone;
+ }
+
+ ///
+ /// Makes the text mesh pixel perfect to the active camera.
+ /// Automatically detects if present
+ /// Otherwise uses Camera.main
+ ///
+ public void MakePixelPerfect()
+ {
+ float s = 1.0f;
+ tk2dCamera cam = tk2dCamera.CameraForLayer(gameObject.layer);
+ if (cam != null)
+ {
+ if (_fontInst.version < 1)
+ {
+ Debug.LogError("Need to rebuild font.");
+ }
+
+ float zdist = (transform.position.z - cam.transform.position.z);
+ float textMeshSize = (_fontInst.invOrthoSize * _fontInst.halfTargetHeight);
+ s = cam.GetSizeAtDistance(zdist) * textMeshSize;
+ }
+ else if (Camera.main)
+ {
+ if (Camera.main.isOrthoGraphic)
+ {
+ s = Camera.main.orthographicSize;
+ }
+ else
+ {
+ float zdist = (transform.position.z - Camera.main.transform.position.z);
+ s = tk2dPixelPerfectHelper.CalculateScaleForPerspectiveCamera(Camera.main.fieldOfView, zdist);
+ }
+ s *= _fontInst.invOrthoSize;
+ }
+ scale = new Vector3(Mathf.Sign(scale.x) * s, Mathf.Sign(scale.y) * s, Mathf.Sign(scale.z) * s);
+ }
+
+ // tk2dRuntime.ISpriteCollectionEditor
+ public bool UsesSpriteCollection(tk2dSpriteCollectionData spriteCollection)
+ {
+ if (data.font != null && data.font.spriteCollection != null)
+ return data.font.spriteCollection == spriteCollection;
+
+ // No easy way to identify this at this stage
+ return true;
+ }
+
+ void UpdateMaterial()
+ {
+ if (renderer.sharedMaterial != _fontInst.materialInst)
+ renderer.material = _fontInst.materialInst;
+ }
+
+ public void ForceBuild()
+ {
+ if (data.font != null)
+ {
+ _fontInst = data.font.inst;
+ UpdateMaterial();
+ }
+ Init(true);
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (mesh != null) {
+ Bounds b = mesh.bounds;
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube(b.center, b.extents * 2);
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs.meta
new file mode 100644
index 000000000..111503e06
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Fonts/tk2dTextMesh.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 994457055a9434b4aa7b65ad37262d67
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30090
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Gui.meta b/Chromacore/Assets/Plugins/tk2d/Code/Gui.meta
new file mode 100644
index 000000000..739f5ba83
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Gui.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 936e983fdfd4fc9428c1a391d81b89d2
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs b/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs
new file mode 100644
index 000000000..7d2fbe346
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs
@@ -0,0 +1,397 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Deprecated/GUI/tk2dButton")]
+public class tk2dButton : MonoBehaviour
+{
+ ///
+ /// The camera this button is meant to be viewed from.
+ /// Set this explicitly for best performance.\n
+ /// The system will automatically traverse up the hierarchy to find a camera if this is not set.\n
+ /// If nothing is found, it will fall back to the active .\n
+ /// Failing that, it will use Camera.main.
+ ///
+ public Camera viewCamera;
+
+ // Button Up = normal state
+ // Button Down = held down
+ // Button Pressed = after it is pressed and activated
+
+ ///
+ /// The button down sprite. This is resolved by name from the sprite collection of the sprite component.
+ ///
+ public string buttonDownSprite = "button_down";
+ ///
+ /// The button up sprite. This is resolved by name from the sprite collection of the sprite component.
+ ///
+ public string buttonUpSprite = "button_up";
+ ///
+ /// The button pressed sprite. This is resolved by name from the sprite collection of the sprite component.
+ ///
+ public string buttonPressedSprite = "button_up";
+
+ int buttonDownSpriteId = -1, buttonUpSpriteId = -1, buttonPressedSpriteId = -1;
+
+ ///
+ /// Audio clip to play when the button transitions from up to down state. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip buttonDownSound = null;
+ ///
+ /// Audio clip to play when the button transitions from down to up state. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip buttonUpSound = null;
+ ///
+ /// Audio clip to play when the button is pressed. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip buttonPressedSound = null;
+
+
+ // Delegates
+
+ ///
+ /// Button event handler delegate.
+ ///
+ public delegate void ButtonHandlerDelegate(tk2dButton source);
+
+
+ // Messaging
+
+ ///
+ /// Target object to send the message to. The event methods below are significantly more efficient.
+ ///
+ public GameObject targetObject = null;
+ ///
+ /// The message to send to the object. This should be the name of the method which needs to be called.
+ ///
+ public string messageName = "";
+
+ ///
+ /// Occurs when button is pressed (tapped, and finger lifted while inside the button)
+ ///
+ public event ButtonHandlerDelegate ButtonPressedEvent;
+
+ ///
+ /// Occurs every frame for as long as the button is held down.
+ ///
+ public event ButtonHandlerDelegate ButtonAutoFireEvent;
+ ///
+ /// Occurs when button transition from up to down state
+ ///
+ public event ButtonHandlerDelegate ButtonDownEvent;
+ ///
+ /// Occurs when button transitions from down to up state
+ ///
+ public event ButtonHandlerDelegate ButtonUpEvent;
+
+ tk2dBaseSprite sprite;
+ bool buttonDown = false;
+
+ ///
+ /// How much to scale the sprite when the button is in the down state
+ ///
+ public float targetScale = 1.1f;
+ ///
+ /// The length of time the scale operation takes
+ ///
+ public float scaleTime = 0.05f;
+ ///
+ /// How long to wait before allowing the button to be pressed again, in seconds.
+ ///
+ public float pressedWaitTime = 0.3f;
+
+ void OnEnable()
+ {
+ buttonDown = false;
+ }
+
+ // Use this for initialization
+ void Start ()
+ {
+ if (viewCamera == null)
+ {
+ // Find a camera parent
+ Transform node = transform;
+ while (node && node.camera == null)
+ {
+ node = node.parent;
+ }
+ if (node && node.camera != null)
+ {
+ viewCamera = node.camera;
+ }
+
+ // See if a tk2dCamera exists
+ if (viewCamera == null && tk2dCamera.Instance)
+ {
+ viewCamera = tk2dCamera.Instance.camera;
+ }
+
+ // ...otherwise, use the main camera
+ if (viewCamera == null)
+ {
+ viewCamera = Camera.main;
+ }
+ }
+
+ sprite = GetComponent();
+
+ // Further tests for sprite not being null aren't necessary, as the IDs will default to -1 in that case. Testing them will be sufficient
+ if (sprite)
+ {
+ // Change this to use animated sprites if necessary
+ // Same concept here, lookup Ids and call Play(xxx) instead of .spriteId = xxx
+ UpdateSpriteIds();
+ }
+
+ if (collider == null)
+ {
+ BoxCollider newCollider = gameObject.AddComponent();
+ Vector3 colliderSize = newCollider.size;
+ colliderSize.z = 0.2f;
+ newCollider.size = colliderSize;
+ }
+
+ if ((buttonDownSound != null || buttonPressedSound != null || buttonUpSound != null) &&
+ audio == null)
+ {
+ AudioSource audioSource = gameObject.AddComponent();
+ audioSource.playOnAwake = false;
+ }
+ }
+
+ ///
+ /// Call this when the sprite names have changed
+ ///
+ public void UpdateSpriteIds()
+ {
+ buttonDownSpriteId = (buttonDownSprite.Length > 0)?sprite.GetSpriteIdByName(buttonDownSprite):-1;
+ buttonUpSpriteId = (buttonUpSprite.Length > 0)?sprite.GetSpriteIdByName(buttonUpSprite):-1;
+ buttonPressedSpriteId = (buttonPressedSprite.Length > 0)?sprite.GetSpriteIdByName(buttonPressedSprite):-1;
+ }
+
+ // Modify this to suit your audio solution
+ // In our case, we have a global audio manager to play one shot sounds and pool them
+ void PlaySound(AudioClip source)
+ {
+ if (audio && source)
+ {
+ audio.PlayOneShot(source);
+ }
+ }
+
+ IEnumerator coScale(Vector3 defaultScale, float startScale, float endScale)
+ {
+ float t0 = Time.realtimeSinceStartup;
+
+ Vector3 scale = defaultScale;
+ float s = 0.0f;
+ while (s < scaleTime)
+ {
+ float t = Mathf.Clamp01(s / scaleTime);
+ float scl = Mathf.Lerp(startScale, endScale, t);
+ scale = defaultScale * scl;
+ transform.localScale = scale;
+
+ yield return 0;
+ s = (Time.realtimeSinceStartup - t0);
+ }
+
+ transform.localScale = defaultScale * endScale;
+ }
+
+ IEnumerator LocalWaitForSeconds(float seconds)
+ {
+ float t0 = Time.realtimeSinceStartup;
+ float s = 0.0f;
+ while (s < seconds)
+ {
+ yield return 0;
+ s = (Time.realtimeSinceStartup - t0);
+ }
+ }
+
+ IEnumerator coHandleButtonPress(int fingerId)
+ {
+ buttonDown = true; // inhibit processing in Update()
+ bool buttonPressed = true; // the button is currently being pressed
+
+ Vector3 defaultScale = transform.localScale;
+
+ // Button has been pressed for the first time, cursor/finger is still on it
+ if (targetScale != 1.0f)
+ {
+ // Only do this when the scale is actually enabled, to save one frame of latency when not needed
+ yield return StartCoroutine( coScale(defaultScale, 1.0f, targetScale) );
+ }
+ PlaySound(buttonDownSound);
+ if (buttonDownSpriteId != -1)
+ sprite.spriteId = buttonDownSpriteId;
+
+ if (ButtonDownEvent != null)
+ ButtonDownEvent(this);
+
+ while (true)
+ {
+ Vector3 cursorPosition = Vector3.zero;
+ bool cursorActive = true;
+
+ // slightly akward arrangement to keep exact backwards compatibility
+#if !UNITY_FLASH
+ if (fingerId != -1)
+ {
+ bool found = false;
+ for (int i = 0; i < Input.touchCount; ++i)
+ {
+ Touch touch = Input.GetTouch(i);
+ if (touch.fingerId == fingerId)
+ {
+ if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled)
+ break; // treat as not found
+ cursorPosition = touch.position;
+ found = true;
+ }
+ }
+
+ if (!found) cursorActive = false;
+ }
+ else
+#endif
+ {
+ if (!Input.GetMouseButton(0))
+ cursorActive = false;
+ cursorPosition = Input.mousePosition;
+ }
+
+ // user is no longer pressing mouse or no longer touching button
+ if (!cursorActive)
+ break;
+
+ Ray ray = viewCamera.ScreenPointToRay(cursorPosition);
+
+ RaycastHit hitInfo;
+ bool colliderHit = collider.Raycast(ray, out hitInfo, Mathf.Infinity);
+ if (buttonPressed && !colliderHit)
+ {
+ if (targetScale != 1.0f)
+ {
+ // Finger is still on screen / button is still down, but the cursor has left the bounds of the button
+ yield return StartCoroutine( coScale(defaultScale, targetScale, 1.0f) );
+ }
+ PlaySound(buttonUpSound);
+ if (buttonUpSpriteId != -1)
+ sprite.spriteId = buttonUpSpriteId;
+
+ if (ButtonUpEvent != null)
+ ButtonUpEvent(this);
+
+ buttonPressed = false;
+ }
+ else if (!buttonPressed & colliderHit)
+ {
+ if (targetScale != 1.0f)
+ {
+ // Cursor had left the bounds before, but now has come back in
+ yield return StartCoroutine( coScale(defaultScale, 1.0f, targetScale) );
+ }
+ PlaySound(buttonDownSound);
+ if (buttonDownSpriteId != -1)
+ sprite.spriteId = buttonDownSpriteId;
+
+ if (ButtonDownEvent != null)
+ ButtonDownEvent(this);
+
+ buttonPressed = true;
+ }
+
+ if (buttonPressed && ButtonAutoFireEvent != null)
+ {
+ ButtonAutoFireEvent(this);
+ }
+
+ yield return 0;
+ }
+
+ if (buttonPressed)
+ {
+ if (targetScale != 1.0f)
+ {
+ // Handle case when cursor was in bounds when the button was released / finger lifted
+ yield return StartCoroutine( coScale(defaultScale, targetScale, 1.0f) );
+ }
+ PlaySound(buttonPressedSound);
+ if (buttonPressedSpriteId != -1)
+ sprite.spriteId = buttonPressedSpriteId;
+
+ if (targetObject)
+ {
+ targetObject.SendMessage(messageName);
+ }
+
+ if (ButtonUpEvent != null)
+ ButtonUpEvent(this);
+
+ if (ButtonPressedEvent != null)
+ ButtonPressedEvent(this);
+
+ // Button may have been deactivated in ButtonPressed / Up event
+ // Don't wait in that case
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (gameObject.active)
+#else
+ if (gameObject.activeInHierarchy)
+#endif
+ {
+ yield return StartCoroutine(LocalWaitForSeconds(pressedWaitTime));
+ }
+
+ if (buttonUpSpriteId != -1)
+ sprite.spriteId = buttonUpSpriteId;
+ }
+
+ buttonDown = false;
+ }
+
+
+ // Update is called once per frame
+ void Update ()
+ {
+ if (buttonDown) // only need to process if button isn't down
+ return;
+
+#if !UNITY_FLASH
+ bool detected = false;
+ if (Input.multiTouchEnabled)
+ {
+ for (int i = 0; i < Input.touchCount; ++i)
+ {
+ Touch touch = Input.GetTouch(i);
+ if (touch.phase != TouchPhase.Began) continue;
+ Ray ray = viewCamera.ScreenPointToRay(touch.position);
+ RaycastHit hitInfo;
+ if (collider.Raycast(ray, out hitInfo, 1.0e8f))
+ {
+ if (!Physics.Raycast(ray, hitInfo.distance - 0.01f))
+ {
+ StartCoroutine(coHandleButtonPress(touch.fingerId));
+ detected = true;
+ break; // only one finger on a buton, please.
+ }
+ }
+ }
+ }
+ if (!detected)
+#endif
+ {
+ if (Input.GetMouseButtonDown(0))
+ {
+ Ray ray = viewCamera.ScreenPointToRay(Input.mousePosition);
+ RaycastHit hitInfo;
+ if (collider.Raycast(ray, out hitInfo, 1.0e8f))
+ {
+ if (!Physics.Raycast(ray, hitInfo.distance - 0.01f))
+ StartCoroutine(coHandleButtonPress(-1));
+ }
+ }
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs.meta
new file mode 100644
index 000000000..de2b50f5a
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Gui/tk2dButton.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d7eeb7d27f0df004e90cb9fda2d821bd
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime.meta b/Chromacore/Assets/Plugins/tk2d/Code/Runtime.meta
new file mode 100644
index 000000000..760bf1b45
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 57b4deffeb7f2aa4b955927e8fd38ca6
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs
new file mode 100644
index 000000000..5add825cc
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs
@@ -0,0 +1,7 @@
+using UnityEngine;
+using System.Collections;
+
+public class tk2dResource : ScriptableObject
+{
+ public UnityEngine.Object objectReference = null;
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs.meta
new file mode 100644
index 000000000..ed5677934
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dResource.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b2580843702051c47ac89024a50814a9
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs
new file mode 100644
index 000000000..f31e80772
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs
@@ -0,0 +1,178 @@
+using UnityEngine;
+using System.Collections;
+
+[System.Serializable]
+public class tk2dResourceTocEntry
+{
+ public string resourceGUID = "";
+ public string assetName = "";
+ public string assetGUID = "";
+}
+
+[System.Serializable]
+public class tk2dAssetPlatform
+{
+ public tk2dAssetPlatform(string name, float scale) { this.name = name; this.scale = scale; }
+ public string name = "";
+ public float scale = 1.0f;
+}
+
+
+public class tk2dSystem : ScriptableObject
+{
+ // prefix to apply to all guids to avoid matching errors
+ public const string guidPrefix = "tk2d/tk2d_";
+ public const string assetName = "tk2d/tk2dSystem";
+ public const string assetFileName = "tk2dSystem.asset";
+
+ // platforms
+ [System.NonSerialized]
+ public tk2dAssetPlatform[] assetPlatforms = new tk2dAssetPlatform[] {
+ new tk2dAssetPlatform("1x", 1.0f),
+ new tk2dAssetPlatform("2x", 2.0f),
+ new tk2dAssetPlatform("4x", 4.0f),
+ };
+
+ private tk2dSystem() { }
+
+ static tk2dSystem _inst = null;
+ public static tk2dSystem inst
+ {
+ get
+ {
+ if (_inst == null)
+ {
+ // Attempt to load the global instance and create one if it doesn't exist
+ _inst = Resources.Load(assetName, typeof(tk2dSystem)) as tk2dSystem;
+ if (_inst == null)
+ {
+ _inst = ScriptableObject.CreateInstance();
+ }
+ // We don't want to destroy this throughout the lifetime of the game
+ DontDestroyOnLoad(_inst);
+ }
+ return _inst;
+ }
+ }
+
+ // Variant which will not create the instance if it doesn't exist
+ public static tk2dSystem inst_NoCreate
+ {
+ get
+ {
+ if (_inst == null)
+ _inst = Resources.Load(assetName, typeof(tk2dSystem)) as tk2dSystem;
+ return _inst;
+ }
+ }
+
+#region platforms
+
+#if UNITY_EDITOR
+ static bool currentPlatformInitialized = false;
+#endif
+ static string currentPlatform = ""; // Not serialized, this should be set up on wake
+ public static string CurrentPlatform
+ {
+ get
+ {
+#if UNITY_EDITOR
+ if (!currentPlatformInitialized)
+ {
+ // Hack, don't have access to editor classes from here
+ currentPlatform = UnityEditor.EditorPrefs.GetString("tk2d_platform", "");
+ currentPlatformInitialized = true;
+ }
+#endif
+ return currentPlatform;
+ }
+ set
+ {
+ if (value != currentPlatform)
+ {
+#if UNITY_EDITOR
+ currentPlatformInitialized = true;
+#endif
+ currentPlatform = value;
+ }
+ }
+ }
+
+ // This is a hack to work around a bug in Unity 4.x
+ // Scene serialization will serialize the actively bound texture
+ // but not the material during the build, only when [ExecuteInEditMode]
+ // is on, eg. on sprites.
+ // To work around: Create the file tk2dOverrideBuildMaterial in the project root
+ // outside Assets before you start the build, and delete it after
+ // your build is complete.
+ public static bool OverrideBuildMaterial {
+ get {
+#if UNITY_EDITOR
+ return System.IO.File.Exists("tk2dOverrideBuildMaterial");
+#else
+ return false;
+#endif
+ }
+ }
+
+ public static tk2dAssetPlatform GetAssetPlatform(string platform)
+ {
+ tk2dSystem inst = tk2dSystem.inst_NoCreate;
+ if (inst == null) return null;
+
+ for (int i = 0; i < inst.assetPlatforms.Length; ++i)
+ {
+ if (inst.assetPlatforms[i].name == platform)
+ return inst.assetPlatforms[i];
+ }
+ return null;
+ }
+
+#endregion
+
+#region Resources
+
+ [SerializeField]
+ tk2dResourceTocEntry[] allResourceEntries = new tk2dResourceTocEntry[0];
+
+ #if UNITY_EDITOR
+ public tk2dResourceTocEntry[] Editor__Toc { get { return allResourceEntries; } set { allResourceEntries = value; } }
+ #endif
+
+ // Loads a resource by GUID
+ // Return null if it doesn't exist
+ T LoadResourceByGUIDImpl(string guid) where T : UnityEngine.Object
+ {
+ tk2dResource resource = Resources.Load(guidPrefix + guid, typeof(tk2dResource)) as tk2dResource;
+ if (resource != null)
+ return resource.objectReference as T;
+ else
+ return null;
+ }
+
+ // Loads a resource by name
+ // Returns null if the name can't be found, or load fails for any other reason
+ T LoadResourceByNameImpl(string name) where T : UnityEngine.Object
+ {
+ // TODO: create and use a dictionary
+ for (int i = 0; i < allResourceEntries.Length; ++i)
+ {
+ if (allResourceEntries[i] != null && allResourceEntries[i].assetName == name)
+ return LoadResourceByGUIDImpl(allResourceEntries[i].assetGUID);
+ }
+ return null;
+ }
+
+ public static T LoadResourceByGUID(string guid) where T : UnityEngine.Object { return inst.LoadResourceByGUIDImpl(guid); }
+ public static T LoadResourceByName(string guid) where T : UnityEngine.Object { return inst.LoadResourceByNameImpl(guid); }
+
+#endregion
+}
+
+
+// A few lines about the need for a resource wrapper
+// Moving data objects in and out of resources directories is not practical, and potential for name collision is there.
+// Furthermore, the system is lightweight, with one asset for each loadable item.
+// With the decoupling of data & resource objects, it will now be possible to move files in and out of resources for platform
+// specific builds without messing about with actual data objects. It is possible to rebuild all necessary asset files from
+// just the tk2dSystem object, so the guid files can be deleted and reconstructed if necessary.
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs.meta
new file mode 100644
index 000000000..724c02225
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dSystem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 72fb5480ea3af70458d43df8464b132e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs
new file mode 100644
index 000000000..ba3632cc2
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs
@@ -0,0 +1,82 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+// Please don't add this component manually
+[AddComponentMenu("")]
+public class tk2dUpdateManager : MonoBehaviour {
+ static tk2dUpdateManager inst;
+ static tk2dUpdateManager Instance {
+ get {
+ if (inst == null) {
+ inst = GameObject.FindObjectOfType(typeof(tk2dUpdateManager)) as tk2dUpdateManager;
+ if (inst == null) {
+ GameObject go = new GameObject("@tk2dUpdateManager");
+ go.hideFlags = HideFlags.HideInInspector | HideFlags.HideInHierarchy;
+ inst = go.AddComponent();
+ DontDestroyOnLoad(go);
+ }
+ }
+ return inst;
+ }
+ }
+
+ // Add textmeshes to the list here
+ // Take care to not add twice
+ // Never queue in edit mode
+ public static void QueueCommit( tk2dTextMesh textMesh ) {
+#if UNITY_EDITOR
+ if (!Application.isPlaying) {
+ textMesh.DoNotUse__CommitInternal();
+ }
+ else
+#endif
+ {
+ Instance.QueueCommitInternal( textMesh );
+ }
+ }
+
+ // This can be called more than once, and we do - to try and catch all possibilities
+ public static void FlushQueues() {
+#if UNITY_EDITOR
+ if (Application.isPlaying) {
+ Instance.FlushQueuesInternal();
+ }
+#else
+ Instance.FlushQueuesInternal();
+#endif
+ }
+
+ void OnEnable() {
+ // for when the assembly is reloaded, coroutine is killed then
+ StartCoroutine(coSuperLateUpdate());
+ }
+
+ // One in late update
+ void LateUpdate() {
+ FlushQueuesInternal();
+ }
+
+ IEnumerator coSuperLateUpdate() {
+ FlushQueuesInternal();
+ yield break;
+ }
+
+ void QueueCommitInternal( tk2dTextMesh textMesh ) {
+ textMeshes.Add( textMesh );
+ }
+
+ void FlushQueuesInternal() {
+ int count = textMeshes.Count;
+ for (int i = 0; i < count; ++i) {
+ tk2dTextMesh tm = textMeshes[i];
+ if (tm != null) {
+ tm.DoNotUse__CommitInternal();
+ }
+ }
+ textMeshes.Clear();
+ }
+
+ // Preallocate these lists to avoid allocation later
+ [SerializeField] List textMeshes = new List(64);
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs.meta
new file mode 100644
index 000000000..49c4ed637
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Runtime/tk2dUpdateManager.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ca973478b211b459c97886f0064228c0
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 31000
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites.meta
new file mode 100644
index 000000000..a26ab0749
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 16aff0a4b66903a428dd81c81af01614
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs
new file mode 100644
index 000000000..0b572f1a3
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs
@@ -0,0 +1,237 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dAnimatedSprite (Obsolete)")]
+public class tk2dAnimatedSprite : tk2dSprite
+{
+#region SpriteAnimatorRouting
+ [SerializeField] tk2dSpriteAnimator _animator = null;
+ public tk2dSpriteAnimator Animator {
+ get {
+ CheckAddAnimatorInternal();
+ return _animator;
+ }
+ }
+
+ void CheckAddAnimatorInternal() {
+ if (_animator == null) {
+ _animator = gameObject.GetComponent();
+ if (_animator == null) {
+ _animator = gameObject.AddComponent();
+ _animator.Library = anim;
+ _animator.DefaultClipId = clipId;
+ _animator.playAutomatically = playAutomatically;
+ }
+ }
+ }
+#endregion
+
+ // Required for serialization
+ [SerializeField] private tk2dSpriteAnimation anim;
+ [SerializeField] private int clipId = 0;
+ public bool playAutomatically = false;
+ public bool createCollider = false;
+
+ // Required for backwards compatility
+ protected override bool NeedBoxCollider() {
+ return createCollider;
+ }
+
+ public tk2dSpriteAnimation Library {
+ get {
+ return Animator.Library;
+ }
+ set {
+ Animator.Library = value;
+ }
+ }
+
+ public int DefaultClipId {
+ get {
+ return Animator.DefaultClipId;
+ }
+ set {
+ Animator.DefaultClipId = value;
+ }
+ }
+
+ // Wrapped functions
+ public static bool g_paused
+ {
+ get { return tk2dSpriteAnimator.g_Paused; }
+ set { tk2dSpriteAnimator.g_Paused = value; }
+ }
+
+ public bool Paused
+ {
+ get { return Animator.Paused; }
+ set { Animator.Paused = value; }
+ }
+
+ ///
+ /// Animation complete delegate
+ ///
+ public delegate void AnimationCompleteDelegate(tk2dAnimatedSprite sprite, int clipId);
+ ///
+ /// Animation complete event. This is called when the animation has completed playing. Will not trigger on looped animations
+ ///
+ public AnimationCompleteDelegate animationCompleteDelegate;
+
+ ///
+ /// Animation event delegate.
+ ///
+ public delegate void AnimationEventDelegate(tk2dAnimatedSprite sprite, tk2dSpriteAnimationClip clip, tk2dSpriteAnimationFrame frame, int frameNum);
+ ///
+ /// Animation event. This is called when the frame displayed has set.
+ /// The triggering frame is passed to the delegate, and the eventInfo / Int / Float can be extracted from there.
+ ///
+ public AnimationEventDelegate animationEventDelegate;
+
+ void ProxyCompletedHandler(tk2dSpriteAnimator anim, tk2dSpriteAnimationClip clip) {
+ if (animationCompleteDelegate != null) {
+ int clipId = -1;
+ tk2dSpriteAnimationClip[] clips = (anim.Library != null) ? anim.Library.clips : null;
+ if (clips != null) {
+ for (int i = 0; i < clips.Length; ++i) {
+ if (clips[i] == clip) {
+ clipId = i;
+ break;
+ }
+ }
+ }
+
+ animationCompleteDelegate(this, clipId);
+ }
+ }
+
+ void ProxyEventTriggeredHandler(tk2dSpriteAnimator anim, tk2dSpriteAnimationClip clip, int frame) {
+ if (animationEventDelegate != null) {
+ animationEventDelegate(this, clip, clip.frames[frame], frame);
+ }
+ }
+
+ void OnEnable() {
+ Animator.AnimationCompleted = ProxyCompletedHandler;
+ Animator.AnimationEventTriggered = ProxyEventTriggeredHandler;
+ }
+
+ void OnDisable() {
+ Animator.AnimationCompleted = null;
+ Animator.AnimationEventTriggered = null;
+ }
+
+ // execution order on tk2dSpriteAnimator should be AFTER tk2dAnimatedSprite
+ void Start()
+ {
+ CheckAddAnimatorInternal();
+ }
+
+ ///
+ /// Adds a tk2dAnimatedSprite as a component to the gameObject passed in, setting up necessary parameters and building geometry.
+ ///
+ public static tk2dAnimatedSprite AddComponent(GameObject go, tk2dSpriteAnimation anim, int clipId)
+ {
+ var clip = anim.clips[clipId];
+ tk2dAnimatedSprite animSprite = go.AddComponent();
+ animSprite.SetSprite(clip.frames[0].spriteCollection, clip.frames[0].spriteId);
+ animSprite.anim = anim;
+ return animSprite;
+ }
+
+#region Play
+ public void Play() {
+ if (Animator.DefaultClip != null) {
+ Animator.Play(Animator.DefaultClip);
+ }
+ }
+ public void Play(float clipStartTime) {
+ if (Animator.DefaultClip != null) {
+ Animator.PlayFrom(Animator.DefaultClip, clipStartTime);
+ }
+ }
+ public void PlayFromFrame(int frame) {
+ if (Animator.DefaultClip != null) {
+ Animator.PlayFromFrame(Animator.DefaultClip, frame);
+ }
+ }
+ public void Play(string name) {
+ Animator.Play(name);
+ }
+ public void PlayFromFrame(string name, int frame) {
+ Animator.PlayFromFrame(name, frame);
+ }
+ public void Play(string name, float clipStartTime) {
+ Animator.PlayFrom(name, clipStartTime);
+ }
+ public void Play(tk2dSpriteAnimationClip clip, float clipStartTime) {
+ Animator.PlayFrom(clip, clipStartTime);
+ }
+ public void Play(tk2dSpriteAnimationClip clip, float clipStartTime, float overrideFps) {
+ Animator.Play(clip, clipStartTime, overrideFps);
+ }
+#endregion
+
+ public tk2dSpriteAnimationClip CurrentClip { get { return Animator.CurrentClip; } }
+ public float ClipTimeSeconds { get { return Animator.ClipTimeSeconds; } }
+
+ public float ClipFps {
+ get { return Animator.ClipFps; }
+ set { Animator.ClipFps = value; }
+ }
+
+ public void Stop() {
+ Animator.Stop();
+ }
+
+ public void StopAndResetFrame() {
+ Animator.StopAndResetFrame();
+ }
+
+ [System.Obsolete]
+ public bool isPlaying() {
+ return Animator.Playing;
+ }
+
+ public bool IsPlaying(string name) {
+ return Animator.Playing;
+ }
+
+ public bool IsPlaying(tk2dSpriteAnimationClip clip) {
+ return Animator.IsPlaying(clip);
+ }
+
+
+ public bool Playing {
+ get { return Animator.Playing; }
+ }
+
+ public int GetClipIdByName(string name) {
+ return Animator.GetClipIdByName(name);
+ }
+
+ public tk2dSpriteAnimationClip GetClipByName(string name) {
+ return Animator.GetClipByName(name);
+ }
+
+ public static float DefaultFps { get { return tk2dSpriteAnimator.DefaultFps; } }
+
+ public void Pause() {
+ Animator.Pause();
+ }
+
+ public void Resume() {
+ Animator.Resume();
+ }
+
+ public void SetFrame(int currFrame) {
+ Animator.SetFrame(currFrame);
+ }
+
+ public void SetFrame(int currFrame, bool triggerEvent) {
+ Animator.SetFrame(currFrame, triggerEvent);
+ }
+
+ public void UpdateAnimation(float deltaTime) {
+ Animator.UpdateAnimation(deltaTime);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs.meta
new file mode 100644
index 000000000..5c713076f
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dAnimatedSprite.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1e0e0c37ef9d7b34292486e754b48bd5
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30099
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs
new file mode 100644
index 000000000..2df11685b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs
@@ -0,0 +1,680 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dBaseSprite")]
+///
+/// Sprite base class. Performs target agnostic functionality and manages state parameters.
+///
+public abstract class tk2dBaseSprite : MonoBehaviour, tk2dRuntime.ISpriteCollectionForceBuild
+{
+ ///
+ /// Anchor.
+ /// NOTE: The order in this enum is deliberate, to initialize at LowerLeft for backwards compatibility.
+ /// This is also the reason it is local here. Other Anchor enums are NOT compatbile. Do not cast.
+ ///
+ public enum Anchor
+ {
+ /// Lower left
+ LowerLeft,
+ /// Lower center
+ LowerCenter,
+ /// Lower right
+ LowerRight,
+ /// Middle left
+ MiddleLeft,
+ /// Middle center
+ MiddleCenter,
+ /// Middle right
+ MiddleRight,
+ /// Upper left
+ UpperLeft,
+ /// Upper center
+ UpperCenter,
+ /// Upper right
+ UpperRight,
+ }
+
+ ///
+ /// This is now private. You should use Collection if you wish to read this value.
+ /// Use SetSprite when you need to switch sprite collection.
+ ///
+ [SerializeField]
+ private tk2dSpriteCollectionData collection;
+
+ ///
+ /// Deprecation warning: the set accessor will be removed in a future version.
+ /// Use SetSprite when you need to switch sprite collection.
+ ///
+ public tk2dSpriteCollectionData Collection
+ {
+ get { return collection; }
+ set { collection = value; collectionInst = collection.inst; }
+ }
+
+ // This is the active instance of the sprite collection
+ protected tk2dSpriteCollectionData collectionInst;
+
+ [SerializeField] protected Color _color = Color.white;
+ [SerializeField] protected Vector3 _scale = new Vector3(1.0f, 1.0f, 1.0f);
+ [SerializeField] protected int _spriteId = 0;
+
+ ///
+ /// Internal cached version of the box collider created for this sprite, if present.
+ ///
+ public BoxCollider boxCollider = null;
+ ///
+ /// Internal cached version of the mesh collider created for this sprite, if present.
+ ///
+ public MeshCollider meshCollider = null;
+ public Vector3[] meshColliderPositions = null;
+ public Mesh meshColliderMesh = null;
+
+ ///
+ /// This event is called whenever a sprite is changed.
+ /// A sprite is considered to be changed when the sprite itself
+ /// is changed, or the scale applied to the sprite is changed.
+ ///
+ public event System.Action SpriteChanged;
+
+ // This is unfortunate, but required due to the unpredictable script execution order in Unity.
+ // The only problem happens in Awake(), where if another class is Awaken before this one, and tries to
+ // modify this instance before it is initialized, very bad things could happen.
+ // Awake also never gets called on an object which is inactive.
+ void InitInstance()
+ {
+ if (collectionInst == null && collection != null)
+ collectionInst = collection.inst;
+ }
+
+ ///
+ /// Gets or sets the color.
+ ///
+ ///
+ /// Please note the range for a Unity Color is 0..1 and not 0..255.
+ ///
+ public Color color
+ {
+ get { return _color; }
+ set
+ {
+ if (value != _color)
+ {
+ _color = value;
+ InitInstance();
+ UpdateColors();
+ }
+ }
+ }
+
+ ///
+ /// Gets or sets the scale.
+ ///
+ ///
+ /// Use the sprite scale method as opposed to transform.localScale to avoid breaking dynamic batching.
+ ///
+ public Vector3 scale
+ {
+ get { return _scale; }
+ set
+ {
+ if (value != _scale)
+ {
+ _scale = value;
+ InitInstance();
+ UpdateVertices();
+#if UNITY_EDITOR
+ EditMode__CreateCollider();
+#else
+ UpdateCollider();
+#endif
+ if (SpriteChanged != null) {
+ SpriteChanged( this );
+ }
+ }
+ }
+ }
+
+ [SerializeField] protected int renderLayer = 0;
+ ///
+ /// Gets or sets the sorting order
+ /// The sorting order lets you override draw order for sprites which are at the same z position
+ /// It is similar to offsetting in z - the sprite stays at the original position
+ /// This corresponds to the renderer.sortingOrder property in Unity 4.3
+ ///
+ public int SortingOrder {
+ get { return renderLayer; }
+ set { if (renderLayer != value) { renderLayer = value; InitInstance(); UpdateVertices(); } }
+ }
+
+ ///
+ /// Flips the sprite horizontally. Set FlipX to true to flip it horizontally.
+ /// Note: The sprite itself may be flipped by the hierarchy above it or localScale
+ /// These functions do not consider those cases.
+ ///
+ public bool FlipX {
+ get { return _scale.x < 0; }
+ set { scale = new Vector3( Mathf.Abs(_scale.x) * (value?-1:1), _scale.y, _scale.z ); }
+ }
+
+ ///
+ /// Flips the sprite vertically. Set FlipY to true to flip it vertically.
+ /// Note: The sprite itself may be flipped by the hierarchy above it or localScale
+ /// These functions do not consider those cases.
+ ///
+ public bool FlipY {
+ get { return _scale.y < 0; }
+ set { scale = new Vector3( _scale.x, Mathf.Abs(_scale.y) * (value?-1:1), _scale.z ); }
+ }
+
+ ///
+ /// Gets or sets the sprite identifier.
+ ///
+ ///
+ /// The spriteId is a unique number identifying each sprite.
+ /// Use GetSpriteIdByName to resolve an identifier from the current sprite collection.
+ ///
+ public int spriteId
+ {
+ get { return _spriteId; }
+ set
+ {
+ if (value != _spriteId)
+ {
+ InitInstance();
+ value = Mathf.Clamp(value, 0, collectionInst.spriteDefinitions.Length - 1);
+ if (_spriteId < 0 || _spriteId >= collectionInst.spriteDefinitions.Length ||
+ GetCurrentVertexCount() != collectionInst.spriteDefinitions[value].positions.Length ||
+ collectionInst.spriteDefinitions[_spriteId].complexGeometry != collectionInst.spriteDefinitions[value].complexGeometry)
+ {
+ _spriteId = value;
+ UpdateGeometry();
+ }
+ else
+ {
+ _spriteId = value;
+ UpdateVertices();
+ }
+ UpdateMaterial();
+ UpdateCollider();
+
+ if (SpriteChanged != null) {
+ SpriteChanged( this );
+ }
+ }
+ }
+ }
+
+ ///
+ /// Sets the sprite by identifier.
+ ///
+ public void SetSprite(int newSpriteId) {
+ this.spriteId = newSpriteId;
+ }
+
+ ///
+ /// Sets the sprite by name. The sprite will be selected from the current collection.
+ ///
+ public bool SetSprite(string spriteName) {
+ int spriteId = collection.GetSpriteIdByName(spriteName, -1);
+ if (spriteId != -1) {
+ SetSprite(spriteId);
+ }
+ else {
+ Debug.LogError("SetSprite - Sprite not found in collection: " + spriteName);
+ }
+ return spriteId != -1;
+ }
+
+ ///
+ /// Sets sprite by identifier from the new collection.
+ ///
+ public void SetSprite(tk2dSpriteCollectionData newCollection, int newSpriteId) {
+ bool switchedCollection = false;
+ if (Collection != newCollection) {
+ collection = newCollection;
+ collectionInst = collection.inst;
+ _spriteId = -1; // force an update, but only when the collection has changed
+ switchedCollection = true;
+ }
+
+ spriteId = newSpriteId;
+
+ if (switchedCollection) {
+ UpdateMaterial();
+ }
+ }
+
+ ///
+ /// Sets sprite by name from the new collection.
+ ///
+ public bool SetSprite(tk2dSpriteCollectionData newCollection, string spriteName) {
+ int spriteId = newCollection.GetSpriteIdByName(spriteName, -1);
+ if (spriteId != -1) {
+ SetSprite(newCollection, spriteId);
+ }
+ else {
+ Debug.LogError("SetSprite - Sprite not found in collection: " + spriteName);
+ }
+ return spriteId != -1;
+ }
+
+ ///
+ /// Makes the sprite pixel perfect to the active camera.
+ /// Automatically detects if present
+ /// Otherwise uses Camera.main
+ ///
+ public void MakePixelPerfect()
+ {
+ float s = 1.0f;
+ tk2dCamera cam = tk2dCamera.CameraForLayer(gameObject.layer);
+ if (cam != null)
+ {
+ if (Collection.version < 2)
+ {
+ Debug.LogError("Need to rebuild sprite collection.");
+ }
+
+ float zdist = (transform.position.z - cam.transform.position.z);
+ float spriteSize = (Collection.invOrthoSize * Collection.halfTargetHeight);
+ s = cam.GetSizeAtDistance(zdist) * spriteSize;
+ }
+ else if (Camera.main)
+ {
+ if (Camera.main.isOrthoGraphic)
+ {
+ s = Camera.main.orthographicSize;
+ }
+ else
+ {
+ float zdist = (transform.position.z - Camera.main.transform.position.z);
+ s = tk2dPixelPerfectHelper.CalculateScaleForPerspectiveCamera(Camera.main.fieldOfView, zdist);
+ }
+ s *= Collection.invOrthoSize;
+ }
+ else
+ {
+ Debug.LogError("Main camera not found.");
+ }
+
+
+ scale = new Vector3(Mathf.Sign(scale.x) * s, Mathf.Sign(scale.y) * s, Mathf.Sign(scale.z) * s);
+ }
+
+
+ protected abstract void UpdateMaterial(); // update material when switching spritecollection
+ protected abstract void UpdateColors(); // reupload color data only
+ protected abstract void UpdateVertices(); // reupload vertex data only
+ protected abstract void UpdateGeometry(); // update full geometry (including indices)
+ protected abstract int GetCurrentVertexCount(); // return current vertex count
+
+ ///
+ /// Rebuilds the mesh data for this sprite. Not usually necessary to call this, unless some internal states are modified.
+ ///
+ public abstract void Build();
+
+ ///
+ /// Resolves a sprite name and returns a unique id for the sprite.
+ /// Convenience alias of
+ ///
+ ///
+ /// Unique Sprite Id.
+ ///
+ /// Case sensitive sprite name, as defined in the sprite collection. This is usually the source filename excluding the extension
+ public int GetSpriteIdByName(string name)
+ {
+ InitInstance();
+ return collectionInst.GetSpriteIdByName(name);
+ }
+
+ ///
+ /// Adds a tk2dBaseSprite derived class as a component to the gameObject passed in, setting up necessary parameters
+ /// and building geometry.
+ ///
+ public static T AddComponent(GameObject go, tk2dSpriteCollectionData spriteCollection, int spriteId) where T : tk2dBaseSprite
+ {
+ T sprite = go.AddComponent();
+ sprite._spriteId = -1;
+ sprite.SetSprite(spriteCollection, spriteId);
+ sprite.Build();
+ return sprite;
+ }
+
+ ///
+ /// Adds a tk2dBaseSprite derived class as a component to the gameObject passed in, setting up necessary parameters
+ /// and building geometry. Shorthand using sprite name
+ ///
+ public static T AddComponent(GameObject go, tk2dSpriteCollectionData spriteCollection, string spriteName) where T : tk2dBaseSprite
+ {
+ int spriteId = spriteCollection.GetSpriteIdByName(spriteName, -1);
+ if (spriteId == -1) {
+ Debug.LogError( string.Format("Unable to find sprite named {0} in sprite collection {1}", spriteName, spriteCollection.spriteCollectionName) );
+ return null;
+ }
+ else {
+ return AddComponent(go, spriteCollection, spriteId);
+ }
+ }
+
+ protected int GetNumVertices()
+ {
+ InitInstance();
+ return collectionInst.spriteDefinitions[spriteId].positions.Length;
+ }
+
+ protected int GetNumIndices()
+ {
+ InitInstance();
+ return collectionInst.spriteDefinitions[spriteId].indices.Length;
+ }
+
+ protected void SetPositions(Vector3[] positions, Vector3[] normals, Vector4[] tangents)
+ {
+ var sprite = collectionInst.spriteDefinitions[spriteId];
+ int numVertices = GetNumVertices();
+ for (int i = 0; i < numVertices; ++i)
+ {
+ positions[i].x = sprite.positions[i].x * _scale.x;
+ positions[i].y = sprite.positions[i].y * _scale.y;
+ positions[i].z = sprite.positions[i].z * _scale.z;
+ }
+
+ // The secondary test sprite.normals != null must have been performed prior to this function call
+ if (normals.Length > 0)
+ {
+ for (int i = 0; i < numVertices; ++i)
+ {
+ normals[i] = sprite.normals[i];
+ }
+ }
+
+ // The secondary test sprite.tangents != null must have been performed prior to this function call
+ if (tangents.Length > 0)
+ {
+ for (int i = 0; i < numVertices; ++i)
+ {
+ tangents[i] = sprite.tangents[i];
+ }
+ }
+ }
+
+ protected void SetColors(Color32[] dest)
+ {
+ Color c = _color;
+ if (collectionInst.premultipliedAlpha) { c.r *= c.a; c.g *= c.a; c.b *= c.a; }
+ Color32 c32 = c;
+
+ int numVertices = GetNumVertices();
+ for (int i = 0; i < numVertices; ++i)
+ dest[i] = c32;
+ }
+
+ ///
+ /// Gets the local space bounds of the sprite.
+ ///
+ ///
+ /// Local space bounds
+ ///
+ public Bounds GetBounds()
+ {
+ InitInstance();
+ var sprite = collectionInst.spriteDefinitions[_spriteId];
+ return new Bounds(new Vector3(sprite.boundsData[0].x * _scale.x, sprite.boundsData[0].y * _scale.y, sprite.boundsData[0].z * _scale.z),
+ new Vector3(sprite.boundsData[1].x * Mathf.Abs(_scale.x), sprite.boundsData[1].y * Mathf.Abs(_scale.y), sprite.boundsData[1].z * Mathf.Abs(_scale.z) ));
+ }
+
+ ///
+ /// Gets untrimmed local space bounds of the sprite. This is the size of the sprite before 2D Toolkit trims away empty space in the sprite.
+ /// Use this when you need to position sprites in a grid, etc, when the trimmed bounds is not sufficient.
+ ///
+ ///
+ /// Local space untrimmed bounds
+ ///
+ public Bounds GetUntrimmedBounds()
+ {
+ InitInstance();
+ var sprite = collectionInst.spriteDefinitions[_spriteId];
+ return new Bounds(new Vector3(sprite.untrimmedBoundsData[0].x * _scale.x, sprite.untrimmedBoundsData[0].y * _scale.y, sprite.untrimmedBoundsData[0].z * _scale.z),
+ new Vector3(sprite.untrimmedBoundsData[1].x * Mathf.Abs(_scale.x), sprite.untrimmedBoundsData[1].y * Mathf.Abs(_scale.y), sprite.untrimmedBoundsData[1].z * Mathf.Abs(_scale.z) ));
+ }
+
+ public static Bounds AdjustedMeshBounds(Bounds bounds, int renderLayer) {
+ Vector3 center = bounds.center;
+ center.z = -renderLayer * 0.01f;
+ bounds.center = center;
+ return bounds;
+ }
+
+ ///
+ /// Gets the current sprite definition.
+ ///
+ ///
+ /// for the currently active sprite.
+ ///
+ public tk2dSpriteDefinition GetCurrentSpriteDef()
+ {
+ InitInstance();
+ return (collectionInst == null) ? null : collectionInst.spriteDefinitions[_spriteId];
+ }
+
+ ///
+ /// Gets the current sprite definition.
+ ///
+ ///
+ /// for the currently active sprite.
+ ///
+ public tk2dSpriteDefinition CurrentSprite {
+ get {
+ InitInstance();
+ return (collectionInst == null) ? null : collectionInst.spriteDefinitions[_spriteId];
+ }
+ }
+
+ ///
+ /// Used for sprite resizing in Editor, and UILayout.
+ ///
+ public virtual void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ ;
+ }
+
+ // Collider setup
+
+ protected virtual bool NeedBoxCollider() { return false; }
+
+ protected virtual void UpdateCollider()
+ {
+ var sprite = collectionInst.spriteDefinitions[_spriteId];
+
+ if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Box && boxCollider == null)
+ {
+ // Has the user created a box collider?
+ boxCollider = gameObject.GetComponent();
+
+ if (boxCollider == null)
+ {
+ // create box collider at runtime. this won't get removed from the object
+ boxCollider = gameObject.AddComponent();
+ }
+ }
+
+
+ if (boxCollider != null)
+ {
+ if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Box)
+ {
+ boxCollider.center = new Vector3(sprite.colliderVertices[0].x * _scale.x, sprite.colliderVertices[0].y * _scale.y, sprite.colliderVertices[0].z * _scale.z);
+ boxCollider.size = new Vector3(2 * sprite.colliderVertices[1].x * _scale.x, 2 * sprite.colliderVertices[1].y * _scale.y, 2 * sprite.colliderVertices[1].z * _scale.z);
+ }
+ else if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Unset)
+ {
+ // Don't do anything here, for backwards compatibility
+ }
+ else // in all cases, if the collider doesn't match is requested, null it out
+ {
+ if (boxCollider != null)
+ {
+ // move the box far far away, boxes with zero extents still collide
+ boxCollider.center = new Vector3(0, 0, -100000.0f);
+ boxCollider.size = Vector3.zero;
+ }
+ }
+ }
+ }
+
+ // This is separate to UpdateCollider, as UpdateCollider can only work with BoxColliders, and will NOT create colliders
+ protected virtual void CreateCollider()
+ {
+ var sprite = collectionInst.spriteDefinitions[_spriteId];
+ if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Unset)
+ {
+ // do not attempt to create or modify anything if it is Unset
+ return;
+ }
+
+ // User has created a collider
+ if (collider != null)
+ {
+ boxCollider = GetComponent();
+ meshCollider = GetComponent();
+ }
+
+ if ((NeedBoxCollider() || sprite.colliderType == tk2dSpriteDefinition.ColliderType.Box) && meshCollider == null)
+ {
+ if (boxCollider == null)
+ {
+ boxCollider = gameObject.AddComponent();
+ }
+ }
+ else if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Mesh && boxCollider == null)
+ {
+ // this should not be updated again (apart from scale changes in the editor, where we force regeneration of colliders)
+ if (meshCollider == null)
+ meshCollider = gameObject.AddComponent();
+ if (meshColliderMesh == null)
+ meshColliderMesh = new Mesh();
+
+ meshColliderMesh.Clear();
+
+ meshColliderPositions = new Vector3[sprite.colliderVertices.Length];
+ for (int i = 0; i < meshColliderPositions.Length; ++i)
+ meshColliderPositions[i] = new Vector3(sprite.colliderVertices[i].x * _scale.x, sprite.colliderVertices[i].y * _scale.y, sprite.colliderVertices[i].z * _scale.z);
+ meshColliderMesh.vertices = meshColliderPositions;
+
+ float s = _scale.x * _scale.y * _scale.z;
+
+ meshColliderMesh.triangles = (s >= 0.0f)?sprite.colliderIndicesFwd:sprite.colliderIndicesBack;
+ meshCollider.sharedMesh = meshColliderMesh;
+ meshCollider.convex = sprite.colliderConvex;
+ meshCollider.smoothSphereCollisions = sprite.colliderSmoothSphereCollisions;
+
+ // this is required so our mesh pivot is at the right point
+ if (rigidbody) rigidbody.centerOfMass = Vector3.zero;
+ }
+ else if (sprite.colliderType != tk2dSpriteDefinition.ColliderType.None)
+ {
+ // This warning is not applicable in the editor
+ if (Application.isPlaying)
+ {
+ Debug.LogError("Invalid mesh collider on sprite, please remove and try again.");
+ }
+ }
+
+ UpdateCollider();
+ }
+
+#if UNITY_EDITOR
+ public virtual void EditMode__CreateCollider()
+ {
+ // Revert to runtime behaviour when the game is running
+ if (Application.isPlaying)
+ {
+ UpdateCollider();
+ return;
+ }
+
+ var sprite = collectionInst.spriteDefinitions[_spriteId];
+ if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Unset)
+ return;
+
+ PhysicMaterial physicsMaterial = collider?collider.sharedMaterial:null;
+ bool isTrigger = collider?collider.isTrigger:false;
+
+ boxCollider = gameObject.GetComponent();
+ meshCollider = gameObject.GetComponent();
+
+ if ((NeedBoxCollider() || sprite.colliderType == tk2dSpriteDefinition.ColliderType.Box) && meshCollider == null)
+ {
+ if (meshCollider != null) {
+ DestroyImmediate(meshCollider, true);
+ }
+ }
+ else if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.Mesh) {
+ if (boxCollider != null) {
+ DestroyImmediate(boxCollider, true);
+ }
+ }
+ else if (sprite.colliderType == tk2dSpriteDefinition.ColliderType.None) {
+ if (meshCollider != null) {
+ DestroyImmediate(meshCollider, true);
+ }
+ if (boxCollider != null) {
+ DestroyImmediate(boxCollider, true);
+ }
+ }
+
+ CreateCollider();
+
+ if (collider)
+ {
+ collider.isTrigger = isTrigger;
+ collider.material = physicsMaterial;
+ }
+ }
+#endif
+
+ protected void Awake()
+ {
+ if (collection != null)
+ {
+ collectionInst = collection.inst;
+ }
+ }
+
+
+ // tk2dRuntime.ISpriteCollectionEditor
+ public bool UsesSpriteCollection(tk2dSpriteCollectionData spriteCollection)
+ {
+ return Collection == spriteCollection;
+ }
+
+ public virtual void ForceBuild()
+ {
+ if (collection == null) {
+ return;
+ }
+ collectionInst = collection.inst;
+ if (spriteId < 0 || spriteId >= collectionInst.spriteDefinitions.Length)
+ spriteId = 0;
+ Build();
+#if UNITY_EDITOR
+ EditMode__CreateCollider();
+#endif
+ if (SpriteChanged != null) {
+ SpriteChanged(this);
+ }
+ }
+
+ ///
+ /// Create a sprite (and gameObject) displaying the region of the texture specified.
+ /// Use if you need to create a sprite collection
+ /// with multiple sprites.
+ ///
+ public static GameObject CreateFromTexture(Texture texture, tk2dSpriteCollectionSize size, Rect region, Vector2 anchor) where T : tk2dBaseSprite
+ {
+ tk2dSpriteCollectionData data = tk2dRuntime.SpriteCollectionGenerator.CreateFromTexture(texture, size, region, anchor);
+ if (data == null)
+ return null;
+ GameObject spriteGo = new GameObject();
+ tk2dBaseSprite.AddComponent(spriteGo, data, 0);
+ return spriteGo;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs.meta
new file mode 100644
index 000000000..806cbcf91
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dBaseSprite.cs.meta
@@ -0,0 +1,16 @@
+fileFormatVersion: 2
+guid: 4082e584a7c7344419f1635f2e84291c
+labels:
+- 2d
+- sprite
+- text
+- font
+- atlas
+- spritecollection
+- toolkit
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31001
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs
new file mode 100644
index 000000000..6b0d534b7
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs
@@ -0,0 +1,308 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dClippedSprite")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+///
+/// Sprite implementation that clips the sprite using normalized clip coordinates.
+///
+public class tk2dClippedSprite : tk2dBaseSprite
+{
+ Mesh mesh;
+ Vector2[] meshUvs;
+ Vector3[] meshVertices;
+ Color32[] meshColors;
+ int[] meshIndices;
+
+ public Vector2 _clipBottomLeft = new Vector2(0, 0);
+ public Vector2 _clipTopRight = new Vector2(1, 1);
+
+ // Temp cached variables
+ Rect _clipRect = new Rect(0, 0, 0, 0);
+
+ ///
+ /// Sets the clip rectangle
+ /// 0, 0, 1, 1 = display the entire sprite
+ ///
+ public Rect ClipRect {
+ get {
+ _clipRect.Set( _clipBottomLeft.x, _clipBottomLeft.y, _clipTopRight.x - _clipBottomLeft.x, _clipTopRight.y - _clipBottomLeft.y );
+ return _clipRect;
+ }
+ set {
+ Vector2 v = new Vector2( value.x, value.y );
+ clipBottomLeft = v;
+ v.x += value.width;
+ v.y += value.height;
+ clipTopRight = v;
+ }
+ }
+
+
+ ///
+ /// Sets the bottom left clip area.
+ /// 0, 0 = display full sprite
+ ///
+ public Vector2 clipBottomLeft
+ {
+ get { return _clipBottomLeft; }
+ set
+ {
+ if (value != _clipBottomLeft)
+ {
+ _clipBottomLeft = new Vector2(value.x, value.y);
+ Build();
+ UpdateCollider();
+ }
+ }
+ }
+
+ ///
+ /// Sets the top right clip area
+ /// 1, 1 = display full sprite
+ ///
+ public Vector2 clipTopRight
+ {
+ get { return _clipTopRight; }
+ set
+ {
+ if (value != _clipTopRight)
+ {
+ _clipTopRight = new Vector2(value.x, value.y);
+ Build();
+ UpdateCollider();
+ }
+ }
+ }
+
+ [SerializeField]
+ protected bool _createBoxCollider = false;
+
+ ///
+ /// Create a trimmed box collider for this sprite
+ ///
+ public bool CreateBoxCollider {
+ get { return _createBoxCollider; }
+ set {
+ if (_createBoxCollider != value) {
+ _createBoxCollider = value;
+ UpdateCollider();
+ }
+ }
+ }
+
+ new void Awake()
+ {
+ base.Awake();
+
+ // Create mesh, independently to everything else
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+
+ // This will not be set when instantiating in code
+ // In that case, Build will need to be called
+ if (Collection)
+ {
+ // reset spriteId if outside bounds
+ // this is when the sprite collection data is corrupt
+ if (_spriteId < 0 || _spriteId >= Collection.Count)
+ _spriteId = 0;
+
+ Build();
+ }
+ }
+
+ protected void OnDestroy()
+ {
+ if (mesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(mesh);
+#else
+ Destroy(mesh);
+#endif
+ }
+ }
+
+ new protected void SetColors(Color32[] dest)
+ {
+ if (CurrentSprite.positions.Length == 4)
+ {
+ tk2dSpriteGeomGen.SetSpriteColors (dest, 0, 4, _color, collectionInst.premultipliedAlpha);
+ }
+ }
+
+ // Calculated center and extents
+ Vector3 boundsCenter = Vector3.zero, boundsExtents = Vector3.zero;
+
+ protected void SetGeometry(Vector3[] vertices, Vector2[] uvs)
+ {
+ var sprite = CurrentSprite;
+
+ float colliderOffsetZ = ( boxCollider != null ) ? ( boxCollider.center.z ) : 0.0f;
+ float colliderExtentZ = ( boxCollider != null ) ? ( boxCollider.size.z * 0.5f ) : 0.5f;
+ tk2dSpriteGeomGen.SetClippedSpriteGeom( meshVertices, meshUvs, 0, out boundsCenter, out boundsExtents, sprite, _scale, _clipBottomLeft, _clipTopRight, colliderOffsetZ, colliderExtentZ );
+
+ // Only do this when there are exactly 4 polys to a sprite (i.e. the sprite isn't diced, and isnt a more complex mesh)
+ if (sprite.positions.Length != 4)
+ {
+ // Only supports normal sprites
+ for (int i = 0; i < vertices.Length; ++i)
+ vertices[i] = Vector3.zero;
+ }
+ }
+
+ public override void Build()
+ {
+ meshUvs = new Vector2[4];
+ meshVertices = new Vector3[4];
+ meshColors = new Color32[4];
+
+ SetGeometry(meshVertices, meshUvs);
+ SetColors(meshColors);
+
+ if (mesh == null)
+ {
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ }
+ else
+ {
+ mesh.Clear();
+ }
+
+ mesh.vertices = meshVertices;
+ mesh.colors32 = meshColors;
+ mesh.uv = meshUvs;
+
+ int[] indices = new int[6];
+ tk2dSpriteGeomGen.SetClippedSpriteIndices(indices, 0, 0, CurrentSprite);
+ mesh.triangles = indices;
+
+ mesh.RecalculateBounds();
+ mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
+
+ GetComponent().mesh = mesh;
+
+ UpdateCollider();
+ UpdateMaterial();
+ }
+
+ protected override void UpdateGeometry() { UpdateGeometryImpl(); }
+ protected override void UpdateColors() { UpdateColorsImpl(); }
+ protected override void UpdateVertices() { UpdateGeometryImpl(); }
+
+
+ protected void UpdateColorsImpl()
+ {
+ if (meshColors == null || meshColors.Length == 0) {
+ Build();
+ }
+ else {
+ SetColors(meshColors);
+ mesh.colors32 = meshColors;
+ }
+ }
+
+ protected void UpdateGeometryImpl()
+ {
+#if UNITY_EDITOR
+ // This can happen with prefabs in the inspector
+ if (mesh == null)
+ return;
+#endif
+ if (meshVertices == null || meshVertices.Length == 0) {
+ Build();
+ }
+ else {
+ SetGeometry(meshVertices, meshUvs);
+ mesh.vertices = meshVertices;
+ mesh.uv = meshUvs;
+ mesh.RecalculateBounds();
+ mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
+ }
+ }
+
+#region Collider
+ protected override void UpdateCollider()
+ {
+ if (CreateBoxCollider) {
+ if (boxCollider == null) {
+ boxCollider = GetComponent();
+ if (boxCollider == null) {
+ boxCollider = gameObject.AddComponent();
+ }
+ }
+ boxCollider.size = 2 * boundsExtents;
+ boxCollider.center = boundsCenter;
+ } else {
+#if UNITY_EDITOR
+ boxCollider = GetComponent();
+ if (boxCollider != null) {
+ DestroyImmediate(boxCollider);
+ }
+#else
+ if (boxCollider != null) {
+ Destroy(boxCollider);
+ }
+#endif
+ }
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (mesh != null) {
+ Bounds b = mesh.bounds;
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube(b.center, b.extents * 2);
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+
+ protected override void CreateCollider() {
+ UpdateCollider();
+ }
+
+#if UNITY_EDITOR
+ public override void EditMode__CreateCollider() {
+ UpdateCollider();
+ }
+#endif
+#endregion
+
+ protected override void UpdateMaterial()
+ {
+ if (renderer.sharedMaterial != collectionInst.spriteDefinitions[spriteId].materialInst)
+ renderer.material = collectionInst.spriteDefinitions[spriteId].materialInst;
+ }
+
+ protected override int GetCurrentVertexCount()
+ {
+#if UNITY_EDITOR
+ if (meshVertices == null)
+ return 0;
+#endif
+ return 4;
+ }
+
+ public override void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ var sprite = CurrentSprite;
+ Vector3 oldMin = Vector3.Scale(sprite.untrimmedBoundsData[0] - 0.5f * sprite.untrimmedBoundsData[1], _scale);
+ Vector3 oldSize = Vector3.Scale(sprite.untrimmedBoundsData[1], _scale);
+ Vector3 newScale = oldSize + dMax - dMin;
+ newScale.x /= sprite.untrimmedBoundsData[1].x;
+ newScale.y /= sprite.untrimmedBoundsData[1].y;
+ Vector3 scaledMin = new Vector3(Mathf.Approximately(_scale.x, 0) ? 0 : (oldMin.x * newScale.x / _scale.x),
+ Mathf.Approximately(_scale.y, 0) ? 0 : (oldMin.y * newScale.y / _scale.y));
+ Vector3 offset = oldMin + dMin - scaledMin;
+ offset.z = 0;
+ transform.position = transform.TransformPoint(offset);
+ scale = new Vector3(newScale.x, newScale.y, _scale.z);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs.meta
new file mode 100644
index 000000000..9d32715a1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dClippedSprite.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 203665e0cb9d1c342aebb15f96fed059
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs
new file mode 100644
index 000000000..1213e25d9
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs
@@ -0,0 +1,98 @@
+using UnityEngine;
+
+[AddComponentMenu("2D Toolkit/Deprecated/Extra/tk2dPixelPerfectHelper")]
+///
+/// Allows remapping resolution and rescaling based on settings in this class. Deprecated and replaced by .
+///
+public class tk2dPixelPerfectHelper : MonoBehaviour
+{
+ // All access to this object should be performed through inst.
+ static tk2dPixelPerfectHelper _inst = null;
+
+ ///
+ /// Global singleton instance.
+ ///
+ public static tk2dPixelPerfectHelper inst
+ {
+ get
+ {
+ if (_inst == null)
+ {
+ _inst = GameObject.FindObjectOfType(typeof(tk2dPixelPerfectHelper)) as tk2dPixelPerfectHelper;
+ if (_inst == null)
+ {
+ return null;
+ }
+ inst.Setup();
+ }
+ return _inst;
+ }
+ }
+
+ void Awake()
+ {
+ Setup();
+ _inst = this;
+ }
+
+ public virtual void Setup()
+ {
+ // Platform dependent initializion can occur by overriding this
+ // You will need to call base class after setting up to finalize
+
+ float resScale = collectionTargetHeight / targetResolutionHeight;
+
+ if (camera != null) cam = camera;
+ if (cam == null) cam = Camera.main;
+
+ if (cam.isOrthoGraphic)
+ {
+ scaleK = resScale * cam.orthographicSize / collectionOrthoSize;
+ scaleD = 0.0f;
+ }
+ else
+ {
+ float tk = resScale * Mathf.Tan(Mathf.Deg2Rad * cam.fieldOfView * 0.5f) / collectionOrthoSize;
+ scaleK = tk * -cam.transform.position.z;
+ scaleD = tk;
+ }
+ }
+
+ ///
+ /// Calculate scale to get 1:1 given fov in degress, and zdistance to camera.
+ /// This assumes the screen resoulution hasn't changed.
+ ///
+ public static float CalculateScaleForPerspectiveCamera(float fov, float zdist)
+ {
+ return Mathf.Abs( Mathf.Tan(Mathf.Deg2Rad * fov * 0.5f) * zdist );
+ }
+
+ ///
+ /// Is the linked camera orthographic?
+ ///
+ public bool CameraIsOrtho
+ {
+ get { return cam.isOrthoGraphic; }
+ }
+
+ // camera
+ [System.NonSerialized] public Camera cam;
+
+ ///
+ /// The height of the collection target as it was set up.
+ ///
+ public int collectionTargetHeight = 640;
+ ///
+ /// The ortho size parameter of the sprite collection, as it was set up.
+ ///
+ public float collectionOrthoSize = 1.0f;
+
+ ///
+ /// The height of the resolution to map to. (eg. 1024x768 = 768)
+ ///
+ public float targetResolutionHeight = 640.0f;
+
+ // scales
+ [System.NonSerialized] public float scaleD = 0.0f; // scaled by distance
+ [System.NonSerialized] public float scaleK = 0.0f; // constant
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs.meta
new file mode 100644
index 000000000..80a810651
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dPixelPerfectHelper.cs.meta
@@ -0,0 +1,16 @@
+fileFormatVersion: 2
+guid: 08747e6584f6dc84eb75828a3104eff4
+labels:
+- 2d
+- sprite
+- text
+- font
+- atlas
+- spritecollection
+- toolkit
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs
new file mode 100644
index 000000000..aab0523c2
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs
@@ -0,0 +1,278 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace tk2dRuntime
+{
+ static class SpriteCollectionGenerator
+ {
+ public static tk2dSpriteCollectionData CreateFromTexture(Texture texture, tk2dSpriteCollectionSize size, Rect region, Vector2 anchor)
+ {
+ return CreateFromTexture(texture, size, new string[] { "Unnamed" }, new Rect[] { region }, new Vector2[] { anchor } );
+ }
+
+ public static tk2dSpriteCollectionData CreateFromTexture(Texture texture, tk2dSpriteCollectionSize size, string[] names, Rect[] regions, Vector2[] anchors) {
+ Vector2 textureDimensions = new Vector2( texture.width, texture.height );
+ return CreateFromTexture( texture, size, textureDimensions, names, regions, null, anchors, null );
+ }
+
+ public static tk2dSpriteCollectionData CreateFromTexture(
+ Texture texture,
+ tk2dSpriteCollectionSize size,
+ Vector2 textureDimensions,
+ string[] names,
+ Rect[] regions,
+ Rect[] trimRects, Vector2[] anchors,
+ bool[] rotated)
+ {
+ return CreateFromTexture(null, texture, size, textureDimensions, names, regions, trimRects, anchors, rotated);
+ }
+
+ public static tk2dSpriteCollectionData CreateFromTexture(
+ GameObject parentObject,
+ Texture texture,
+ tk2dSpriteCollectionSize size,
+ Vector2 textureDimensions,
+ string[] names,
+ Rect[] regions,
+ Rect[] trimRects, Vector2[] anchors,
+ bool[] rotated)
+ {
+ GameObject go = ( parentObject != null ) ? parentObject : new GameObject("SpriteCollection");
+ tk2dSpriteCollectionData sc = go.AddComponent();
+ sc.Transient = true;
+ sc.version = tk2dSpriteCollectionData.CURRENT_VERSION;
+
+ sc.invOrthoSize = 1.0f / size.OrthoSize;
+ sc.halfTargetHeight = size.TargetHeight * 0.5f;
+ sc.premultipliedAlpha = false;
+
+ string shaderName = "tk2d/BlendVertexColor";
+
+#if UNITY_EDITOR
+ {
+ Shader ts = Shader.Find(shaderName);
+ string assetPath = UnityEditor.AssetDatabase.GetAssetPath(ts);
+ if (assetPath.ToLower().IndexOf("/resources/") == -1) {
+ UnityEditor.EditorUtility.DisplayDialog("tk2dRuntimeSpriteCollection Error",
+ "The tk2d/BlendVertexColor shader needs to be in a resources folder for this to work.\n\n" +
+ "Create a subdirectory named 'resources' where the shaders are, and move the BlendVertexColor shader into this directory.\n\n"+
+ "eg. TK2DROOT/tk2d/Shaders/Resources/BlendVertexColor\n\n" +
+ "Be sure to do this from within Unity and not from Explorer/Finder.",
+ "Ok");
+ return null;
+ }
+ }
+#endif
+
+ sc.material = new Material(Shader.Find(shaderName));
+ sc.material.mainTexture = texture;
+ sc.materials = new Material[1] { sc.material };
+ sc.textures = new Texture[1] { texture };
+ sc.buildKey = UnityEngine.Random.Range(0, Int32.MaxValue);
+
+ float scale = 2.0f * size.OrthoSize / size.TargetHeight;
+ Rect trimRect = new Rect(0, 0, 0, 0);
+
+ // Generate geometry
+ sc.spriteDefinitions = new tk2dSpriteDefinition[regions.Length];
+ for (int i = 0; i < regions.Length; ++i) {
+ bool defRotated = (rotated != null) ? rotated[i] : false;
+ if (trimRects != null) {
+ trimRect = trimRects[i];
+ }
+ else {
+ if (defRotated) trimRect.Set( 0, 0, regions[i].height, regions[i].width );
+ else trimRect.Set( 0, 0, regions[i].width, regions[i].height );
+ }
+ sc.spriteDefinitions[i] = CreateDefinitionForRegionInTexture(names[i], textureDimensions, scale, regions[i], trimRect, anchors[i], defRotated);
+ }
+
+ foreach (var def in sc.spriteDefinitions) {
+ def.material = sc.material;
+ }
+
+ return sc;
+ }
+
+ static tk2dSpriteDefinition CreateDefinitionForRegionInTexture(string name, Vector2 textureDimensions, float scale, Rect uvRegion, Rect trimRect, Vector2 anchor, bool rotated)
+ {
+ float h = uvRegion.height;
+ float w = uvRegion.width;
+ float fwidth = textureDimensions.x;
+ float fheight = textureDimensions.y;
+
+ var def = new tk2dSpriteDefinition();
+ def.flipped = rotated ? tk2dSpriteDefinition.FlipMode.TPackerCW : tk2dSpriteDefinition.FlipMode.None;
+ def.extractRegion = false;
+ def.name = name;
+ def.colliderType = tk2dSpriteDefinition.ColliderType.Unset;
+
+ Vector2 uvOffset = new Vector2(0.001f, 0.001f);
+ Vector2 v0 = new Vector2((uvRegion.x + uvOffset.x) / fwidth, 1.0f - (uvRegion.y + uvRegion.height + uvOffset.y) / fheight);
+ Vector2 v1 = new Vector2((uvRegion.x + uvRegion.width - uvOffset.x) / fwidth, 1.0f - (uvRegion.y - uvOffset.y) / fheight);
+
+ // Correction offset to make the sprite correctly centered at 0, 0
+ Vector2 offset = new Vector2( trimRect.x - anchor.x, -trimRect.y + anchor.y );
+ if (rotated) {
+ offset.y -= w;
+ }
+ offset *= scale;
+
+ Vector3 b0 = new Vector3( -anchor.x * scale, anchor.y * scale, 0 );
+ Vector3 b1 = b0 + new Vector3( trimRect.width * scale, -trimRect.height * scale, 0 );
+
+ Vector3 pos0 = new Vector3(0, -h * scale, 0.0f);
+ Vector3 pos1 = pos0 + new Vector3(w * scale, h * scale, 0.0f);
+
+ if (rotated) {
+ def.positions = new Vector3[] {
+ new Vector3(-pos1.y + offset.x, pos0.x + offset.y, 0),
+ new Vector3(-pos0.y + offset.x, pos0.x + offset.y, 0),
+ new Vector3(-pos1.y + offset.x, pos1.x + offset.y, 0),
+ new Vector3(-pos0.y + offset.x, pos1.x + offset.y, 0),
+ };
+ def.uvs = new Vector2[] {
+ new Vector2(v0.x,v1.y),
+ new Vector2(v0.x,v0.y),
+ new Vector2(v1.x,v1.y),
+ new Vector2(v1.x,v0.y),
+ };
+ }
+ else
+ {
+ def.positions = new Vector3[] {
+ new Vector3(pos0.x + offset.x, pos0.y + offset.y, 0),
+ new Vector3(pos1.x + offset.x, pos0.y + offset.y, 0),
+ new Vector3(pos0.x + offset.x, pos1.y + offset.y, 0),
+ new Vector3(pos1.x + offset.x, pos1.y + offset.y, 0)
+ };
+ def.uvs = new Vector2[] {
+ new Vector2(v0.x,v0.y),
+ new Vector2(v1.x,v0.y),
+ new Vector2(v0.x,v1.y),
+ new Vector2(v1.x,v1.y)
+ };
+ }
+
+ def.normals = new Vector3[0];
+ def.tangents = new Vector4[0];
+
+ def.indices = new int[] {
+ 0, 3, 1, 2, 3, 0
+ };
+
+ Vector3 boundsMin = new Vector3(b0.x, b1.y, 0);
+ Vector3 boundsMax = new Vector3(b1.x, b0.y, 0);
+
+ // todo - calc trimmed bounds properly
+ def.boundsData = new Vector3[2] {
+ (boundsMax + boundsMin) / 2.0f,
+ (boundsMax - boundsMin)
+ };
+ def.untrimmedBoundsData = new Vector3[2] {
+ (boundsMax + boundsMin) / 2.0f,
+ (boundsMax - boundsMin)
+ };
+
+ def.texelSize = new Vector2(scale, scale);
+
+ return def;
+ }
+
+ // Texture packer import
+ public static tk2dSpriteCollectionData CreateFromTexturePacker( tk2dSpriteCollectionSize spriteCollectionSize, string texturePackerFileContents, Texture texture ) {
+#if !UNITY_FLASH
+ List names = new List();
+ List rects = new List();
+ List trimRects = new List();
+ List anchors = new List();
+ List rotated = new List();
+
+ int state = 0;
+ System.IO.TextReader tr = new System.IO.StringReader(texturePackerFileContents);
+
+ // tmp state
+ bool entryRotated = false;
+ bool entryTrimmed = false;
+ string entryName = "";
+ Rect entryRect = new Rect();
+ Rect entryTrimData = new Rect();
+ Vector2 textureDimensions = Vector2.zero;
+ Vector2 anchor = Vector2.zero;
+
+ // gonna write a non-allocating parser for this one day.
+ // all these substrings & splits can't be good
+ // but should be a tiny bit better than an xml / json parser...
+ string line = tr.ReadLine();
+ while (line != null) {
+ if (line.Length > 0) {
+ char cmd = line[0];
+ switch (state) {
+ case 0: {
+ switch (cmd) {
+ case 'i': break; // ignore version field for now
+ case 'w': textureDimensions.x = Int32.Parse(line.Substring(2)); break;
+ case 'h': textureDimensions.y = Int32.Parse(line.Substring(2)); break;
+ // total number of sprites would be ideal to statically allocate
+ case '~': state++; break;
+ }
+ }
+ break;
+
+ case 1: {
+ switch (cmd) {
+ case 'n': entryName = line.Substring(2); break;
+ case 'r': entryRotated = Int32.Parse(line.Substring(2)) == 1; break;
+ case 's': { // sprite
+ string[] tokens = line.Split();
+ entryRect.Set( Int32.Parse(tokens[1]), Int32.Parse(tokens[2]), Int32.Parse(tokens[3]), Int32.Parse(tokens[4]) );
+ }
+ break;
+ case 'o': { // origin
+ string[] tokens = line.Split();
+ entryTrimData.Set( Int32.Parse(tokens[1]), Int32.Parse(tokens[2]), Int32.Parse(tokens[3]), Int32.Parse(tokens[4]) );
+ entryTrimmed = true;
+ }
+ break;
+ case '~': {
+ names.Add(entryName);
+ rotated.Add(entryRotated);
+ rects.Add(entryRect);
+ if (!entryTrimmed) {
+ // The entryRect dimensions will be the wrong way around if the sprite is rotated
+ if (entryRotated) entryTrimData.Set(0, 0, entryRect.height, entryRect.width);
+ else entryTrimData.Set(0, 0, entryRect.width, entryRect.height);
+ }
+ trimRects.Add(entryTrimData);
+ anchor.Set( (int)(entryTrimData.width / 2), (int)(entryTrimData.height / 2) );
+ anchors.Add( anchor );
+ entryName = "";
+ entryTrimmed = false;
+ entryRotated = false;
+ }
+ break;
+ }
+ }
+ break;
+ }
+ }
+ line = tr.ReadLine();
+ }
+
+ return CreateFromTexture(
+ texture,
+ spriteCollectionSize,
+ textureDimensions,
+ names.ToArray(),
+ rects.ToArray(),
+ trimRects.ToArray(),
+ anchors.ToArray(),
+ rotated.ToArray() );
+#else
+ return null;
+#endif
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs.meta
new file mode 100644
index 000000000..584914700
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dRuntimeSpriteCollection.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 11348ba4b6954584495b1a3b698d1c08
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs
new file mode 100644
index 000000000..cce708214
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs
@@ -0,0 +1,411 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSlicedSprite")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+///
+/// Sprite implementation that implements 9-slice scaling.
+///
+public class tk2dSlicedSprite : tk2dBaseSprite
+{
+ Mesh mesh;
+ Vector2[] meshUvs;
+ Vector3[] meshVertices;
+ Color32[] meshColors;
+ int[] meshIndices;
+
+ [SerializeField]
+ Vector2 _dimensions = new Vector2(50.0f, 50.0f);
+ [SerializeField]
+ Anchor _anchor = Anchor.LowerLeft;
+ [SerializeField]
+ bool _borderOnly = false;
+
+ [SerializeField]
+ bool legacyMode = false; // purely for fixup in 2D Toolkit 2.0
+
+ ///
+ /// Gets or sets border only. When true, the quad in the middle of the
+ /// sliced sprite is omitted, thus only drawing a border and saving fillrate
+ ///
+ public bool BorderOnly
+ {
+ get { return _borderOnly; }
+ set
+ {
+ if (value != _borderOnly)
+ {
+ _borderOnly = value;
+ UpdateIndices();
+ }
+ }
+ }
+
+
+ ///
+ /// Gets or sets the dimensions.
+ ///
+ ///
+ /// Use this to change the dimensions of the sliced sprite in pixel units
+ ///
+ public Vector2 dimensions
+ {
+ get { return _dimensions; }
+ set
+ {
+ if (value != _dimensions)
+ {
+ _dimensions = value;
+ UpdateVertices();
+ UpdateCollider();
+ }
+ }
+ }
+
+ ///
+ /// The anchor position for this sliced sprite
+ ///
+ public Anchor anchor
+ {
+ get { return _anchor; }
+ set
+ {
+ if (value != _anchor)
+ {
+ _anchor = value;
+ UpdateVertices();
+ UpdateCollider();
+ }
+ }
+ }
+
+ ///
+ /// Top border in sprite fraction (0 - Top, 1 - Bottom)
+ ///
+ public float borderTop = 0.2f;
+ ///
+ /// Bottom border in sprite fraction (0 - Bottom, 1 - Top)
+ ///
+ public float borderBottom = 0.2f;
+ ///
+ /// Left border in sprite fraction (0 - Left, 1 - Right)
+ ///
+ public float borderLeft = 0.2f;
+ ///
+ /// Right border in sprite fraction (1 - Right, 0 - Left)
+ ///
+ public float borderRight = 0.2f;
+
+ public void SetBorder(float left, float bottom, float right, float top) {
+ if (borderLeft != left || borderBottom != bottom || borderRight != right || borderTop != top) {
+ borderLeft = left;
+ borderBottom = bottom;
+ borderRight = right;
+ borderTop = top;
+
+ UpdateVertices();
+ }
+ }
+
+
+ [SerializeField]
+ protected bool _createBoxCollider = false;
+
+ ///
+ /// Create a trimmed box collider for this sprite
+ ///
+ public bool CreateBoxCollider {
+ get { return _createBoxCollider; }
+ set {
+ if (_createBoxCollider != value) {
+ _createBoxCollider = value;
+ UpdateCollider();
+ }
+ }
+ }
+
+ new void Awake()
+ {
+ base.Awake();
+
+ // Create mesh, independently to everything else
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+
+ // Cache box collider
+ if (boxCollider == null) {
+ boxCollider = GetComponent();
+ }
+
+ // This will not be set when instantiating in code
+ // In that case, Build will need to be called
+ if (Collection)
+ {
+ // reset spriteId if outside bounds
+ // this is when the sprite collection data is corrupt
+ if (_spriteId < 0 || _spriteId >= Collection.Count)
+ _spriteId = 0;
+
+ Build();
+ }
+ }
+
+ protected void OnDestroy()
+ {
+ if (mesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(mesh);
+#else
+ Destroy(mesh);
+#endif
+ }
+ }
+
+ new protected void SetColors(Color32[] dest)
+ {
+ tk2dSpriteGeomGen.SetSpriteColors (dest, 0, 16, _color, collectionInst.premultipliedAlpha);
+ }
+
+ // Calculated center and extents
+ Vector3 boundsCenter = Vector3.zero, boundsExtents = Vector3.zero;
+
+ protected void SetGeometry(Vector3[] vertices, Vector2[] uvs)
+ {
+ var sprite = CurrentSprite;
+
+ float colliderOffsetZ = ( boxCollider != null ) ? ( boxCollider.center.z ) : 0.0f;
+ float colliderExtentZ = ( boxCollider != null ) ? ( boxCollider.size.z * 0.5f ) : 0.5f;
+ tk2dSpriteGeomGen.SetSlicedSpriteGeom(meshVertices, meshUvs, 0, out boundsCenter, out boundsExtents, sprite, _scale, dimensions, new Vector2(borderLeft, borderBottom), new Vector2(borderRight, borderTop), anchor, colliderOffsetZ, colliderExtentZ);
+
+ if (sprite.positions.Length != 4)
+ {
+ for (int i = 0; i < vertices.Length; ++i)
+ vertices[i] = Vector3.zero;
+ }
+ }
+
+ void SetIndices()
+ {
+ int n = _borderOnly ? (8 * 6) : (9 * 6);
+ meshIndices = new int[n];
+ tk2dSpriteGeomGen.SetSlicedSpriteIndices(meshIndices, 0, 0, CurrentSprite, _borderOnly);
+ }
+
+ // returns true if value is close enough to compValue, by within 1% of scale
+ bool NearEnough(float value, float compValue, float scale) {
+ float diff = Mathf.Abs(value - compValue);
+ return Mathf.Abs(diff / scale) < 0.01f;
+ }
+
+ void PermanentUpgradeLegacyMode() {
+ tk2dSpriteDefinition def = CurrentSprite;
+
+ // Guess anchor
+ float x = def.untrimmedBoundsData[0].x;
+ float y = def.untrimmedBoundsData[0].y;
+ float w = def.untrimmedBoundsData[1].x;
+ float h = def.untrimmedBoundsData[1].y;
+ if (NearEnough(x, 0, w) && NearEnough(y, -h/2, h)) _anchor = tk2dBaseSprite.Anchor.UpperCenter;
+ else if (NearEnough(x, 0, w) && NearEnough(y, 0, h)) _anchor = tk2dBaseSprite.Anchor.MiddleCenter;
+ else if (NearEnough(x, 0, w) && NearEnough(y, h/2, h)) _anchor = tk2dBaseSprite.Anchor.LowerCenter;
+ else if (NearEnough(x, -w/2, w) && NearEnough(y, -h/2, h)) _anchor = tk2dBaseSprite.Anchor.UpperRight;
+ else if (NearEnough(x, -w/2, w) && NearEnough(y, 0, h)) _anchor = tk2dBaseSprite.Anchor.MiddleRight;
+ else if (NearEnough(x, -w/2, w) && NearEnough(y, h/2, h)) _anchor = tk2dBaseSprite.Anchor.LowerRight;
+ else if (NearEnough(x, w/2, w) && NearEnough(y, -h/2, h)) _anchor = tk2dBaseSprite.Anchor.UpperLeft;
+ else if (NearEnough(x, w/2, w) && NearEnough(y, 0, h)) _anchor = tk2dBaseSprite.Anchor.MiddleLeft;
+ else if (NearEnough(x, w/2, w) && NearEnough(y, h/2, h)) _anchor = tk2dBaseSprite.Anchor.LowerLeft;
+ else {
+ Debug.LogError("tk2dSlicedSprite (" + name + ") error - Unable to determine anchor upgrading from legacy mode. Please fix this manually.");
+ _anchor = tk2dBaseSprite.Anchor.MiddleCenter;
+ }
+
+ // Calculate dimensions in pixel units
+ float pixelWidth = w / def.texelSize.x;
+ float pixelHeight = h / def.texelSize.y;
+ _dimensions.x = _scale.x * pixelWidth;
+ _dimensions.y = _scale.y * pixelHeight;
+
+ _scale.Set( 1, 1, 1 );
+ legacyMode = false;
+ }
+
+ public override void Build()
+ {
+ // Best guess upgrade
+ if (legacyMode == true) {
+ PermanentUpgradeLegacyMode();
+ }
+
+ meshUvs = new Vector2[16];
+ meshVertices = new Vector3[16];
+ meshColors = new Color32[16];
+ SetIndices();
+
+ SetGeometry(meshVertices, meshUvs);
+ SetColors(meshColors);
+
+ if (mesh == null)
+ {
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ }
+ else
+ {
+ mesh.Clear();
+ }
+ mesh.vertices = meshVertices;
+ mesh.colors32 = meshColors;
+ mesh.uv = meshUvs;
+ mesh.triangles = meshIndices;
+ mesh.RecalculateBounds();
+ mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
+
+ GetComponent().mesh = mesh;
+
+ UpdateCollider();
+ UpdateMaterial();
+ }
+
+ protected override void UpdateGeometry() { UpdateGeometryImpl(); }
+ protected override void UpdateColors() { UpdateColorsImpl(); }
+ protected override void UpdateVertices() { UpdateGeometryImpl(); }
+ void UpdateIndices() {
+ if (mesh != null) {
+ SetIndices();
+ mesh.triangles = meshIndices;
+ }
+ }
+
+ protected void UpdateColorsImpl()
+ {
+#if UNITY_EDITOR
+ // This can happen with prefabs in the inspector
+ if (meshColors == null || meshColors.Length == 0)
+ return;
+#endif
+ if (meshColors == null || meshColors.Length == 0) {
+ Build();
+ }
+ else {
+ SetColors(meshColors);
+ mesh.colors32 = meshColors;
+ }
+ }
+
+ protected void UpdateGeometryImpl()
+ {
+#if UNITY_EDITOR
+ // This can happen with prefabs in the inspector
+ if (mesh == null)
+ return;
+#endif
+ if (meshVertices == null || meshVertices.Length == 0) {
+ Build();
+ }
+ else {
+ SetGeometry(meshVertices, meshUvs);
+ mesh.vertices = meshVertices;
+ mesh.uv = meshUvs;
+ mesh.RecalculateBounds();
+ mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
+
+ UpdateCollider();
+ }
+ }
+
+#region Collider
+ protected override void UpdateCollider()
+ {
+ if (CreateBoxCollider) {
+ if (boxCollider == null) {
+ boxCollider = GetComponent();
+ if (boxCollider == null) {
+ boxCollider = gameObject.AddComponent();
+ }
+ }
+ boxCollider.size = 2 * boundsExtents;
+ boxCollider.center = boundsCenter;
+ } else {
+#if UNITY_EDITOR
+ boxCollider = GetComponent();
+ if (boxCollider != null) {
+ DestroyImmediate(boxCollider);
+ }
+#else
+ if (boxCollider != null) {
+ Destroy(boxCollider);
+ }
+#endif
+ }
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (mesh != null) {
+ Bounds b = mesh.bounds;
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube(b.center, b.extents * 2);
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+
+ protected override void CreateCollider() {
+ UpdateCollider();
+ }
+
+#if UNITY_EDITOR
+ public override void EditMode__CreateCollider() {
+ UpdateCollider();
+ }
+#endif
+#endregion
+
+ protected override void UpdateMaterial()
+ {
+ if (renderer.sharedMaterial != collectionInst.spriteDefinitions[spriteId].materialInst)
+ renderer.material = collectionInst.spriteDefinitions[spriteId].materialInst;
+ }
+
+ protected override int GetCurrentVertexCount()
+ {
+#if UNITY_EDITOR
+ if (meshVertices == null)
+ return 0;
+#endif
+ return 16;
+ }
+
+ public override void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ var sprite = CurrentSprite;
+ Vector3 oldSize = new Vector3(_dimensions.x * sprite.texelSize.x * _scale.x, _dimensions.y * sprite.texelSize.y * _scale.y);
+ Vector3 oldMin = Vector3.zero;
+ switch (_anchor) {
+ case Anchor.LowerLeft: oldMin.Set(0,0,0); break;
+ case Anchor.LowerCenter: oldMin.Set(0.5f,0,0); break;
+ case Anchor.LowerRight: oldMin.Set(1,0,0); break;
+ case Anchor.MiddleLeft: oldMin.Set(0,0.5f,0); break;
+ case Anchor.MiddleCenter: oldMin.Set(0.5f,0.5f,0); break;
+ case Anchor.MiddleRight: oldMin.Set(1,0.5f,0); break;
+ case Anchor.UpperLeft: oldMin.Set(0,1,0); break;
+ case Anchor.UpperCenter: oldMin.Set(0.5f,1,0); break;
+ case Anchor.UpperRight: oldMin.Set(1,1,0); break;
+ }
+ oldMin = Vector3.Scale(oldMin, oldSize) * -1;
+ Vector3 newDimensions = oldSize + dMax - dMin;
+ newDimensions.x /= sprite.texelSize.x * _scale.x;
+ newDimensions.y /= sprite.texelSize.y * _scale.y;
+ Vector3 scaledMin = new Vector3(Mathf.Approximately(_dimensions.x, 0) ? 0 : (oldMin.x * newDimensions.x / _dimensions.x),
+ Mathf.Approximately(_dimensions.y, 0) ? 0 : (oldMin.y * newDimensions.y / _dimensions.y));
+ Vector3 offset = oldMin + dMin - scaledMin;
+ offset.z = 0;
+ transform.position = transform.TransformPoint(offset);
+ dimensions = new Vector2(newDimensions.x, newDimensions.y);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs.meta
new file mode 100644
index 000000000..95de8f0e0
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSlicedSprite.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 14088a148d1a83e4780e3db13db5b6ca
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30800
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs
new file mode 100644
index 000000000..e131af295
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs
@@ -0,0 +1,248 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSprite")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+///
+/// Sprite implementation which maintains its own Unity Mesh. Leverages dynamic batching.
+///
+public class tk2dSprite : tk2dBaseSprite
+{
+ Mesh mesh;
+ Vector3[] meshVertices;
+ Vector3[] meshNormals = null;
+ Vector4[] meshTangents = null;
+ Color32[] meshColors;
+
+ new void Awake()
+ {
+ base.Awake();
+
+ // Create mesh, independently to everything else
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+
+ // This will not be set when instantiating in code
+ // In that case, Build will need to be called
+ if (Collection)
+ {
+ // reset spriteId if outside bounds
+ // this is when the sprite collection data is corrupt
+ if (_spriteId < 0 || _spriteId >= Collection.Count)
+ _spriteId = 0;
+
+ Build();
+ }
+ }
+
+ protected void OnDestroy()
+ {
+ if (mesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(mesh);
+#else
+ Destroy(mesh);
+#endif
+ }
+
+ if (meshColliderMesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(meshColliderMesh);
+#else
+ Destroy(meshColliderMesh);
+#endif
+ }
+ }
+
+ public override void Build()
+ {
+ var sprite = collectionInst.spriteDefinitions[spriteId];
+
+ meshVertices = new Vector3[sprite.positions.Length];
+ meshColors = new Color32[sprite.positions.Length];
+
+ meshNormals = new Vector3[0];
+ meshTangents = new Vector4[0];
+
+ if (sprite.normals != null && sprite.normals.Length > 0)
+ {
+ meshNormals = new Vector3[sprite.normals.Length];
+ }
+ if (sprite.tangents != null && sprite.tangents.Length > 0)
+ {
+ meshTangents = new Vector4[sprite.tangents.Length];
+ }
+
+ SetPositions(meshVertices, meshNormals, meshTangents);
+ SetColors(meshColors);
+
+ if (mesh == null)
+ {
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+ }
+
+ mesh.Clear();
+ mesh.vertices = meshVertices;
+ mesh.normals = meshNormals;
+ mesh.tangents = meshTangents;
+ mesh.colors32 = meshColors;
+ mesh.uv = sprite.uvs;
+ mesh.triangles = sprite.indices;
+ mesh.bounds = AdjustedMeshBounds( GetBounds(), renderLayer );
+
+ UpdateMaterial();
+ CreateCollider();
+ }
+
+ ///
+ /// Adds a tk2dSprite as a component to the gameObject passed in, setting up necessary parameters and building geometry.
+ /// Convenience alias of tk2dBaseSprite.AddComponent(...).
+ ///
+ public static tk2dSprite AddComponent(GameObject go, tk2dSpriteCollectionData spriteCollection, int spriteId)
+ {
+ return tk2dBaseSprite.AddComponent(go, spriteCollection, spriteId);
+ }
+
+ ///
+ /// Adds a tk2dSprite as a component to the gameObject passed in, setting up necessary parameters and building geometry.
+ /// Convenience alias of tk2dBaseSprite.AddComponent(...).
+ ///
+ public static tk2dSprite AddComponent(GameObject go, tk2dSpriteCollectionData spriteCollection, string spriteName)
+ {
+ return tk2dBaseSprite.AddComponent(go, spriteCollection, spriteName);
+ }
+
+ ///
+ /// Create a sprite (and gameObject) displaying the region of the texture specified.
+ /// Use if you need to create a sprite collection
+ /// with multiple sprites.
+ /// Convenience alias of tk2dBaseSprite.CreateFromTexture(...)
+ ///
+ public static GameObject CreateFromTexture(Texture texture, tk2dSpriteCollectionSize size, Rect region, Vector2 anchor)
+ {
+ return tk2dBaseSprite.CreateFromTexture(texture, size, region, anchor);
+ }
+
+ protected override void UpdateGeometry() { UpdateGeometryImpl(); }
+ protected override void UpdateColors() { UpdateColorsImpl(); }
+ protected override void UpdateVertices() { UpdateVerticesImpl(); }
+
+
+ protected void UpdateColorsImpl()
+ {
+ // This can happen with prefabs in the inspector
+ if (mesh == null || meshColors == null || meshColors.Length == 0)
+ return;
+
+ SetColors(meshColors);
+ mesh.colors32 = meshColors;
+ }
+
+ protected void UpdateVerticesImpl()
+ {
+ var sprite = collectionInst.spriteDefinitions[spriteId];
+
+ // This can happen with prefabs in the inspector
+ if (mesh == null || meshVertices == null || meshVertices.Length == 0)
+ return;
+
+ // Clear out normals and tangents when switching from a sprite with them to one without
+ if (sprite.normals.Length != meshNormals.Length)
+ {
+ meshNormals = (sprite.normals != null && sprite.normals.Length > 0)?(new Vector3[sprite.normals.Length]):(new Vector3[0]);
+ }
+ if (sprite.tangents.Length != meshTangents.Length)
+ {
+ meshTangents = (sprite.tangents != null && sprite.tangents.Length > 0)?(new Vector4[sprite.tangents.Length]):(new Vector4[0]);
+ }
+
+ SetPositions(meshVertices, meshNormals, meshTangents);
+ mesh.vertices = meshVertices;
+ mesh.normals = meshNormals;
+ mesh.tangents = meshTangents;
+ mesh.uv = sprite.uvs;
+ mesh.bounds = AdjustedMeshBounds( GetBounds(), renderLayer );
+ }
+
+ protected void UpdateGeometryImpl()
+ {
+ // This can happen with prefabs in the inspector
+ if (mesh == null)
+ return;
+
+ var sprite = collectionInst.spriteDefinitions[spriteId];
+ if (meshVertices == null || meshVertices.Length != sprite.positions.Length)
+ {
+ meshVertices = new Vector3[sprite.positions.Length];
+ meshNormals = (sprite.normals != null && sprite.normals.Length > 0)?(new Vector3[sprite.normals.Length]):(new Vector3[0]);
+ meshTangents = (sprite.tangents != null && sprite.tangents.Length > 0)?(new Vector4[sprite.tangents.Length]):(new Vector4[0]);
+ meshColors = new Color32[sprite.positions.Length];
+ }
+ SetPositions(meshVertices, meshNormals, meshTangents);
+ SetColors(meshColors);
+
+ mesh.Clear();
+ mesh.vertices = meshVertices;
+ mesh.normals = meshNormals;
+ mesh.tangents = meshTangents;
+ mesh.colors32 = meshColors;
+ mesh.uv = sprite.uvs;
+ mesh.bounds = AdjustedMeshBounds( GetBounds(), renderLayer );
+ mesh.triangles = sprite.indices;
+ }
+
+ protected override void UpdateMaterial()
+ {
+ if (renderer.sharedMaterial != collectionInst.spriteDefinitions[spriteId].materialInst)
+ renderer.material = collectionInst.spriteDefinitions[spriteId].materialInst;
+ }
+
+ protected override int GetCurrentVertexCount()
+ {
+ if (meshVertices == null)
+ return 0;
+ // Really nasty bug here found by Andrew Welch.
+ return meshVertices.Length;
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (collectionInst != null && spriteId >= 0 && spriteId < collectionInst.Count) {
+ var sprite = collectionInst.spriteDefinitions[spriteId];
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube(Vector3.Scale(sprite.untrimmedBoundsData[0], _scale), Vector3.Scale(sprite.untrimmedBoundsData[1], _scale));
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+
+ public override void ForceBuild()
+ {
+ base.ForceBuild();
+ GetComponent().mesh = mesh;
+ }
+
+ public override void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ var sprite = CurrentSprite;
+ Vector3 oldMin = Vector3.Scale(sprite.untrimmedBoundsData[0] - 0.5f * sprite.untrimmedBoundsData[1], _scale);
+ Vector3 oldSize = Vector3.Scale(sprite.untrimmedBoundsData[1], _scale);
+ Vector3 newScale = oldSize + dMax - dMin;
+ newScale.x /= sprite.untrimmedBoundsData[1].x;
+ newScale.y /= sprite.untrimmedBoundsData[1].y;
+ Vector3 scaledMin = new Vector3(Mathf.Approximately(_scale.x, 0) ? 0 : (oldMin.x * newScale.x / _scale.x),
+ Mathf.Approximately(_scale.y, 0) ? 0 : (oldMin.y * newScale.y / _scale.y));
+ Vector3 offset = oldMin + dMin - scaledMin;
+ offset.z = 0;
+ transform.position = transform.TransformPoint(offset);
+ scale = new Vector3(newScale.x, newScale.y, _scale.z);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs.meta
new file mode 100644
index 000000000..7d4fe4d6e
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSprite.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3fac570381f34f647b768dc5a5aa1364
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31000
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs
new file mode 100644
index 000000000..bff9420da
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs
@@ -0,0 +1,289 @@
+using UnityEngine;
+using System.Collections;
+
+[System.Serializable]
+///
+/// Defines an animation frame and associated data.
+///
+public class tk2dSpriteAnimationFrame
+{
+ ///
+ /// The sprite collection.
+ ///
+ public tk2dSpriteCollectionData spriteCollection;
+ ///
+ /// The sprite identifier.
+ ///
+ public int spriteId;
+
+ ///
+ /// When true will trigger an animation event when this frame is displayed
+ ///
+ public bool triggerEvent = false;
+ ///
+ /// Custom event data (string)
+ ///
+ public string eventInfo = "";
+ ///
+ /// Custom event data (int)
+ ///
+ public int eventInt = 0;
+ ///
+ /// Custom event data (float)
+ ///
+ public float eventFloat = 0.0f;
+
+ public void CopyFrom(tk2dSpriteAnimationFrame source)
+ {
+ CopyFrom(source, true);
+ }
+
+ public void CopyTriggerFrom(tk2dSpriteAnimationFrame source)
+ {
+ triggerEvent = source.triggerEvent;
+ eventInfo = source.eventInfo;
+ eventInt = source.eventInt;
+ eventFloat = source.eventFloat;
+ }
+
+ public void ClearTrigger()
+ {
+ triggerEvent = false;
+ eventInt = 0;
+ eventFloat = 0;
+ eventInfo = "";
+ }
+
+ public void CopyFrom(tk2dSpriteAnimationFrame source, bool full)
+ {
+ spriteCollection = source.spriteCollection;
+ spriteId = source.spriteId;
+
+ if (full) CopyTriggerFrom(source);
+ }
+}
+
+[System.Serializable]
+///
+/// Sprite Animation Clip contains a collection of frames and associated properties required to play it.
+///
+public class tk2dSpriteAnimationClip
+{
+ ///
+ /// Name of animation clip
+ ///
+ public string name = "Default";
+
+ ///
+ /// Array of frames
+ ///
+ public tk2dSpriteAnimationFrame[] frames = null;
+
+ ///
+ /// FPS of clip
+ ///
+ public float fps = 30.0f;
+
+ ///
+ /// Defines the start point of the loop when is selected
+ ///
+ public int loopStart = 0;
+
+ ///
+ /// Wrap mode for the clip
+ ///
+ public enum WrapMode
+ {
+ ///
+ /// Loop indefinitely
+ ///
+ Loop,
+
+ ///
+ /// Start from beginning, and loop a section defined by
+ ///
+ LoopSection,
+
+ ///
+ /// Plays the clip once and stops at the last frame
+ ///
+ Once,
+
+ ///
+ /// Plays the clip once forward, and then once in reverse, repeating indefinitely
+ ///
+ PingPong,
+
+ ///
+ /// Simply choses a random frame and stops
+ ///
+ RandomFrame,
+
+ ///
+ /// Starts at a random frame and loops indefinitely from there. Useful for multiple animated sprites to start at a different phase.
+ ///
+ RandomLoop,
+
+ ///
+ /// Switches to the selected sprite and stops.
+ ///
+ Single
+ };
+
+ ///
+ /// The wrap mode.
+ ///
+ public WrapMode wrapMode = WrapMode.Loop;
+
+ ///
+ /// Default contstructor
+ ///
+ public tk2dSpriteAnimationClip() {
+
+ }
+
+ ///
+ /// Copy constructor
+ ///
+ public tk2dSpriteAnimationClip(tk2dSpriteAnimationClip source) {
+ CopyFrom( source );
+ }
+
+ ///
+ /// Copies the source animation clip into the current one.
+ /// All frames are duplicated.
+ ///
+ public void CopyFrom(tk2dSpriteAnimationClip source)
+ {
+ name = source.name;
+ if (source.frames == null)
+ {
+ frames = null;
+ }
+ else
+ {
+ frames = new tk2dSpriteAnimationFrame[source.frames.Length];
+ for (int i = 0; i < frames.Length; ++i)
+ {
+ if (source.frames[i] == null)
+ {
+ frames[i] = null;
+ }
+ else
+ {
+ frames[i] = new tk2dSpriteAnimationFrame();
+ frames[i].CopyFrom(source.frames[i]);
+ }
+ }
+ }
+ fps = source.fps;
+ loopStart = source.loopStart;
+ wrapMode = source.wrapMode;
+ if (wrapMode == tk2dSpriteAnimationClip.WrapMode.Single && frames.Length > 1)
+ {
+ frames = new tk2dSpriteAnimationFrame[] { frames[0] };
+ Debug.LogError(string.Format("Clip: '{0}' Fixed up frames for WrapMode.Single", name));
+ }
+ }
+
+ ///
+ /// Clears the clip, removes all frames
+ ///
+ public void Clear()
+ {
+ name = "";
+ frames = new tk2dSpriteAnimationFrame[0];
+ fps = 30.0f;
+ loopStart = 0;
+ wrapMode = WrapMode.Loop;
+ }
+
+ ///
+ /// Is the clip empty?
+ ///
+ public bool Empty
+ {
+ get { return name.Length == 0 || frames == null || frames.Length == 0; }
+ }
+
+ ///
+ /// Gets the tk2dSpriteAnimationFrame for a particular frame
+ ///
+ public tk2dSpriteAnimationFrame GetFrame(int frame) {
+ return frames[frame];
+ }
+}
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dSpriteAnimation")]
+///
+/// Holds a collection of clips
+///
+public class tk2dSpriteAnimation : MonoBehaviour
+{
+ ///
+ /// Array of clips
+ ///
+ public tk2dSpriteAnimationClip[] clips;
+
+ ///
+ /// Resolves an animation clip by name and returns a reference to it
+ ///
+ /// tk2dSpriteAnimationClip reference, null if not found
+ /// Case sensitive clip name, as defined in .
+ public tk2dSpriteAnimationClip GetClipByName(string name)
+ {
+ for (int i = 0; i < clips.Length; ++i)
+ if (clips[i].name == name) return clips[i];
+ return null;
+ }
+
+ ///
+ /// Resolves an animation clip by id and returns a reference to it
+ ///
+ /// tk2dSpriteAnimationClip reference, null if not found
+ public tk2dSpriteAnimationClip GetClipById(int id) {
+ if (id < 0 || id >= clips.Length || clips[id].Empty) {
+ return null;
+ }
+ else {
+ return clips[id];
+ }
+ }
+
+ ///
+ /// Resolves an animation clip by name and returns a clipId
+ ///
+ /// Unique clip id, -1 if not found
+ /// Case sensitive clip name, as defined in .
+ public int GetClipIdByName(string name) {
+ for (int i = 0; i < clips.Length; ++i)
+ if (clips[i].name == name) return i;
+ return -1;
+ }
+
+ ///
+ /// Gets a clip id from a clip
+ ///
+ /// Unique clip id, -1 if not found in the animation collection
+ public int GetClipIdByName(tk2dSpriteAnimationClip clip) {
+ for (int i = 0; i < clips.Length; ++i)
+ if (clips[i] == clip) return i;
+ return -1;
+ }
+
+ ///
+ /// The first valid clip in the animation collection. Null if no valid clips are found.
+ ///
+ public tk2dSpriteAnimationClip FirstValidClip {
+ get {
+ for (int i = 0; i < clips.Length; ++i) {
+ if (!clips[i].Empty && clips[i].frames[0].spriteCollection != null && clips[i].frames[0].spriteId != -1) {
+ return clips[i];
+ }
+ }
+ return null;
+ }
+ }
+}
+
+
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs.meta
new file mode 100644
index 000000000..ff4d491fe
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimation.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ecaffc43a5d2b1d47858e3fb687e7271
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs
new file mode 100644
index 000000000..64750321e
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs
@@ -0,0 +1,766 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSpriteAnimator")]
+///
+/// Sprite animator.
+/// Attach this to a sprite class to animate it.
+///
+public class tk2dSpriteAnimator : MonoBehaviour
+{
+ [SerializeField] tk2dSpriteAnimation library;
+ [SerializeField] int defaultClipId = 0;
+
+ ///
+ /// Interface option to play the animation automatically when instantiated / game is started. Useful for background looping animations.
+ ///
+ public bool playAutomatically = false;
+
+ // This is now an int so we'll be able to or bitmasks
+ static State globalState = 0;
+
+ ///
+ /// Globally pause all animated sprites
+ ///
+ public static bool g_Paused
+ {
+ get { return (globalState & State.Paused) != 0; }
+ set { globalState = value?State.Paused:(State)0; }
+ }
+
+ ///
+ /// Get or set pause state on this current sprite
+ ///
+ public bool Paused
+ {
+ get { return (state & State.Paused) != 0; }
+ set
+ {
+ if (value) state |= State.Paused;
+ else state &= ~State.Paused;
+ }
+ }
+
+
+ ///
+ ///
+ ///
+ public tk2dSpriteAnimation Library {
+ get { return library; }
+ set { library = value; }
+ }
+
+ ///
+ /// The default clip used when Play is called with out any parameters
+ ///
+ public int DefaultClipId {
+ get { return defaultClipId; }
+ set { defaultClipId = value; }
+ }
+
+ ///
+ /// The default clip
+ ///
+ public tk2dSpriteAnimationClip DefaultClip {
+ get { return GetClipById(defaultClipId); }
+ }
+
+
+ ///
+ /// Currently active clip
+ ///
+ tk2dSpriteAnimationClip currentClip = null;
+
+ ///
+ /// Time into the current clip. This is in clip local time (i.e. (int)clipTime = currentFrame)
+ ///
+ float clipTime = 0.0f;
+
+ ///
+ /// This is the frame rate of the current clip. Can be changed dynamicaly, as clipTime is accumulated time in real time.
+ ///
+ float clipFps = -1.0f;
+
+ ///
+ /// Previous frame identifier
+ ///
+ int previousFrame = -1;
+
+ ///
+ /// Animation completed callback.
+ /// This is called when the animation has completed playing.
+ /// Will not trigger on looped animations.
+ /// Parameters (caller, currentClip)
+ /// Set to null to clear.
+ ///
+ public System.Action AnimationCompleted;
+
+ ///
+ /// Animation callback.
+ /// This is called when the frame displayed has set.
+ /// The triggering frame index is passed through, and the eventInfo / Int / Float can be extracted.
+ /// Parameters (caller, currentClip, currentFrame)
+ /// Set to null to clear.
+ ///
+ public System.Action AnimationEventTriggered;
+
+ enum State
+ {
+ Init = 0,
+ Playing = 1,
+ Paused = 2,
+ }
+ State state = State.Init; // init state. Do not use elsewhere
+
+ void OnEnable() {
+ if (Sprite == null) {
+ enabled = false;
+ }
+ }
+
+ void Start()
+ {
+ if (playAutomatically) {
+ Play(DefaultClip);
+ }
+ }
+
+ protected tk2dBaseSprite _sprite = null;
+ ///
+ /// Gets the sprite the animator is currently animating
+ ///
+ virtual public tk2dBaseSprite Sprite {
+ get {
+ if (_sprite == null) {
+ _sprite = GetComponent();
+ if (_sprite == null) {
+ Debug.LogError("Sprite not found attached to tk2dSpriteAnimator.");
+ }
+ }
+ return _sprite;
+ }
+ }
+
+ ///
+ /// Adds a tk2dSpriteAnimator as a component to the gameObject passed in, setting up necessary parameters and building geometry.
+ ///
+ public static tk2dSpriteAnimator AddComponent(GameObject go, tk2dSpriteAnimation anim, int clipId)
+ {
+ tk2dSpriteAnimationClip clip = anim.clips[clipId];
+ tk2dSpriteAnimator animSprite = go.AddComponent();
+ animSprite.Library = anim;
+ animSprite.SetSprite(clip.frames[0].spriteCollection, clip.frames[0].spriteId);
+ return animSprite;
+ }
+
+ // This is used for Play("name") and has verbose error messages
+ tk2dSpriteAnimationClip GetClipByNameVerbose(string name) {
+ if (library == null) {
+ Debug.LogError("Library not set");
+ return null;
+ }
+ else {
+ tk2dSpriteAnimationClip clip = library.GetClipByName( name );
+ if (clip == null) {
+ Debug.LogError("Unable to find clip '" + name + "' in library");
+ return null;
+ }
+ else {
+ return clip;
+ }
+ }
+ }
+
+#region Play
+ ///
+ /// Play the current / last played clip. If no clip has been played, the default clip is used.
+ /// Will not restart the clip if it is already playing.
+ ///
+ public void Play()
+ {
+ if (currentClip == null) {
+ currentClip = DefaultClip;
+ }
+
+ Play(currentClip);
+ }
+
+ ///
+ /// Play the specified clip.
+ /// Will not restart the clip if it is already playing.
+ ///
+ ///
+ /// Name of clip. Try to cache the animation clip Id and use that instead for performance.
+ ///
+ public void Play(string name)
+ {
+ Play(GetClipByNameVerbose(name));
+ }
+
+ ///
+ /// Play the specified clip.
+ /// Will not restart the clip if it is already playing.
+ ///
+ public void Play(tk2dSpriteAnimationClip clip) {
+ Play(clip, 0, DefaultFps);
+ }
+
+#region PlayFromFrame
+ ///
+ /// Play the current / last played clip. If no clip has been played, the default clip is used.
+ /// Will restart the clip at frame if called while the clip is playing.
+ ///
+ public void PlayFromFrame(int frame)
+ {
+ if (currentClip == null) {
+ currentClip = DefaultClip;
+ }
+
+ PlayFromFrame(currentClip, frame);
+ }
+
+ ///
+ /// Play the specified clip, starting at the frame specified.
+ /// Will restart the clip at frame if called while the clip is playing.
+ ///
+ /// Name of clip. Try to cache the animation clip Id and use that instead for performance.
+ /// Frame to start playing from.
+ public void PlayFromFrame(string name, int frame)
+ {
+ PlayFromFrame(GetClipByNameVerbose(name), frame);
+ }
+
+ ///
+ /// Play the clip specified by identifier, starting at the specified frame.
+ /// Will restart the clip at frame if it is already playing.
+ ///
+ /// Use to resolve a named clip id
+ /// Frame to start from.
+ public void PlayFromFrame(tk2dSpriteAnimationClip clip, int frame)
+ {
+ PlayFrom(clip, (frame + 0.001f) / clip.fps); // offset ever so slightly to round down correctly
+ }
+#endregion
+
+#region PlayFrom
+ ///
+ /// Play the current / last played clip. If no clip has been played, the default clip is used.
+ /// Will restart the clip at frame if called while the clip is playing.
+ ///
+ public void PlayFrom(float clipStartTime)
+ {
+ if (currentClip == null) {
+ currentClip = DefaultClip;
+ }
+
+ PlayFrom(currentClip, clipStartTime);
+ }
+
+ ///
+ /// Play the specified clip, starting "clipStartTime" seconds into the clip.
+ /// Will restart the clip at clipStartTime if called while the clip is playing.
+ ///
+ /// Name of clip. Try to cache the animation clip Id and use that instead for performance.
+ /// Clip start time in seconds.
+ public void PlayFrom(string name, float clipStartTime)
+ {
+ tk2dSpriteAnimationClip clip = library ? library.GetClipByName(name) : null;
+ if (clip == null) {
+ ClipNameError(name);
+ }
+ else {
+ PlayFrom(clip, clipStartTime);
+ }
+ }
+
+ ///
+ /// Play the clip specified by identifier.
+ /// Will restart the clip at clipStartTime if called while the clip is playing.
+ ///
+ /// The clip to play.
+ /// Clip start time in seconds. A value of 0 will start the clip from the beginning
+ public void PlayFrom(tk2dSpriteAnimationClip clip, float clipStartTime)
+ {
+ Play(clip, clipStartTime, DefaultFps);
+ }
+#endregion
+
+ ///
+ /// Play the clip specified by identifier.
+ /// Will not restart the clip if called while it is already playing
+ /// unless clipStartTime is set.
+ ///
+ /// The clip to play.
+ /// Clip start time in seconds. A value of 0 will start the clip from the beginning.
+ /// Overriden framerate of clip. Set to DefaultFps to use default.
+ public void Play(tk2dSpriteAnimationClip clip, float clipStartTime, float overrideFps)
+ {
+ if (clip != null)
+ {
+ float fps = (overrideFps > 0.0f) ? overrideFps : clip.fps;
+ bool isAlreadyPlayingClip = (clipStartTime == 0) && IsPlaying(clip);
+
+ if (isAlreadyPlayingClip) {
+ // Update fps if it has changed
+ clipFps = fps;
+ }
+ else {
+ state |= State.Playing;
+ currentClip = clip;
+ clipFps = fps;
+
+ // Simply swap, no animation is played
+ if (currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.Single || currentClip.frames == null)
+ {
+ WarpClipToLocalTime(currentClip, 0.0f);
+ state &= ~State.Playing;
+ }
+ else if (currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.RandomFrame || currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.RandomLoop)
+ {
+ int rnd = Random.Range(0, currentClip.frames.Length);
+ WarpClipToLocalTime(currentClip, rnd);
+
+ if (currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.RandomFrame)
+ {
+ previousFrame = -1;
+ state &= ~State.Playing;
+ }
+ }
+ else
+ {
+ // clipStartTime is in seconds
+ // clipTime is in clip local time (ignoring fps)
+ float time = clipStartTime * clipFps;
+ if (currentClip.wrapMode == tk2dSpriteAnimationClip.WrapMode.Once && time >= clipFps * currentClip.frames.Length)
+ {
+ // warp to last frame
+ WarpClipToLocalTime(currentClip, currentClip.frames.Length - 1);
+ state &= ~State.Playing;
+ }
+ else
+ {
+ WarpClipToLocalTime(currentClip, time);
+
+ // force to the last frame
+ clipTime = time;
+ }
+ }
+ }
+ }
+ else
+ {
+ Debug.LogError("Calling clip.Play() with a null clip");
+ OnAnimationCompleted();
+ state &= ~State.Playing;
+ }
+ }
+#endregion
+
+ ///
+ /// Stop the currently playing clip.
+ ///
+ public void Stop()
+ {
+ state &= ~State.Playing;
+ }
+
+ ///
+ /// Stops the currently playing animation and reset to the first frame in the animation
+ ///
+ public void StopAndResetFrame()
+ {
+ if (currentClip != null)
+ {
+ SetSprite(currentClip.frames[0].spriteCollection, currentClip.frames[0].spriteId);
+ }
+ Stop();
+ }
+
+ ///
+ /// Is the named clip currently active & playing?
+ ///
+ public bool IsPlaying(string name)
+ {
+ return Playing && CurrentClip != null && CurrentClip.name == name;
+ }
+
+ ///
+ /// Is this clip currently active & playing?
+ ///
+ public bool IsPlaying(tk2dSpriteAnimationClip clip)
+ {
+ return Playing && CurrentClip != null && CurrentClip == clip;
+ }
+
+ ///
+ /// Is a clip currently playing?
+ /// Will return true if the clip is playing, but is paused.
+ ///
+ public bool Playing
+ {
+ get { return (state & State.Playing) != 0; }
+ }
+
+ ///
+ /// The currently active or playing
+ ///
+ public tk2dSpriteAnimationClip CurrentClip
+ {
+ get { return currentClip; }
+ }
+
+ ///
+ /// The current clip time in seconds
+ ///
+ public float ClipTimeSeconds
+ {
+ get { return (clipFps > 0.0f) ? (clipTime / clipFps) : (clipTime / currentClip.fps); }
+ }
+
+ ///
+ /// Current frame rate of the playing clip. May have been overriden by the user.
+ /// Set to 0 to default to the clips fps
+ ///
+ public float ClipFps
+ {
+ get { return clipFps; }
+ set
+ {
+ if (currentClip != null)
+ {
+ clipFps = (value > 0) ? value : currentClip.fps;
+ }
+ }
+ }
+
+ ///
+ /// Finds a named clip from the current library.
+ /// Returns null if not found
+ ///
+ public tk2dSpriteAnimationClip GetClipById(int id) {
+ if (library == null) {
+ return null;
+ }
+ else {
+ return library.GetClipById(id);
+ }
+ }
+
+ ///
+ /// The default Fps of the clip
+ ///
+ public static float DefaultFps { get { return 0; } }
+
+ ///
+ /// Resolves an animation clip by name and returns a unique id.
+ /// This is a convenient alias to
+ ///
+ ///
+ /// Unique Animation Clip Id.
+ ///
+ /// Case sensitive clip name, as defined in .
+ public int GetClipIdByName(string name)
+ {
+ return library ? library.GetClipIdByName(name) : -1;
+ }
+ ///
+ /// Resolves an animation clip by name and returns a reference to it.
+ /// This is a convenient alias to
+ ///
+ ///
+ /// tk2dSpriteAnimationClip reference, null if not found
+ ///
+ /// Case sensitive clip name, as defined in .
+ public tk2dSpriteAnimationClip GetClipByName(string name)
+ {
+ return library ? library.GetClipByName(name) : null;
+ }
+
+ ///
+ /// Pause the currently playing clip. Will do nothing if the clip is currently paused.
+ ///
+ public void Pause()
+ {
+ state |= State.Paused;
+ }
+
+ ///
+ /// Resume the currently paused clip. Will do nothing if the clip hasn't been paused.
+ ///
+ public void Resume()
+ {
+ state &= ~State.Paused;
+ }
+
+ ///
+ /// Sets the current frame. The animation will wrap if the selected frame exceeds the
+ /// number of frames in the clip.
+ /// This variant WILL trigger an event if the current frame has a trigger defined.
+ ///
+ public void SetFrame(int currFrame)
+ {
+ SetFrame(currFrame, true);
+ }
+
+ ///
+ /// Sets the current frame. The animation will wrap if the selected frame exceeds the
+ /// number of frames in the clip.
+ ///
+ public void SetFrame(int currFrame, bool triggerEvent)
+ {
+ if (currentClip == null) {
+ currentClip = DefaultClip;
+ }
+
+ if (currentClip != null) {
+ int frame = currFrame % currentClip.frames.Length;
+ SetFrameInternal(frame);
+
+ if (triggerEvent && currentClip.frames.Length > 0 && currFrame >= 0) {
+ ProcessEvents(frame - 1, frame, 1);
+ }
+ }
+ }
+
+ ///
+ /// Returns the current frame of the animation
+ /// This is a zero based index into CurrentClip.frames
+ ///
+ public int CurrentFrame {
+ get {
+ switch (currentClip.wrapMode) {
+ case tk2dSpriteAnimationClip.WrapMode.Once:
+ return Mathf.Min((int)clipTime, currentClip.frames.Length);
+
+ case tk2dSpriteAnimationClip.WrapMode.Loop:
+ case tk2dSpriteAnimationClip.WrapMode.RandomLoop:
+ return (int)clipTime % currentClip.frames.Length;
+
+ case tk2dSpriteAnimationClip.WrapMode.LoopSection: {
+ int currFrame = (int)clipTime;
+ int currFrameLooped = currentClip.loopStart + ((currFrame - currentClip.loopStart) % (currentClip.frames.Length - currentClip.loopStart));
+ if (currFrame >= currentClip.loopStart) return currFrameLooped;
+ else return currFrame;
+ }
+
+ case tk2dSpriteAnimationClip.WrapMode.PingPong: {
+ int currFrame = (int)clipTime % (currentClip.frames.Length + currentClip.frames.Length - 2);
+ if (currFrame >= currentClip.frames.Length) {
+ currFrame = 2 * currentClip.frames.Length - 2 - currFrame;
+ }
+ return currFrame;
+ }
+
+ default: {
+ Debug.LogError("Unhandled clip wrap mode");
+ goto case tk2dSpriteAnimationClip.WrapMode.Loop;
+ }
+ }
+ }
+ }
+
+ ///
+ /// Steps the animation based on the given deltaTime
+ /// Disable tk2dSpriteAnimator, and then call UpdateAnimation manually to feed your own time
+ /// eg. when you need an animation to play when the game is paused using Time.timeScale.
+ ///
+ public void UpdateAnimation(float deltaTime)
+ {
+ // Only process when clip is playing
+ var localState = state | globalState;
+ if (localState != State.Playing)
+ return;
+
+ // Current clip should not be null at this point
+ clipTime += deltaTime * clipFps;
+ int _previousFrame = previousFrame;
+
+ switch (currentClip.wrapMode)
+ {
+ case tk2dSpriteAnimationClip.WrapMode.Loop:
+ case tk2dSpriteAnimationClip.WrapMode.RandomLoop:
+ {
+ int currFrame = (int)clipTime % currentClip.frames.Length;
+ SetFrameInternal(currFrame);
+ if (currFrame < _previousFrame) // wrap around
+ {
+ ProcessEvents(_previousFrame, currentClip.frames.Length - 1, 1); // up to end of clip
+ ProcessEvents(-1, currFrame, 1); // process up to current frame
+ }
+ else
+ {
+ ProcessEvents(_previousFrame, currFrame, 1);
+ }
+ break;
+ }
+
+ case tk2dSpriteAnimationClip.WrapMode.LoopSection:
+ {
+ int currFrame = (int)clipTime;
+ int currFrameLooped = currentClip.loopStart + ((currFrame - currentClip.loopStart) % (currentClip.frames.Length - currentClip.loopStart));
+ if (currFrame >= currentClip.loopStart)
+ {
+ SetFrameInternal(currFrameLooped);
+ currFrame = currFrameLooped;
+ if (_previousFrame < currentClip.loopStart)
+ {
+ ProcessEvents(_previousFrame, currentClip.loopStart - 1, 1); // processed up to loop-start
+ ProcessEvents(currentClip.loopStart - 1, currFrame, 1); // to current frame, doesn't cope if already looped once
+ }
+ else
+ {
+ if (currFrame < _previousFrame)
+ {
+ ProcessEvents(_previousFrame, currentClip.frames.Length - 1, 1); // up to end of clip
+ ProcessEvents(currentClip.loopStart - 1, currFrame, 1); // up to current frame
+ }
+ else
+ {
+ ProcessEvents(_previousFrame, currFrame, 1); // this doesn't cope with multi loops within one frame
+ }
+ }
+ }
+ else
+ {
+ SetFrameInternal(currFrame);
+ ProcessEvents(_previousFrame, currFrame, 1);
+ }
+ break;
+ }
+
+ case tk2dSpriteAnimationClip.WrapMode.PingPong:
+ {
+ int currFrame = (int)clipTime % (currentClip.frames.Length + currentClip.frames.Length - 2);
+ int dir = 1;
+ if (currFrame >= currentClip.frames.Length)
+ {
+ currFrame = 2 * currentClip.frames.Length - 2 - currFrame;
+ dir = -1;
+ }
+ // This is likely to be buggy - this needs to be rewritten storing prevClipTime and comparing that rather than previousFrame
+ // as its impossible to detect direction with this, when running at frame speeds where a transition occurs within a frame
+ if (currFrame < _previousFrame) dir = -1;
+ SetFrameInternal(currFrame);
+ ProcessEvents(_previousFrame, currFrame, dir);
+ break;
+ }
+
+ case tk2dSpriteAnimationClip.WrapMode.Once:
+ {
+ int currFrame = (int)clipTime;
+ if (currFrame >= currentClip.frames.Length)
+ {
+ SetFrameInternal(currentClip.frames.Length - 1); // set to last frame
+ state &= ~State.Playing; // stop playing before calling event - the event could start a new animation playing here
+ ProcessEvents(_previousFrame, currentClip.frames.Length - 1, 1);
+ OnAnimationCompleted();
+ }
+ else
+ {
+ SetFrameInternal(currFrame);
+ ProcessEvents(_previousFrame, currFrame, 1);
+ }
+ break;
+ }
+ }
+ }
+
+ // Error helpers
+ void ClipNameError(string name) {
+ Debug.LogError("Unable to find clip named '" + name + "' in library");
+ }
+
+ void ClipIdError(int id) {
+ Debug.LogError("Play - Invalid clip id '" + id.ToString() + "' in library");
+ }
+
+ // Warps the current active frame to the local time (i.e. float frame number) specified.
+ // Ensure that time doesn't exceed the number of frames. Will warp silently otherwise
+ void WarpClipToLocalTime(tk2dSpriteAnimationClip clip, float time)
+ {
+ clipTime = time;
+ int frameId = (int)clipTime % clip.frames.Length;
+ tk2dSpriteAnimationFrame frame = clip.frames[frameId];
+
+ SetSprite(frame.spriteCollection, frame.spriteId);
+ if (frame.triggerEvent)
+ {
+ if (AnimationEventTriggered != null) {
+ AnimationEventTriggered(this, clip, frameId);
+ }
+ }
+ previousFrame = frameId;
+ }
+
+ void SetFrameInternal(int currFrame)
+ {
+ if (previousFrame != currFrame)
+ {
+ SetSprite( currentClip.frames[currFrame].spriteCollection, currentClip.frames[currFrame].spriteId );
+ previousFrame = currFrame;
+ }
+ }
+
+ void ProcessEvents(int start, int last, int direction)
+ {
+ if (AnimationEventTriggered == null || start == last)
+ return;
+ int end = last + direction;
+ var frames = currentClip.frames;
+ for (int frame = start + direction; frame != end; frame += direction)
+ {
+ if (frames[frame].triggerEvent && AnimationEventTriggered != null) {
+ AnimationEventTriggered(this, currentClip, frame);
+ }
+ }
+ }
+
+ void OnAnimationCompleted()
+ {
+ previousFrame = -1;
+ if (AnimationCompleted != null) {
+ AnimationCompleted(this, currentClip);
+ }
+ }
+
+ public virtual void LateUpdate()
+ {
+ UpdateAnimation(Time.deltaTime);
+ }
+
+ public virtual void SetSprite(tk2dSpriteCollectionData spriteCollection, int spriteId) {
+ Sprite.SetSprite(spriteCollection, spriteId);
+ }
+
+#if UNITY_EDITOR
+ public float EditorClipTime
+ {
+ get
+ {
+ switch (currentClip.wrapMode)
+ {
+ case tk2dSpriteAnimationClip.WrapMode.Once:
+ return Mathf.Min(clipTime, currentClip.frames.Length);
+ case tk2dSpriteAnimationClip.WrapMode.Loop:
+ case tk2dSpriteAnimationClip.WrapMode.RandomLoop:
+ return clipTime % currentClip.frames.Length;
+ case tk2dSpriteAnimationClip.WrapMode.LoopSection:
+ {
+ float currFrame = clipTime;
+ float currFrameLooped = currentClip.loopStart + ((currFrame - currentClip.loopStart) % (currentClip.frames.Length - currentClip.loopStart));
+ if (currFrame >= currentClip.loopStart) return currFrameLooped;
+ else return currFrame;
+ }
+ case tk2dSpriteAnimationClip.WrapMode.PingPong:
+ {
+ int t = currentClip.frames.Length * 2 - 2;
+ float f = ((clipTime - 0.5f) % t);
+ f = (f > t * 0.5f) ? (t - f) : f;
+ return f + 0.5f;
+ }
+ }
+ return clipTime % currentClip.frames.Length;
+ }
+ }
+#endif
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs.meta
new file mode 100644
index 000000000..6857422e1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAnimator.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a5e54113e5604435b8ae87c7754f2725
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30095
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs
new file mode 100644
index 000000000..af07e1186
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs
@@ -0,0 +1,119 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+[ExecuteInEditMode]
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSpriteAttachPoint")]
+///
+/// Sprite Attach Point reference implementation
+/// Creates and manages a list of child gameObjects, with data for these sourced from
+/// the SpriteDefinition.AttachPoint. Position and rotation are supported.
+///
+public class tk2dSpriteAttachPoint : MonoBehaviour {
+
+ private tk2dBaseSprite sprite;
+
+ ///
+ /// A list of live attach points.
+ ///
+ public List attachPoints = new List();
+
+ // A list of attach points updated this frame - this is static as its only used for the lifetime
+ // of the HandleSpriteChanged function
+ static bool[] attachPointUpdated = new bool[32];
+
+ ///
+ /// When set, all inactive attach points (attach points that don't exist on a particular frame / sprite)
+ /// will be disabled.
+ ///
+ public bool deactivateUnusedAttachPoints = false;
+
+ void Awake() {
+ if (sprite == null) {
+ sprite = GetComponent();
+ if (sprite != null) {
+ HandleSpriteChanged( sprite );
+ }
+ }
+ }
+
+ void OnEnable() {
+ if (sprite != null) {
+ sprite.SpriteChanged += HandleSpriteChanged;
+ }
+ }
+
+ void OnDisable() {
+ if (sprite != null) {
+ sprite.SpriteChanged -= HandleSpriteChanged;
+ }
+ }
+
+ void UpdateAttachPointTransform( tk2dSpriteDefinition.AttachPoint attachPoint, Transform t ) {
+ t.localPosition = Vector3.Scale( attachPoint.position, sprite.scale );
+ t.localScale = sprite.scale;
+
+ float scl = Mathf.Sign(sprite.scale.x) * Mathf.Sign(sprite.scale.y);
+
+ t.localEulerAngles = new Vector3(0, 0, attachPoint.angle * scl); // handle angle fixup
+ }
+
+ void HandleSpriteChanged(tk2dBaseSprite spr) {
+ tk2dSpriteDefinition def = spr.CurrentSprite;
+
+ int maxAttachPoints = Mathf.Max( def.attachPoints.Length, attachPoints.Count );
+ if (maxAttachPoints > attachPointUpdated.Length) {
+ // resize to accomodate. no more bounds tests required below
+ attachPointUpdated = new bool[maxAttachPoints];
+ }
+
+ foreach (tk2dSpriteDefinition.AttachPoint ap in def.attachPoints) {
+ bool found = false;
+ int currAttachPointId = 0;
+ foreach (Transform inst in attachPoints ) {
+ // A dictionary would be ideal here, but could end up in an indeterminate state due to
+ // user deleting things at runtime. Hopefully the user won't have that many attach points
+ // that a linear search becomes an issue
+ if (inst != null && inst.name == ap.name) {
+ attachPointUpdated[currAttachPointId] = true;
+ UpdateAttachPointTransform( ap, inst );
+ found = true;
+ }
+ currAttachPointId++;
+ }
+ if (!found) {
+ GameObject go = new GameObject(ap.name);
+ Transform t = go.transform;
+ t.parent = transform;
+ UpdateAttachPointTransform( ap, t );
+ attachPointUpdated[attachPoints.Count] = true;
+ attachPoints.Add(t);
+ }
+ }
+
+ if (deactivateUnusedAttachPoints) {
+ for (int i = 0; i < attachPoints.Count; ++i) {
+ if (attachPoints[i] != null) {
+ GameObject go = attachPoints[i].gameObject;
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (attachPointUpdated[i] && !go.active) {
+ go.SetActiveRecursively(true);
+ }
+ else if (!attachPointUpdated[i] && go.active) {
+ go.SetActiveRecursively(false);
+ }
+#else
+ if (attachPointUpdated[i] && !go.activeSelf) {
+ go.SetActive(true);
+ }
+ else if (!attachPointUpdated[i] && go.activeSelf) {
+ go.SetActive(false);
+ }
+
+#endif
+ }
+ attachPointUpdated[i] = false; // always reset to false to avoid a second pass update next time
+ }
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs.meta
new file mode 100644
index 000000000..9b93c01fb
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2955e51c6e54748f1a3b9cd7f61aff91
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs
new file mode 100644
index 000000000..00ab647b9
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs
@@ -0,0 +1,639 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+[System.Serializable]
+public class tk2dSpriteColliderIsland
+{
+ public bool connected = true;
+ public Vector2[] points;
+
+ public bool IsValid()
+ {
+ if (connected)
+ {
+ return points.Length >= 3;
+ }
+ else
+ {
+ return points.Length >= 2;
+ }
+ }
+
+ public void CopyFrom(tk2dSpriteColliderIsland src)
+ {
+ connected = src.connected;
+
+ points = new Vector2[src.points.Length];
+ for (int i = 0; i < points.Length; ++i)
+ points[i] = src.points[i];
+ }
+
+ public bool CompareTo(tk2dSpriteColliderIsland src)
+ {
+ if (connected != src.connected) return false;
+ if (points.Length != src.points.Length) return false;
+ for (int i = 0; i < points.Length; ++i)
+ if (points[i] != src.points[i]) return false;
+ return true;
+ }
+}
+
+[System.Serializable]
+public class tk2dSpriteCollectionDefinition
+{
+ public enum Anchor
+ {
+ UpperLeft,
+ UpperCenter,
+ UpperRight,
+ MiddleLeft,
+ MiddleCenter,
+ MiddleRight,
+ LowerLeft,
+ LowerCenter,
+ LowerRight,
+ Custom
+ }
+
+ public enum Pad
+ {
+ Default,
+ BlackZeroAlpha,
+ Extend,
+ TileXY,
+ }
+
+ public enum ColliderType
+ {
+ UserDefined, // don't try to create or destroy anything
+ ForceNone, // nothing will be created, if something exists, it will be destroyed
+ BoxTrimmed, // box, trimmed to cover visible region
+ BoxCustom, // box, with custom values provided by user
+ Polygon, // polygon, can be concave
+ }
+
+ public enum PolygonColliderCap
+ {
+ None,
+ FrontAndBack,
+ Front,
+ Back,
+ }
+
+ public enum ColliderColor
+ {
+ Default, // default unity color scheme
+ Red,
+ White,
+ Black
+ }
+
+ public enum Source
+ {
+ Sprite,
+ SpriteSheet,
+ Font
+ }
+
+ public enum DiceFilter
+ {
+ Complete,
+ SolidOnly,
+ TransparentOnly,
+ }
+
+ public string name = "";
+
+ public bool disableTrimming = false;
+ public bool additive = false;
+ public Vector3 scale = new Vector3(1,1,1);
+
+ public Texture2D texture = null;
+
+ [System.NonSerialized]
+ public Texture2D thumbnailTexture;
+
+ public int materialId = 0;
+
+ public Anchor anchor = Anchor.MiddleCenter;
+ public float anchorX, anchorY;
+ public Object overrideMesh;
+
+ public bool doubleSidedSprite = false;
+ public bool customSpriteGeometry = false;
+ public tk2dSpriteColliderIsland[] geometryIslands = new tk2dSpriteColliderIsland[0];
+
+ public bool dice = false;
+ public int diceUnitX = 64;
+ public int diceUnitY = 64;
+ public DiceFilter diceFilter = DiceFilter.Complete;
+
+ public Pad pad = Pad.Default;
+ public int extraPadding = 0; // default
+
+ public Source source = Source.Sprite;
+ public bool fromSpriteSheet = false;
+ public bool hasSpriteSheetId = false;
+ public int spriteSheetId = 0;
+ public int spriteSheetX = 0, spriteSheetY = 0;
+ public bool extractRegion = false;
+ public int regionX, regionY, regionW, regionH;
+ public int regionId;
+
+ public ColliderType colliderType = ColliderType.UserDefined;
+ public Vector2 boxColliderMin, boxColliderMax;
+ public tk2dSpriteColliderIsland[] polyColliderIslands;
+ public PolygonColliderCap polyColliderCap = PolygonColliderCap.FrontAndBack;
+ public bool colliderConvex = false;
+ public bool colliderSmoothSphereCollisions = false;
+ public ColliderColor colliderColor = ColliderColor.Default;
+
+ public List attachPoints = new List();
+
+ public void CopyFrom(tk2dSpriteCollectionDefinition src)
+ {
+ name = src.name;
+
+ disableTrimming = src.disableTrimming;
+ additive = src.additive;
+ scale = src.scale;
+ texture = src.texture;
+ materialId = src.materialId;
+ anchor = src.anchor;
+ anchorX = src.anchorX;
+ anchorY = src.anchorY;
+ overrideMesh = src.overrideMesh;
+
+ doubleSidedSprite = src.doubleSidedSprite;
+ customSpriteGeometry = src.customSpriteGeometry;
+ geometryIslands = src.geometryIslands;
+
+ dice = src.dice;
+ diceUnitX = src.diceUnitX;
+ diceUnitY = src.diceUnitY;
+ diceFilter = src.diceFilter;
+ pad = src.pad;
+
+ source = src.source;
+ fromSpriteSheet = src.fromSpriteSheet;
+ hasSpriteSheetId = src.hasSpriteSheetId;
+ spriteSheetX = src.spriteSheetX;
+ spriteSheetY = src.spriteSheetY;
+ spriteSheetId = src.spriteSheetId;
+ extractRegion = src.extractRegion;
+ regionX = src.regionX;
+ regionY = src.regionY;
+ regionW = src.regionW;
+ regionH = src.regionH;
+ regionId = src.regionId;
+
+ colliderType = src.colliderType;
+ boxColliderMin = src.boxColliderMin;
+ boxColliderMax = src.boxColliderMax;
+ polyColliderCap = src.polyColliderCap;
+
+ colliderColor = src.colliderColor;
+ colliderConvex = src.colliderConvex;
+ colliderSmoothSphereCollisions = src.colliderSmoothSphereCollisions;
+
+ extraPadding = src.extraPadding;
+
+ if (src.polyColliderIslands != null)
+ {
+ polyColliderIslands = new tk2dSpriteColliderIsland[src.polyColliderIslands.Length];
+ for (int i = 0; i < polyColliderIslands.Length; ++i)
+ {
+ polyColliderIslands[i] = new tk2dSpriteColliderIsland();
+ polyColliderIslands[i].CopyFrom(src.polyColliderIslands[i]);
+ }
+ }
+ else
+ {
+ polyColliderIslands = new tk2dSpriteColliderIsland[0];
+ }
+
+ if (src.geometryIslands != null)
+ {
+ geometryIslands = new tk2dSpriteColliderIsland[src.geometryIslands.Length];
+ for (int i = 0; i < geometryIslands.Length; ++i)
+ {
+ geometryIslands[i] = new tk2dSpriteColliderIsland();
+ geometryIslands[i].CopyFrom(src.geometryIslands[i]);
+ }
+ }
+ else
+ {
+ geometryIslands = new tk2dSpriteColliderIsland[0];
+ }
+
+ attachPoints = new List(src.attachPoints.Count);
+ foreach (tk2dSpriteDefinition.AttachPoint srcAp in src.attachPoints) {
+ tk2dSpriteDefinition.AttachPoint ap = new tk2dSpriteDefinition.AttachPoint();
+ ap.CopyFrom(srcAp);
+ attachPoints.Add(ap);
+ }
+ }
+
+ public void Clear()
+ {
+ // Reinitialize
+ var tmpVar = new tk2dSpriteCollectionDefinition();
+ CopyFrom(tmpVar);
+ }
+
+ public bool CompareTo(tk2dSpriteCollectionDefinition src)
+ {
+ if (name != src.name) return false;
+
+ if (additive != src.additive) return false;
+ if (scale != src.scale) return false;
+ if (texture != src.texture) return false;
+ if (materialId != src.materialId) return false;
+ if (anchor != src.anchor) return false;
+ if (anchorX != src.anchorX) return false;
+ if (anchorY != src.anchorY) return false;
+ if (overrideMesh != src.overrideMesh) return false;
+ if (dice != src.dice) return false;
+ if (diceUnitX != src.diceUnitX) return false;
+ if (diceUnitY != src.diceUnitY) return false;
+ if (diceFilter != src.diceFilter) return false;
+ if (pad != src.pad) return false;
+ if (extraPadding != src.extraPadding) return false;
+
+ if (doubleSidedSprite != src.doubleSidedSprite) return false;
+
+ if (customSpriteGeometry != src.customSpriteGeometry) return false;
+ if (geometryIslands != src.geometryIslands) return false;
+ if (geometryIslands != null && src.geometryIslands != null)
+ {
+ if (geometryIslands.Length != src.geometryIslands.Length) return false;
+ for (int i = 0; i < geometryIslands.Length; ++i)
+ if (!geometryIslands[i].CompareTo(src.geometryIslands[i])) return false;
+ }
+
+ if (source != src.source) return false;
+ if (fromSpriteSheet != src.fromSpriteSheet) return false;
+ if (hasSpriteSheetId != src.hasSpriteSheetId) return false;
+ if (spriteSheetId != src.spriteSheetId) return false;
+ if (spriteSheetX != src.spriteSheetX) return false;
+ if (spriteSheetY != src.spriteSheetY) return false;
+ if (extractRegion != src.extractRegion) return false;
+ if (regionX != src.regionX) return false;
+ if (regionY != src.regionY) return false;
+ if (regionW != src.regionW) return false;
+ if (regionH != src.regionH) return false;
+ if (regionId != src.regionId) return false;
+
+ if (colliderType != src.colliderType) return false;
+ if (boxColliderMin != src.boxColliderMin) return false;
+ if (boxColliderMax != src.boxColliderMax) return false;
+
+ if (polyColliderIslands != src.polyColliderIslands) return false;
+ if (polyColliderIslands != null && src.polyColliderIslands != null)
+ {
+ if (polyColliderIslands.Length != src.polyColliderIslands.Length) return false;
+ for (int i = 0; i < polyColliderIslands.Length; ++i)
+ if (!polyColliderIslands[i].CompareTo(src.polyColliderIslands[i])) return false;
+ }
+
+ if (polyColliderCap != src.polyColliderCap) return false;
+
+ if (colliderColor != src.colliderColor) return false;
+ if (colliderSmoothSphereCollisions != src.colliderSmoothSphereCollisions) return false;
+ if (colliderConvex != src.colliderConvex) return false;
+
+ if (attachPoints.Count != src.attachPoints.Count) return false;
+ for (int i = 0; i < attachPoints.Count; ++i) {
+ if (!attachPoints[i].CompareTo(src.attachPoints[i])) return false;
+ }
+
+ return true;
+ }
+}
+
+[System.Serializable]
+public class tk2dSpriteCollectionDefault
+{
+ public bool additive = false;
+ public Vector3 scale = new Vector3(1,1,1);
+ public tk2dSpriteCollectionDefinition.Anchor anchor = tk2dSpriteCollectionDefinition.Anchor.MiddleCenter;
+ public tk2dSpriteCollectionDefinition.Pad pad = tk2dSpriteCollectionDefinition.Pad.Default;
+
+ public tk2dSpriteCollectionDefinition.ColliderType colliderType = tk2dSpriteCollectionDefinition.ColliderType.UserDefined;
+}
+
+[System.Serializable]
+public class tk2dSpriteSheetSource
+{
+ public enum Anchor
+ {
+ UpperLeft,
+ UpperCenter,
+ UpperRight,
+ MiddleLeft,
+ MiddleCenter,
+ MiddleRight,
+ LowerLeft,
+ LowerCenter,
+ LowerRight,
+ }
+
+ public enum SplitMethod
+ {
+ UniformDivision,
+ }
+
+ public Texture2D texture;
+ public int tilesX, tilesY;
+ public int numTiles = 0;
+ public Anchor anchor = Anchor.MiddleCenter;
+ public tk2dSpriteCollectionDefinition.Pad pad = tk2dSpriteCollectionDefinition.Pad.Default;
+ public Vector3 scale = new Vector3(1,1,1);
+ public bool additive = false;
+
+ // version 1
+ public bool active = false;
+ public int tileWidth, tileHeight;
+ public int tileMarginX, tileMarginY;
+ public int tileSpacingX, tileSpacingY;
+ public SplitMethod splitMethod = SplitMethod.UniformDivision;
+
+ public int version = 0;
+ public const int CURRENT_VERSION = 1;
+
+ public tk2dSpriteCollectionDefinition.ColliderType colliderType = tk2dSpriteCollectionDefinition.ColliderType.UserDefined;
+
+ public void CopyFrom(tk2dSpriteSheetSource src)
+ {
+ texture = src.texture;
+ tilesX = src.tilesX;
+ tilesY = src.tilesY;
+ numTiles = src.numTiles;
+ anchor = src.anchor;
+ pad = src.pad;
+ scale = src.scale;
+ colliderType = src.colliderType;
+ version = src.version;
+
+ active = src.active;
+ tileWidth = src.tileWidth;
+ tileHeight = src.tileHeight;
+ tileSpacingX = src.tileSpacingX;
+ tileSpacingY = src.tileSpacingY;
+ tileMarginX = src.tileMarginX;
+ tileMarginY = src.tileMarginY;
+ splitMethod = src.splitMethod;
+ }
+
+ public bool CompareTo(tk2dSpriteSheetSource src)
+ {
+ if (texture != src.texture) return false;
+ if (tilesX != src.tilesX) return false;
+ if (tilesY != src.tilesY) return false;
+ if (numTiles != src.numTiles) return false;
+ if (anchor != src.anchor) return false;
+ if (pad != src.pad) return false;
+ if (scale != src.scale) return false;
+ if (colliderType != src.colliderType) return false;
+ if (version != src.version) return false;
+
+ if (active != src.active) return false;
+ if (tileWidth != src.tileWidth) return false;
+ if (tileHeight != src.tileHeight) return false;
+ if (tileSpacingX != src.tileSpacingX) return false;
+ if (tileSpacingY != src.tileSpacingY) return false;
+ if (tileMarginX != src.tileMarginX) return false;
+ if (tileMarginY != src.tileMarginY) return false;
+ if (splitMethod != src.splitMethod) return false;
+
+ return true;
+ }
+
+ public string Name { get { return texture != null?texture.name:"New Sprite Sheet"; } }
+}
+
+[System.Serializable]
+public class tk2dSpriteCollectionFont
+{
+ public bool active = false;
+ public Object bmFont;
+ public Texture2D texture;
+ public bool dupeCaps = false; // duplicate lowercase into uc, or vice-versa, depending on which exists
+ public bool flipTextureY = false;
+ public int charPadX = 0;
+ public tk2dFontData data;
+ public tk2dFont editorData;
+ public int materialId;
+
+ public bool useGradient = false;
+ public Texture2D gradientTexture = null;
+ public int gradientCount = 1;
+
+ public void CopyFrom(tk2dSpriteCollectionFont src)
+ {
+ active = src.active;
+ bmFont = src.bmFont;
+ texture = src.texture;
+ dupeCaps = src.dupeCaps;
+ flipTextureY = src.flipTextureY;
+ charPadX = src.charPadX;
+ data = src.data;
+ editorData = src.editorData;
+ materialId = src.materialId;
+ gradientCount = src.gradientCount;
+ gradientTexture = src.gradientTexture;
+ useGradient = src.useGradient;
+ }
+
+ public string Name
+ {
+ get
+ {
+ if (bmFont == null || texture == null)
+ return "Empty";
+ else
+ {
+ if (data == null)
+ return bmFont.name + " (Inactive)";
+ else
+ return bmFont.name;
+ }
+ }
+ }
+
+ public bool InUse
+ {
+ get { return active && bmFont != null && texture != null && data != null && editorData != null; }
+ }
+}
+
+[System.Serializable]
+public class tk2dSpriteCollectionPlatform
+{
+ public string name = "";
+ public tk2dSpriteCollection spriteCollection = null;
+ public bool Valid { get { return name.Length > 0 && spriteCollection != null; } }
+ public void CopyFrom(tk2dSpriteCollectionPlatform source)
+ {
+ name = source.name;
+ spriteCollection = source.spriteCollection;
+ }
+}
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dSpriteCollection")]
+public class tk2dSpriteCollection : MonoBehaviour
+{
+ public const int CURRENT_VERSION = 4;
+
+ public enum NormalGenerationMode
+ {
+ None,
+ NormalsOnly,
+ NormalsAndTangents,
+ };
+
+ // Deprecated fields
+ [SerializeField] private tk2dSpriteCollectionDefinition[] textures;
+ [SerializeField] private Texture2D[] textureRefs;
+
+ public Texture2D[] DoNotUse__TextureRefs { get { return textureRefs; } set { textureRefs = value; } } // Don't use this for anything. Except maybe in tk2dSpriteCollectionBuilderDeprecated...
+
+ // new method
+ public tk2dSpriteSheetSource[] spriteSheets;
+
+ public tk2dSpriteCollectionFont[] fonts;
+ public tk2dSpriteCollectionDefault defaults;
+
+ // platforms
+ public List platforms = new List();
+ public bool managedSpriteCollection = false; // true when generated and managed by system, eg. platform specific data
+ public bool HasPlatformData { get { return platforms.Count > 1; } }
+ public bool loadable = false;
+
+ public int maxTextureSize = 2048;
+
+ public bool forceTextureSize = false;
+ public int forcedTextureWidth = 2048;
+ public int forcedTextureHeight = 2048;
+
+ public enum TextureCompression
+ {
+ Uncompressed,
+ Reduced16Bit,
+ Compressed,
+ Dithered16Bit_Alpha,
+ Dithered16Bit_NoAlpha,
+ }
+
+ public TextureCompression textureCompression = TextureCompression.Uncompressed;
+
+ public int atlasWidth, atlasHeight;
+ public bool forceSquareAtlas = false;
+ public float atlasWastage;
+ public bool allowMultipleAtlases = false;
+ public bool removeDuplicates = true;
+
+ public tk2dSpriteCollectionDefinition[] textureParams;
+
+ public tk2dSpriteCollectionData spriteCollection;
+ public bool premultipliedAlpha = false;
+
+ public Material[] altMaterials;
+ public Material[] atlasMaterials;
+ public Texture2D[] atlasTextures;
+
+ [SerializeField] private bool useTk2dCamera = false;
+ [SerializeField] private int targetHeight = 640;
+ [SerializeField] private float targetOrthoSize = 10.0f;
+
+ // New method of storing sprite size
+ public tk2dSpriteCollectionSize sizeDef = tk2dSpriteCollectionSize.Default();
+
+ public float globalScale = 1.0f;
+ public float globalTextureRescale = 1.0f;
+
+ // Remember test data for attach points
+ [System.Serializable]
+ public class AttachPointTestSprite {
+ public string attachPointName = "";
+ public tk2dSpriteCollectionData spriteCollection = null;
+ public int spriteId = -1;
+ public bool CompareTo(AttachPointTestSprite src) {
+ return src.attachPointName == attachPointName && src.spriteCollection == spriteCollection && src.spriteId == spriteId;
+ }
+ public void CopyFrom(AttachPointTestSprite src) {
+ attachPointName = src.attachPointName;
+ spriteCollection = src.spriteCollection;
+ spriteId = src.spriteId;
+ }
+ }
+ public List attachPointTestSprites = new List();
+
+ // Texture settings
+ [SerializeField]
+ private bool pixelPerfectPointSampled = false; // obsolete
+ public FilterMode filterMode = FilterMode.Bilinear;
+ public TextureWrapMode wrapMode = TextureWrapMode.Clamp;
+ public bool userDefinedTextureSettings = false;
+ public bool mipmapEnabled = false;
+ public int anisoLevel = 1;
+
+ public float physicsDepth = 0.1f;
+
+ public bool disableTrimming = false;
+
+ public NormalGenerationMode normalGenerationMode = NormalGenerationMode.None;
+
+ public int padAmount = -1; // default
+
+ public bool autoUpdate = true;
+
+ public float editorDisplayScale = 1.0f;
+
+ public int version = 0;
+
+ public string assetName = "";
+
+ // Fix up upgraded data structures
+ public void Upgrade()
+ {
+ if (version == CURRENT_VERSION)
+ return;
+
+ Debug.Log("SpriteCollection '" + this.name + "' - Upgraded from version " + version.ToString());
+
+ if (version == 0)
+ {
+ if (pixelPerfectPointSampled)
+ filterMode = FilterMode.Point;
+ else
+ filterMode = FilterMode.Bilinear;
+
+ // don't bother messing about with user settings
+ // on old atlases
+ userDefinedTextureSettings = true;
+ }
+
+ if (version < 3)
+ {
+ if (textureRefs != null && textureParams != null && textureRefs.Length == textureParams.Length)
+ {
+ for (int i = 0; i < textureRefs.Length; ++i)
+ textureParams[i].texture = textureRefs[i];
+
+ textureRefs = null;
+ }
+ }
+
+ if (version < 4) {
+ sizeDef.CopyFromLegacy( useTk2dCamera, targetOrthoSize, targetHeight );
+ }
+
+ version = CURRENT_VERSION;
+
+#if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(this);
+#endif
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs.meta
new file mode 100644
index 000000000..4b3a39277
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollection.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 84c7a4b4ee15890498f818262bca0312
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs
new file mode 100644
index 000000000..34b527155
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs
@@ -0,0 +1,576 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+[System.Serializable]
+///
+/// Sprite Definition.
+///
+public class tk2dSpriteDefinition
+{
+ ///
+ /// Collider type.
+ ///
+ public enum ColliderType
+ {
+ ///
+ /// Do not create or destroy anything.
+ ///
+ Unset,
+
+ ///
+ /// If a collider exists, it will be destroyed. The sprite will be responsible in making sure there are no other colliders attached.
+ ///
+ None,
+
+ ///
+ /// Create a box collider.
+ ///
+ Box,
+
+ ///
+ /// Create a mesh collider.
+ ///
+ Mesh,
+ }
+
+ ///
+ /// Name
+ ///
+ public string name;
+
+ public Vector3[] boundsData;
+ public Vector3[] untrimmedBoundsData;
+
+ public Vector2 texelSize;
+
+ ///
+ /// Array of positions for sprite geometry.
+ ///
+ public Vector3[] positions;
+
+ ///
+ /// Array of normals for sprite geometry, zero length array if they dont exist
+ ///
+ public Vector3[] normals;
+
+ ///
+ /// Array of tangents for sprite geometry, zero length array if they dont exist
+ ///
+ public Vector4[] tangents;
+
+ ///
+ /// Array of UVs for sprite geometry, will match the position count.
+ ///
+ public Vector2[] uvs;
+ ///
+ /// Array of indices for sprite geometry.
+ ///
+ public int[] indices = new int[] { 0, 3, 1, 2, 3, 0 };
+ ///
+ /// The material used by this sprite. This is generally the same on all sprites in a colletion, but this is not
+ /// true when multi-atlas spanning is enabled.
+ ///
+ public Material material;
+
+ [System.NonSerialized]
+ public Material materialInst;
+
+ ///
+ /// The material id used by this sprite. This is an index into the materials array and corresponds to the
+ /// material flag above.
+ ///
+ public int materialId;
+
+
+ ///
+ /// Source texture GUID - this is used by the inspector to find the source image without adding a unity dependency.
+ ///
+ public string sourceTextureGUID;
+ ///
+ /// Speficies if this texture is extracted from a larger texture source, for instance an atlas. This is used in the inspector.
+ ///
+ public bool extractRegion;
+ public int regionX, regionY, regionW, regionH;
+
+ public enum FlipMode {
+ None,
+ Tk2d,
+ TPackerCW,
+ }
+
+ ///
+ /// Specifies if this texture is flipped to its side (rotated) in the atlas
+ ///
+ public FlipMode flipped;
+
+ ///
+ /// Specifies if this texture has complex geometry
+ ///
+ public bool complexGeometry = false;
+
+ ///
+ /// Collider type
+ ///
+ public ColliderType colliderType = ColliderType.Unset;
+
+ ///
+ /// v0 and v1 are center and size respectively for box colliders when colliderType is Box.
+ /// It is an array of vertices, and the geometry defined by indices when colliderType is Mesh.
+ ///
+ public Vector3[] colliderVertices;
+ public int[] colliderIndicesFwd;
+ public int[] colliderIndicesBack;
+ public bool colliderConvex;
+ public bool colliderSmoothSphereCollisions;
+
+
+ [System.Serializable]
+ public class AttachPoint
+ {
+ public string name = "";
+ public Vector3 position = Vector3.zero;
+ public float angle = 0;
+
+ public void CopyFrom( AttachPoint src ) {
+ name = src.name;
+ position = src.position;
+ angle = src.angle;
+ }
+
+ public bool CompareTo( AttachPoint src ) {
+ return (name == src.name && src.position == position && src.angle == angle);
+ }
+ }
+
+ public AttachPoint[] attachPoints = new AttachPoint[0];
+
+ public bool Valid { get { return name.Length != 0; } }
+
+ ///
+ /// Gets the trimmed bounds of the sprite.
+ ///
+ ///
+ /// Local space bounds
+ ///
+ public Bounds GetBounds()
+ {
+ return new Bounds(new Vector3(boundsData[0].x, boundsData[0].y, boundsData[0].z),
+ new Vector3(boundsData[1].x, boundsData[1].y, boundsData[1].z));
+ }
+
+ ///
+ /// Gets untrimmed bounds of the sprite.
+ ///
+ ///
+ /// Local space untrimmed bounds
+ ///
+ public Bounds GetUntrimmedBounds()
+ {
+ return new Bounds(new Vector3(untrimmedBoundsData[0].x, untrimmedBoundsData[0].y, untrimmedBoundsData[0].z),
+ new Vector3(untrimmedBoundsData[1].x, untrimmedBoundsData[1].y, untrimmedBoundsData[1].z));
+ }
+}
+
+[AddComponentMenu("2D Toolkit/Backend/tk2dSpriteCollectionData")]
+///
+/// Sprite Collection Data.
+///
+public class tk2dSpriteCollectionData : MonoBehaviour
+{
+ public const int CURRENT_VERSION = 3;
+
+ public int version;
+ public bool materialIdsValid = false;
+ public bool needMaterialInstance = false;
+ public bool Transient { get; set; } // this should not get serialized
+
+ ///
+ /// An array of sprite definitions.
+ ///
+ public tk2dSpriteDefinition[] spriteDefinitions;
+
+ ///
+ /// Dictionary to look up sprite names. This will be initialized on first call to GetSpriteIdByName.
+ ///
+ Dictionary spriteNameLookupDict = null;
+
+ ///
+ /// Whether premultiplied alpha is enabled on this sprite collection. This affects how tint colors are computed.
+ ///
+ public bool premultipliedAlpha;
+
+ ///
+ /// Only exists for backwards compatibility. Do not use or rely on this.
+ ///
+ public Material material;
+
+ ///
+ /// An array of all materials used by this sprite collection.
+ ///
+ public Material[] materials;
+
+ [System.NonSerialized]
+ public Material[] materialInsts;
+
+
+ ///
+ /// An array of all textures used by this sprite collection.
+ ///
+ public Texture[] textures;
+
+ ///
+ /// Specifies if sprites span multiple atlases.
+ ///
+ public bool allowMultipleAtlases;
+
+ ///
+ /// The sprite collection GUI.
+ ///
+ public string spriteCollectionGUID;
+
+ ///
+ /// The name of the sprite collection.
+ ///
+ public string spriteCollectionName;
+
+ ///
+ /// Asset Name, used to load the asset
+ ///
+ public string assetName = "";
+
+ ///
+ /// Is this asset loadable using tk2dSystem
+ ///
+ public bool loadable = false;
+
+ ///
+ /// The size of the inv ortho size used to generate the sprite collection.
+ ///
+ public float invOrthoSize = 1.0f;
+
+ ///
+ /// Target height used to generate the sprite collection.
+ ///
+ public float halfTargetHeight = 1.0f;
+
+ public int buildKey = 0;
+
+ ///
+ /// GUID of this object, used with
+ ///
+ public string dataGuid = "";
+
+ ///
+ /// Returns the number of sprite definitions in this sprite collection.
+ ///
+ public int Count { get { return inst.spriteDefinitions.Length; } }
+
+ ///
+ /// When true, sprite collection will not be directly selectable
+ ///
+ public bool managedSpriteCollection = false;
+
+ ///
+ /// When true, spriteCollectionPlatforms & PlatformGUIDs are expected to have
+ /// sensible data.
+ ///
+ public bool hasPlatformData = false;
+
+ ///
+ /// Returns an array of platform names.
+ ///
+ public string[] spriteCollectionPlatforms = null;
+
+ ///
+ /// Returns an array of GUIDs, each referring to an actual tk2dSpriteCollectionData object
+ /// This object contains the actual sprite collection for the platform.
+ ///
+ public string[] spriteCollectionPlatformGUIDs = null;
+
+ ///
+ /// Resolves a sprite name and returns a unique id for the sprite.
+ ///
+ ///
+ /// Unique Sprite Id. 0 if sprite isn't found.
+ ///
+ /// Case sensitive sprite name, as defined in the sprite collection. This is usually the source filename excluding the extension
+ public int GetSpriteIdByName(string name)
+ {
+ return GetSpriteIdByName(name, 0);
+ }
+
+ ///
+ /// Resolves a sprite name and returns a unique id for the sprite.
+ ///
+ ///
+ /// Unique Sprite Id. defaultValue if sprite isn't found.
+ ///
+ /// Case sensitive sprite name, as defined in the sprite collection. This is usually the source filename excluding the extension
+ /// The value which is returned when the named sprite can't be found.
+ public int GetSpriteIdByName(string name, int defaultValue)
+ {
+ inst.InitDictionary();
+ int returnValue = defaultValue;
+ if (!inst.spriteNameLookupDict.TryGetValue(name, out returnValue)) return defaultValue;
+ return returnValue; // default to first sprite
+ }
+
+ ///
+ /// Resolves a sprite name and returns a reference to a sprite definition
+ ///
+ ///
+ /// Unique Sprite Definition. null if sprite isn't found.
+ ///
+ /// Case sensitive sprite name, as defined in the sprite collection. This is usually the source filename excluding the extension
+ public tk2dSpriteDefinition GetSpriteDefinition(string name) {
+ int id = GetSpriteIdByName(name, -1);
+ if (id == -1) {
+ return null;
+ }
+ else {
+ return spriteDefinitions[id];
+ }
+ }
+
+ ///
+ /// Initializes the lookup dictionary
+ ///
+ public void InitDictionary()
+ {
+ if (spriteNameLookupDict == null)
+ {
+ spriteNameLookupDict = new Dictionary(spriteDefinitions.Length);
+ for (int i = 0; i < spriteDefinitions.Length; ++i)
+ {
+ spriteNameLookupDict[spriteDefinitions[i].name] = i;
+ }
+ }
+ }
+
+ ///
+ /// Returns the first valid sprite definition
+ ///
+ public tk2dSpriteDefinition FirstValidDefinition
+ {
+ get
+ {
+ foreach (var v in inst.spriteDefinitions)
+ {
+ if (v.Valid)
+ return v;
+ }
+ return null;
+ }
+ }
+
+ ///
+ /// Returns true if the sprite id is valid for this sprite collection
+ ///
+ public bool IsValidSpriteId(int id) {
+ if (id < 0 || id >= inst.spriteDefinitions.Length) {
+ return false;
+ }
+ return inst.spriteDefinitions[id].Valid;
+ }
+
+ ///
+ /// Returns the index of the first valid sprite definition
+ ///
+ public int FirstValidDefinitionIndex
+ {
+ get
+ {
+ tk2dSpriteCollectionData data = inst;
+
+ for (int i = 0; i < data.spriteDefinitions.Length; ++i)
+ if (data.spriteDefinitions[i].Valid)
+ return i;
+ return -1;
+ }
+ }
+
+ ///
+ /// Internal function to make sure all material Ids are valid. Used in the tilemap editor
+ ///
+ public void InitMaterialIds()
+ {
+ if (inst.materialIdsValid)
+ return;
+
+ int firstValidIndex = -1;
+ Dictionary materialLookupDict = new Dictionary();
+ for (int i = 0; i < inst.materials.Length; ++i)
+ {
+ if (firstValidIndex == -1 && inst.materials[i] != null)
+ firstValidIndex = i;
+ materialLookupDict[materials[i]] = i;
+ }
+ if (firstValidIndex == -1)
+ {
+ Debug.LogError("Init material ids failed.");
+ }
+ else
+ {
+ foreach (var v in inst.spriteDefinitions)
+ {
+ if (!materialLookupDict.TryGetValue(v.material, out v.materialId))
+ v.materialId = firstValidIndex;
+ }
+ inst.materialIdsValid = true;
+ }
+ }
+
+ tk2dSpriteCollectionData platformSpecificData = null;
+
+ // Returns the active instance
+ public tk2dSpriteCollectionData inst
+ {
+ get
+ {
+ if (platformSpecificData == null)
+ {
+ if (hasPlatformData)
+ {
+ string systemPlatform = tk2dSystem.CurrentPlatform;
+ string guid = "";
+
+ for (int i = 0; i < spriteCollectionPlatforms.Length; ++i)
+ {
+ if (spriteCollectionPlatforms[i] == systemPlatform)
+ {
+ guid = spriteCollectionPlatformGUIDs[i];
+ break;
+ }
+ }
+ if (guid.Length == 0)
+ guid = spriteCollectionPlatformGUIDs[0]; // failed to find platform, pick the first one
+
+ platformSpecificData = tk2dSystem.LoadResourceByGUID(guid);
+ }
+ else
+ {
+ platformSpecificData = this;
+ }
+ }
+ platformSpecificData.Init(); // awake is never called, so we initialize explicitly
+ return platformSpecificData;
+ }
+ }
+
+ void Init()
+ {
+ // check if already initialized
+ if (materialInsts != null)
+ return;
+
+ if (spriteDefinitions == null) spriteDefinitions = new tk2dSpriteDefinition[0];
+ if (materials == null) materials = new Material[0];
+
+ materialInsts = new Material[materials.Length];
+ if (needMaterialInstance)
+ {
+ if (tk2dSystem.OverrideBuildMaterial) {
+ // This is a hack to work around a bug in Unity 4.x
+ // Scene serialization will serialize the actively bound texture
+ // but not the material during the build, only when [ExecuteInEditMode]
+ // is on, eg. on sprites.
+ for (int i = 0; i < materials.Length; ++i)
+ {
+ materialInsts[i] = new Material(Shader.Find("tk2d/BlendVertexColor"));
+ #if UNITY_EDITOR
+ materialInsts[i].hideFlags = HideFlags.DontSave;
+ #endif
+ }
+ }
+ else {
+ for (int i = 0; i < materials.Length; ++i)
+ {
+ materialInsts[i] = Instantiate(materials[i]) as Material;
+ #if UNITY_EDITOR
+ materialInsts[i].hideFlags = HideFlags.DontSave;
+ #endif
+ }
+ }
+ for (int i = 0; i < spriteDefinitions.Length; ++i)
+ {
+ tk2dSpriteDefinition def = spriteDefinitions[i];
+ def.materialInst = materialInsts[def.materialId];
+ }
+ }
+ else
+ {
+ for (int i = 0; i < spriteDefinitions.Length; ++i)
+ {
+ tk2dSpriteDefinition def = spriteDefinitions[i];
+ def.materialInst = def.material;
+ }
+ }
+ }
+
+ ///
+ /// Create a sprite collection at runtime from a texture and user specified regions.
+ /// Please ensure that names, regions & anchor arrays have same dimension.
+ /// Use if you need to create only one sprite from a texture.
+ ///
+ public static tk2dSpriteCollectionData CreateFromTexture(Texture texture, tk2dSpriteCollectionSize size, string[] names, Rect[] regions, Vector2[] anchors)
+ {
+ return tk2dRuntime.SpriteCollectionGenerator.CreateFromTexture(texture, size, names, regions, anchors);
+ }
+
+ ///
+ /// Create a sprite collection at runtime from a texturepacker exported file.
+ /// Ensure this is exported using the "2D Toolkit" export mode in TexturePacker.
+ /// You can find this exporter in Assets/TK2DROOT/tk2d/Goodies/TexturePacker/Exporter
+ /// You can use also use this to load sprite collections at runtime.
+ ///
+ public static tk2dSpriteCollectionData CreateFromTexturePacker(tk2dSpriteCollectionSize size, string texturePackerData, Texture texture)
+ {
+ return tk2dRuntime.SpriteCollectionGenerator.CreateFromTexturePacker(size, texturePackerData, texture);
+ }
+
+ public void ResetPlatformData()
+ {
+ if (hasPlatformData && platformSpecificData)
+ {
+ platformSpecificData = null;
+ }
+
+ materialInsts = null;
+ }
+
+ ///
+ /// Unloads the atlas texture data in this sprite collection.
+ /// This will be reloaded when the data is accessed again.
+ /// Make sure all sprites using this collection have already been destroyed.
+ ///
+ public void UnloadTextures() {
+ // Debug.Log(Resources.FindObjectsOfTypeAll(typeof(Texture2D)).Length);
+
+ tk2dSpriteCollectionData theInst = inst;
+ foreach (Texture2D texture in theInst.textures) {
+ Resources.UnloadAsset(texture);
+ }
+
+ // Debug.Log(Resources.FindObjectsOfTypeAll(typeof(Texture2D)).Length);
+ }
+
+ void OnDestroy()
+ {
+ if (Transient)
+ {
+ foreach (Material material in materials)
+ {
+ DestroyImmediate(material);
+ }
+ }
+ else if (needMaterialInstance) // exclusive
+ {
+ foreach (Material material in materialInsts)
+ {
+ DestroyImmediate(material);
+ }
+ }
+
+ ResetPlatformData();
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs.meta
new file mode 100644
index 000000000..cf154b4c5
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionData.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d546f34a90531a14eaba82a43b05b86b
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31100
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs
new file mode 100644
index 000000000..2b8626533
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs
@@ -0,0 +1,8 @@
+namespace tk2dRuntime
+{
+ public interface ISpriteCollectionForceBuild
+ {
+ bool UsesSpriteCollection(tk2dSpriteCollectionData spriteCollection);
+ void ForceBuild();
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs.meta
new file mode 100644
index 000000000..ee9ac9887
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionInterfaces.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 86733f295f43a4a4fa657269edaab6f6
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs
new file mode 100644
index 000000000..1d4d2f297
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs
@@ -0,0 +1,140 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Sprite collection size.
+/// Supports different methods of specifying size.
+///
+[System.Serializable]
+public class tk2dSpriteCollectionSize
+{
+ ///
+ /// When you are using an ortho camera. Use this to create sprites which will be pixel perfect
+ /// automatically at the resolution and orthoSize given.
+ ///
+ public static tk2dSpriteCollectionSize Explicit(float orthoSize, float targetHeight) {
+ return ForResolution(orthoSize, targetHeight, targetHeight);
+ }
+
+ ///
+ /// When you are using an ortho camera. Use this to create sprites which will be pixel perfect
+ /// automatically at the resolution and orthoSize given.
+ ///
+ public static tk2dSpriteCollectionSize PixelsPerMeter(float pixelsPerMeter) {
+ tk2dSpriteCollectionSize s = new tk2dSpriteCollectionSize();
+ s.type = Type.PixelsPerMeter;
+ s.pixelsPerMeter = pixelsPerMeter;
+ return s;
+ }
+
+ ///
+ /// When you are using an ortho camera. Use this to create sprites which will be pixel perfect
+ /// automatically at the resolution and orthoSize given.
+ ///
+ public static tk2dSpriteCollectionSize ForResolution(float orthoSize, float width, float height) {
+ tk2dSpriteCollectionSize s = new tk2dSpriteCollectionSize();
+ s.type = Type.Explicit;
+ s.orthoSize = orthoSize;
+ s.width = width;
+ s.height = height;
+ return s;
+ }
+
+ ///
+ /// Use when you need the sprite to be pixel perfect on a tk2dCamera.
+ ///
+ public static tk2dSpriteCollectionSize ForTk2dCamera() {
+ tk2dSpriteCollectionSize s = new tk2dSpriteCollectionSize();
+ s.type = Type.PixelsPerMeter;
+ s.pixelsPerMeter = 1;
+ return s;
+ }
+
+ ///
+ /// Use when you need the sprite to be pixel perfect on a specific tk2dCamera.
+ ///
+ public static tk2dSpriteCollectionSize ForTk2dCamera( tk2dCamera camera ) {
+ tk2dSpriteCollectionSize s = new tk2dSpriteCollectionSize();
+ tk2dCameraSettings cameraSettings = camera.SettingsRoot.CameraSettings;
+ if (cameraSettings.projection == tk2dCameraSettings.ProjectionType.Orthographic) {
+ switch (cameraSettings.orthographicType) {
+ case tk2dCameraSettings.OrthographicType.PixelsPerMeter:
+ s.type = Type.PixelsPerMeter;
+ s.pixelsPerMeter = cameraSettings.orthographicPixelsPerMeter;
+ break;
+ case tk2dCameraSettings.OrthographicType.OrthographicSize:
+ s.type = Type.Explicit;
+ s.height = camera.nativeResolutionHeight;
+ s.orthoSize = cameraSettings.orthographicSize;
+ break;
+ }
+ }
+ else if (cameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ s.type = Type.PixelsPerMeter;
+ s.pixelsPerMeter = 20; // some random value
+ }
+ return s;
+ }
+
+ ///
+ /// A default setting
+ ///
+ public static tk2dSpriteCollectionSize Default() {
+ return PixelsPerMeter(20);
+ }
+
+ // Copy from legacy settings
+ public void CopyFromLegacy( bool useTk2dCamera, float orthoSize, float targetHeight ) {
+ if (useTk2dCamera) {
+ this.type = Type.PixelsPerMeter;
+ this.pixelsPerMeter = 1;
+ }
+ else {
+ this.type = Type.Explicit;
+ this.height = targetHeight;
+ this.orthoSize = orthoSize;
+ }
+ }
+
+ public void CopyFrom(tk2dSpriteCollectionSize source) {
+ this.type = source.type;
+ this.width = source.width;
+ this.height = source.height;
+ this.orthoSize = source.orthoSize;
+ this.pixelsPerMeter = source.pixelsPerMeter;
+ }
+
+ public enum Type {
+ Explicit,
+ PixelsPerMeter
+ };
+
+ // What to do with the values below?
+ public Type type = Type.PixelsPerMeter;
+
+ // resolution, used to derive above values
+ public float orthoSize = 10;
+ public float pixelsPerMeter = 20;
+ public float width = 960;
+ public float height = 640;
+
+ public float OrthoSize {
+ get {
+ switch (type) {
+ case Type.Explicit: return orthoSize;
+ case Type.PixelsPerMeter: return 0.5f;
+ }
+ return orthoSize;
+ }
+ }
+
+ public float TargetHeight {
+ get {
+ switch (type) {
+ case Type.Explicit: return height;
+ case Type.PixelsPerMeter: return pixelsPerMeter;
+ }
+ return height;
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs.meta
new file mode 100644
index 000000000..e56d29f55
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteCollectionSize.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ad3731238ae2b4714834bc87437ec6a8
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs
new file mode 100644
index 000000000..9180c0f1e
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs
@@ -0,0 +1,95 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSpriteFromTexture")]
+[ExecuteInEditMode]
+public class tk2dSpriteFromTexture : MonoBehaviour {
+
+ public Texture texture = null;
+ public tk2dSpriteCollectionSize spriteCollectionSize = new tk2dSpriteCollectionSize();
+ public tk2dBaseSprite.Anchor anchor = tk2dBaseSprite.Anchor.MiddleCenter;
+ tk2dSpriteCollectionData spriteCollection;
+
+ tk2dBaseSprite _sprite;
+ tk2dBaseSprite Sprite {
+ get {
+ if (_sprite == null) {
+ _sprite = GetComponent();
+ if (_sprite == null) {
+ Debug.Log("tk2dSpriteFromTexture - Missing sprite object. Creating.");
+ _sprite = gameObject.AddComponent();
+ }
+ }
+ return _sprite;
+ }
+ }
+
+ void Awake() {
+ Create( spriteCollectionSize, texture, anchor );
+ }
+
+ public bool HasSpriteCollection {
+ get { return spriteCollection != null; }
+ }
+
+ void OnDestroy() {
+ DestroyInternal();
+ if (renderer != null) {
+ renderer.material = null;
+ }
+ }
+
+ public void Create( tk2dSpriteCollectionSize spriteCollectionSize, Texture texture, tk2dBaseSprite.Anchor anchor ) {
+ DestroyInternal();
+ if (texture != null) {
+ // Copy values
+ this.spriteCollectionSize.CopyFrom( spriteCollectionSize );
+ this.texture = texture;
+ this.anchor = anchor;
+
+ GameObject go = new GameObject("tk2dSpriteFromTexture - " + texture.name);
+ go.transform.localPosition = Vector3.zero;
+ go.transform.localRotation = Quaternion.identity;
+ go.transform.localScale = Vector3.one;
+ go.hideFlags = HideFlags.DontSave;
+
+ Vector2 anchorPos = tk2dSpriteGeomGen.GetAnchorOffset( anchor, texture.width, texture.height );
+ spriteCollection = tk2dRuntime.SpriteCollectionGenerator.CreateFromTexture(
+ go,
+ texture,
+ spriteCollectionSize,
+ new Vector2(texture.width, texture.height),
+ new string[] { "unnamed" } ,
+ new Rect[] { new Rect(0, 0, texture.width, texture.height) },
+ null,
+ new Vector2[] { anchorPos },
+ new bool[] { false } );
+
+ string objName = "SpriteFromTexture " + texture.name;
+ spriteCollection.spriteCollectionName = objName;
+ spriteCollection.spriteDefinitions[0].material.name = objName;
+ spriteCollection.spriteDefinitions[0].material.hideFlags = HideFlags.DontSave | HideFlags.HideInInspector;
+
+ Sprite.SetSprite( spriteCollection, 0 );
+ }
+ }
+
+ public void Clear() {
+ DestroyInternal();
+ }
+
+ public void ForceBuild() {
+ DestroyInternal();
+ Create( spriteCollectionSize, texture, anchor );
+ }
+
+ void DestroyInternal() {
+ if (spriteCollection != null) {
+ if (spriteCollection.spriteDefinitions[0].material != null) {
+ DestroyImmediate( spriteCollection.spriteDefinitions[0].material );
+ }
+ DestroyImmediate( spriteCollection.gameObject );
+ spriteCollection = null;
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs.meta
new file mode 100644
index 000000000..0d2237fe9
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteFromTexture.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d668868dc3bd1ef4bb723ce9b2643f6e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs
new file mode 100644
index 000000000..d5ae8596b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs
@@ -0,0 +1,519 @@
+using UnityEngine;
+
+public static class tk2dSpriteGeomGen
+{
+ // Common
+ public static void SetSpriteColors(Color32[] dest, int offset, int numVertices, Color c, bool premulAlpha)
+ {
+ if (premulAlpha) { c.r *= c.a; c.g *= c.a; c.b *= c.a; }
+ Color32 c32 = c;
+
+ for (int i = 0; i < numVertices; ++i)
+ dest[offset + i] = c32;
+ }
+
+ public static Vector2 GetAnchorOffset( tk2dBaseSprite.Anchor anchor, float width, float height ) {
+ Vector2 anchorOffset = Vector2.zero;
+
+ switch (anchor) {
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.UpperLeft:
+ break;
+ case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.UpperCenter:
+ anchorOffset.x = (int)(width / 2.0f); break;
+ case tk2dBaseSprite.Anchor.LowerRight: case tk2dBaseSprite.Anchor.MiddleRight: case tk2dBaseSprite.Anchor.UpperRight:
+ anchorOffset.x = (int)(width); break;
+ }
+ switch (anchor) {
+ case tk2dBaseSprite.Anchor.UpperLeft: case tk2dBaseSprite.Anchor.UpperCenter: case tk2dBaseSprite.Anchor.UpperRight:
+ break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.MiddleRight:
+ anchorOffset.y = (int)(height / 2.0f); break;
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.LowerRight:
+ anchorOffset.y = (int)height; break;
+ }
+
+ return anchorOffset;
+ }
+
+ // Sprite
+ public static void GetSpriteGeomDesc(out int numVertices, out int numIndices, tk2dSpriteDefinition spriteDef)
+ {
+ numVertices = spriteDef.positions.Length;
+ numIndices = spriteDef.indices.Length;
+ }
+
+ public static void SetSpriteGeom(Vector3[] pos, Vector2[] uv, Vector3[] norm, Vector4[] tang, int offset, tk2dSpriteDefinition spriteDef, Vector3 scale)
+ {
+ for (int i = 0; i < spriteDef.positions.Length; ++i)
+ {
+ pos[offset + i] = Vector3.Scale(spriteDef.positions[i], scale);
+ }
+ for (int i = 0; i < spriteDef.uvs.Length; ++i)
+ {
+ uv[offset + i] = spriteDef.uvs[i];
+ }
+ if (norm != null && spriteDef.normals != null)
+ {
+ for (int i = 0; i < spriteDef.normals.Length; ++i)
+ {
+ norm[offset + i] = spriteDef.normals[i];
+ }
+ }
+ if (tang != null && spriteDef.tangents != null)
+ {
+ for (int i = 0; i < spriteDef.tangents.Length; ++i)
+ {
+ tang[offset + i] = spriteDef.tangents[i];
+ }
+ }
+ }
+
+ public static void SetSpriteIndices(int[] indices, int offset, int vStart, tk2dSpriteDefinition spriteDef)
+ {
+ for (int i = 0; i < spriteDef.indices.Length; ++i)
+ {
+ indices[offset + i] = vStart + spriteDef.indices[i];
+ }
+ }
+
+ // Clipped sprite
+
+ public static void GetClippedSpriteGeomDesc(out int numVertices, out int numIndices, tk2dSpriteDefinition spriteDef)
+ {
+ if (spriteDef.positions.Length == 4)
+ {
+ numVertices = 4;
+ numIndices = 6;
+ }
+ else {
+ numVertices = 0;
+ numIndices = 0;
+ }
+ }
+
+ public static void SetClippedSpriteGeom( Vector3[] pos, Vector2[] uv, int offset, out Vector3 boundsCenter, out Vector3 boundsExtents, tk2dSpriteDefinition spriteDef, Vector3 scale, Vector2 clipBottomLeft, Vector2 clipTopRight, float colliderOffsetZ, float colliderExtentZ )
+ {
+ boundsCenter = Vector3.zero;
+ boundsExtents = Vector3.zero;
+ if (spriteDef.positions.Length == 4)
+ {
+ // Transform clipped region from untrimmed -> trimmed region
+ Vector3 untrimmedMin = spriteDef.untrimmedBoundsData[0] - spriteDef.untrimmedBoundsData[1] * 0.5f;
+ Vector3 untrimmedMax = spriteDef.untrimmedBoundsData[0] + spriteDef.untrimmedBoundsData[1] * 0.5f;
+
+ // clipBottomLeft is the fraction to start from the bottom left (0,0 - full sprite)
+ // clipTopRight is the fraction to start from the top right (1,1 - full sprite)
+ float left = Mathf.Lerp( untrimmedMin.x, untrimmedMax.x, clipBottomLeft.x );
+ float right = Mathf.Lerp( untrimmedMin.x, untrimmedMax.x, clipTopRight.x );
+ float bottom = Mathf.Lerp( untrimmedMin.y, untrimmedMax.y, clipBottomLeft.y );
+ float top = Mathf.Lerp( untrimmedMin.y, untrimmedMax.y, clipTopRight.y );
+
+ Vector3 trimmedBounds = spriteDef.boundsData[1];
+ Vector3 trimmedOrigin = spriteDef.boundsData[0] - trimmedBounds * 0.5f;
+ float clipLeft = (left - trimmedOrigin.x) / trimmedBounds.x;
+ float clipRight = (right - trimmedOrigin.x) / trimmedBounds.x;
+ float clipBottom = (bottom - trimmedOrigin.y) / trimmedBounds.y;
+ float clipTop = (top - trimmedOrigin.y) / trimmedBounds.y;
+
+ // The fractional clip region relative to the trimmed region
+ Vector2 fracBottomLeft = new Vector2( Mathf.Clamp01( clipLeft ), Mathf.Clamp01( clipBottom ) );
+ Vector2 fracTopRight = new Vector2( Mathf.Clamp01( clipRight ), Mathf.Clamp01( clipTop ) );
+
+ // Default quad has index 0 = bottomLeft, index 3 = topRight
+ Vector3 c0 = spriteDef.positions[0];
+ Vector3 c1 = spriteDef.positions[3];
+
+ // find the fraction of positions, but fold in the scale multiply as well
+ Vector3 bottomLeft = new Vector3(Mathf.Lerp(c0.x, c1.x, fracBottomLeft.x) * scale.x,
+ Mathf.Lerp(c0.y, c1.y, fracBottomLeft.y) * scale.y,
+ c0.z * scale.z);
+ Vector3 topRight = new Vector3(Mathf.Lerp(c0.x, c1.x, fracTopRight.x) * scale.x,
+ Mathf.Lerp(c0.y, c1.y, fracTopRight.y) * scale.y,
+ c0.z * scale.z);
+
+ boundsCenter.Set( bottomLeft.x + (topRight.x - bottomLeft.x) * 0.5f, bottomLeft.y + (topRight.y - bottomLeft.y) * 0.5f, colliderOffsetZ );
+ boundsExtents.Set( (topRight.x - bottomLeft.x) * 0.5f, (topRight.y - bottomLeft.y) * 0.5f, colliderExtentZ );
+
+ // The z component only needs to be consistent
+ pos[offset + 0] = new Vector3(bottomLeft.x, bottomLeft.y, bottomLeft.z);
+ pos[offset + 1] = new Vector3(topRight.x, bottomLeft.y, bottomLeft.z);
+ pos[offset + 2] = new Vector3(bottomLeft.x, topRight.y, bottomLeft.z);
+ pos[offset + 3] = new Vector3(topRight.x, topRight.y, bottomLeft.z);
+
+ // find the fraction of UV
+ // This can be done without a branch, but will end up with loads of unnecessary interpolations
+ if (spriteDef.flipped == tk2dSpriteDefinition.FlipMode.Tk2d)
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.x));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.x));
+
+ uv[offset + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + 1] = new Vector2(v0.x, v1.y);
+ uv[offset + 2] = new Vector2(v1.x, v0.y);
+ uv[offset + 3] = new Vector2(v1.x, v1.y);
+ }
+ else if (spriteDef.flipped == tk2dSpriteDefinition.FlipMode.TPackerCW)
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.x));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.x));
+
+ uv[offset + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + 2] = new Vector2(v1.x, v0.y);
+ uv[offset + 1] = new Vector2(v0.x, v1.y);
+ uv[offset + 3] = new Vector2(v1.x, v1.y);
+ }
+ else
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.x),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.y));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.x),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.y));
+
+ uv[offset + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + 1] = new Vector2(v1.x, v0.y);
+ uv[offset + 2] = new Vector2(v0.x, v1.y);
+ uv[offset + 3] = new Vector2(v1.x, v1.y);
+ }
+ }
+ }
+
+ public static void SetClippedSpriteIndices( int[] indices, int offset, int vStart, tk2dSpriteDefinition spriteDef)
+ {
+ if (spriteDef.positions.Length == 4)
+ {
+ indices[offset + 0] = vStart + 0;
+ indices[offset + 1] = vStart + 3;
+ indices[offset + 2] = vStart + 1;
+ indices[offset + 3] = vStart + 2;
+ indices[offset + 4] = vStart + 3;
+ indices[offset + 5] = vStart + 0;
+ }
+ }
+
+ // Sliced sprite
+
+ public static void GetSlicedSpriteGeomDesc(out int numVertices, out int numIndices, tk2dSpriteDefinition spriteDef, bool borderOnly)
+ {
+ if (spriteDef.positions.Length == 4)
+ {
+ numVertices = 16;
+ numIndices = borderOnly ? (8 * 6) : (9 * 6);
+ } else {
+ numVertices = 0;
+ numIndices = 0;
+ }
+ }
+
+ public static void SetSlicedSpriteGeom(Vector3[] pos, Vector2[] uv, int offset, out Vector3 boundsCenter, out Vector3 boundsExtents, tk2dSpriteDefinition spriteDef, Vector3 scale, Vector2 dimensions, Vector2 borderBottomLeft, Vector2 borderTopRight, tk2dBaseSprite.Anchor anchor, float colliderOffsetZ, float colliderExtentZ)
+ {
+ boundsCenter = Vector3.zero;
+ boundsExtents = Vector3.zero;
+ if (spriteDef.positions.Length == 4)
+ {
+ float sx = spriteDef.texelSize.x;
+ float sy = spriteDef.texelSize.y;
+
+ Vector3[] srcVert = spriteDef.positions;
+ float dx = (srcVert[1].x - srcVert[0].x);
+ float dy = (srcVert[2].y - srcVert[0].y);
+
+ float borderTopPixels = borderTopRight.y * dy;
+ float borderBottomPixels = borderBottomLeft.y * dy;
+ float borderRightPixels = borderTopRight.x * dx;
+ float borderLeftPixels = borderBottomLeft.x * dx;
+
+ float dimXPixels = dimensions.x * sx;
+ float dimYPixels = dimensions.y * sy;
+
+ float anchorOffsetX = 0.0f;
+ float anchorOffsetY = 0.0f;
+ switch (anchor)
+ {
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.UpperLeft:
+ break;
+ case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.UpperCenter:
+ anchorOffsetX = -(int)(dimensions.x / 2.0f); break;
+ case tk2dBaseSprite.Anchor.LowerRight: case tk2dBaseSprite.Anchor.MiddleRight: case tk2dBaseSprite.Anchor.UpperRight:
+ anchorOffsetX = -(int)(dimensions.x); break;
+ }
+ switch (anchor)
+ {
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.LowerRight:
+ break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.MiddleRight:
+ anchorOffsetY = -(int)(dimensions.y / 2.0f); break;
+ case tk2dBaseSprite.Anchor.UpperLeft: case tk2dBaseSprite.Anchor.UpperCenter: case tk2dBaseSprite.Anchor.UpperRight:
+ anchorOffsetY = -(int)dimensions.y; break;
+ }
+
+ // scale back to sprite coordinates
+ // do it after the cast above, as we're trying to align to pixel
+ anchorOffsetX *= sx;
+ anchorOffsetY *= sy;
+
+ boundsCenter.Set(scale.x * (dimXPixels * 0.5f + anchorOffsetX), scale.y * (dimYPixels * 0.5f + anchorOffsetY), colliderOffsetZ);
+ boundsExtents.Set(scale.x * (dimXPixels * 0.5f), scale.y * (dimYPixels * 0.5f), colliderExtentZ);
+
+ Vector2[] srcUv = spriteDef.uvs;
+ Vector2 duvx = srcUv[1] - srcUv[0];
+ Vector2 duvy = srcUv[2] - srcUv[0];
+
+ Vector3 origin = new Vector3(anchorOffsetX, anchorOffsetY, 0);
+
+ Vector3[] originPoints = new Vector3[4] {
+ origin,
+ origin + new Vector3(0, borderBottomPixels, 0),
+ origin + new Vector3(0, dimYPixels - borderTopPixels, 0),
+ origin + new Vector3(0, dimYPixels, 0),
+ };
+ Vector2[] originUvs = new Vector2[4] {
+ srcUv[0],
+ srcUv[0] + duvy * borderBottomLeft.y,
+ srcUv[0] + duvy * (1 - borderTopRight.y),
+ srcUv[0] + duvy,
+ };
+
+ for (int i = 0; i < 4; ++i)
+ {
+ pos[offset + i * 4 + 0] = originPoints[i];
+ pos[offset + i * 4 + 1] = originPoints[i] + new Vector3(borderLeftPixels, 0, 0);
+ pos[offset + i * 4 + 2] = originPoints[i] + new Vector3(dimXPixels - borderRightPixels, 0, 0);
+ pos[offset + i * 4 + 3] = originPoints[i] + new Vector3(dimXPixels, 0, 0);
+
+ for (int j = 0; j < 4; ++j) {
+ pos[offset + i * 4 + j] = Vector3.Scale(pos[offset + i * 4 + j], scale);
+ }
+
+ uv[offset + i * 4 + 0] = originUvs[i];
+ uv[offset + i * 4 + 1] = originUvs[i] + duvx * borderBottomLeft.x;
+ uv[offset + i * 4 + 2] = originUvs[i] + duvx * (1 - borderTopRight.x);
+ uv[offset + i * 4 + 3] = originUvs[i] + duvx;
+ }
+ }
+ }
+
+ public static void SetSlicedSpriteIndices(int[] indices, int offset, int vStart, tk2dSpriteDefinition spriteDef, bool borderOnly)
+ {
+ if (spriteDef.positions.Length == 4)
+ {
+ int[] inds = new int[9 * 6] {
+ 0, 4, 1, 1, 4, 5,
+ 1, 5, 2, 2, 5, 6,
+ 2, 6, 3, 3, 6, 7,
+ 4, 8, 5, 5, 8, 9,
+ 6, 10, 7, 7, 10, 11,
+ 8, 12, 9, 9, 12, 13,
+ 9, 13, 10, 10, 13, 14,
+ 10, 14, 11, 11, 14, 15,
+ 5, 9, 6, 6, 9, 10 // middle bit
+ };
+ int n = inds.Length;
+ if (borderOnly) n -= 6; // take out middle
+ for (int i = 0; i < n; ++i) {
+ indices[offset + i] = vStart + inds[i];
+ }
+ }
+ }
+
+ // Tiled sprite
+
+ public static void GetTiledSpriteGeomDesc(out int numVertices, out int numIndices, tk2dSpriteDefinition spriteDef, Vector2 dimensions)
+ {
+ int numTilesX = (int)Mathf.Ceil( (dimensions.x * spriteDef.texelSize.x) / spriteDef.untrimmedBoundsData[1].x );
+ int numTilesY = (int)Mathf.Ceil( (dimensions.y * spriteDef.texelSize.y) / spriteDef.untrimmedBoundsData[1].y );
+ numVertices = numTilesX * numTilesY * 4;
+ numIndices = numTilesX * numTilesY * 6;
+ }
+
+ public static void SetTiledSpriteGeom(Vector3[] pos, Vector2[] uv, int offset, out Vector3 boundsCenter, out Vector3 boundsExtents, tk2dSpriteDefinition spriteDef, Vector3 scale, Vector2 dimensions, tk2dBaseSprite.Anchor anchor, float colliderOffsetZ, float colliderExtentZ)
+ {
+ boundsCenter = Vector3.zero;
+ boundsExtents = Vector3.zero;
+
+ int numTilesX = (int)Mathf.Ceil( (dimensions.x * spriteDef.texelSize.x) / spriteDef.untrimmedBoundsData[1].x );
+ int numTilesY = (int)Mathf.Ceil( (dimensions.y * spriteDef.texelSize.y) / spriteDef.untrimmedBoundsData[1].y );
+ Vector2 totalMeshSize = new Vector2( dimensions.x * spriteDef.texelSize.x * scale.x, dimensions.y * spriteDef.texelSize.y * scale.y );
+
+ // Anchor tweaks
+ Vector3 anchorOffset = Vector3.zero;
+ switch (anchor)
+ {
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.UpperLeft:
+ break;
+ case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.UpperCenter:
+ anchorOffset.x = -(totalMeshSize.x / 2.0f); break;
+ case tk2dBaseSprite.Anchor.LowerRight: case tk2dBaseSprite.Anchor.MiddleRight: case tk2dBaseSprite.Anchor.UpperRight:
+ anchorOffset.x = -(totalMeshSize.x); break;
+ }
+ switch (anchor)
+ {
+ case tk2dBaseSprite.Anchor.LowerLeft: case tk2dBaseSprite.Anchor.LowerCenter: case tk2dBaseSprite.Anchor.LowerRight:
+ break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: case tk2dBaseSprite.Anchor.MiddleCenter: case tk2dBaseSprite.Anchor.MiddleRight:
+ anchorOffset.y = -(totalMeshSize.y / 2.0f); break;
+ case tk2dBaseSprite.Anchor.UpperLeft: case tk2dBaseSprite.Anchor.UpperCenter: case tk2dBaseSprite.Anchor.UpperRight:
+ anchorOffset.y = -totalMeshSize.y; break;
+ }
+ Vector3 colliderAnchor = anchorOffset;
+ anchorOffset -= Vector3.Scale( spriteDef.positions[0], scale );
+
+ boundsCenter.Set(totalMeshSize.x * 0.5f + colliderAnchor.x, totalMeshSize.y * 0.5f + colliderAnchor.y, colliderOffsetZ );
+ boundsExtents.Set(totalMeshSize.x * 0.5f, totalMeshSize.y * 0.5f, colliderExtentZ);
+
+ int vert = 0;
+ Vector3 bounds = Vector3.Scale( spriteDef.untrimmedBoundsData[1], scale );
+ Vector3 baseOffset = Vector3.zero;
+ Vector3 p = baseOffset;
+ for (int y = 0; y < numTilesY; ++y) {
+ p.x = baseOffset.x;
+ for (int x = 0; x < numTilesX; ++x) {
+ float xClipFrac = 1;
+ float yClipFrac = 1;
+ if (Mathf.Abs(p.x + bounds.x) > Mathf.Abs(totalMeshSize.x) ) {
+ xClipFrac = ((totalMeshSize.x % bounds.x) / bounds.x);
+ }
+ if (Mathf.Abs(p.y + bounds.y) > Mathf.Abs(totalMeshSize.y)) {
+ yClipFrac = ((totalMeshSize.y % bounds.y) / bounds.y);
+ }
+
+ Vector3 geomOffset = p + anchorOffset;
+
+ if (xClipFrac != 1 || yClipFrac != 1) {
+ Vector2 fracBottomLeft = Vector2.zero;
+ Vector2 fracTopRight = new Vector2(xClipFrac, yClipFrac);
+
+ Vector3 bottomLeft = new Vector3(Mathf.Lerp(spriteDef.positions[0].x, spriteDef.positions[3].x, fracBottomLeft.x) * scale.x,
+ Mathf.Lerp(spriteDef.positions[0].y, spriteDef.positions[3].y, fracBottomLeft.y) * scale.y,
+ spriteDef.positions[0].z * scale.z);
+ Vector3 topRight = new Vector3(Mathf.Lerp(spriteDef.positions[0].x, spriteDef.positions[3].x, fracTopRight.x) * scale.x,
+ Mathf.Lerp(spriteDef.positions[0].y, spriteDef.positions[3].y, fracTopRight.y) * scale.y,
+ spriteDef.positions[0].z * scale.z);
+
+ pos[offset + vert + 0] = geomOffset + new Vector3(bottomLeft.x, bottomLeft.y, bottomLeft.z);
+ pos[offset + vert + 1] = geomOffset + new Vector3(topRight.x, bottomLeft.y, bottomLeft.z);
+ pos[offset + vert + 2] = geomOffset + new Vector3(bottomLeft.x, topRight.y, bottomLeft.z);
+ pos[offset + vert + 3] = geomOffset + new Vector3(topRight.x, topRight.y, bottomLeft.z);
+
+ // find the fraction of UV
+ // This can be done without a branch, but will end up with loads of unnecessary interpolations
+ if (spriteDef.flipped == tk2dSpriteDefinition.FlipMode.Tk2d)
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.x));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.x));
+
+ uv[offset + vert + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + vert + 1] = new Vector2(v0.x, v1.y);
+ uv[offset + vert + 2] = new Vector2(v1.x, v0.y);
+ uv[offset + vert + 3] = new Vector2(v1.x, v1.y);
+ }
+ else if (spriteDef.flipped == tk2dSpriteDefinition.FlipMode.TPackerCW)
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.x));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.y),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.x));
+
+ uv[offset + vert + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + vert + 2] = new Vector2(v1.x, v0.y);
+ uv[offset + vert + 1] = new Vector2(v0.x, v1.y);
+ uv[offset + vert + 3] = new Vector2(v1.x, v1.y);
+ }
+ else
+ {
+ Vector2 v0 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracBottomLeft.x),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracBottomLeft.y));
+ Vector2 v1 = new Vector2(Mathf.Lerp(spriteDef.uvs[0].x, spriteDef.uvs[3].x, fracTopRight.x),
+ Mathf.Lerp(spriteDef.uvs[0].y, spriteDef.uvs[3].y, fracTopRight.y));
+
+ uv[offset + vert + 0] = new Vector2(v0.x, v0.y);
+ uv[offset + vert + 1] = new Vector2(v1.x, v0.y);
+ uv[offset + vert + 2] = new Vector2(v0.x, v1.y);
+ uv[offset + vert + 3] = new Vector2(v1.x, v1.y);
+ }
+ }
+ else {
+ pos[offset + vert + 0] = geomOffset + Vector3.Scale( spriteDef.positions[0], scale );
+ pos[offset + vert + 1] = geomOffset + Vector3.Scale( spriteDef.positions[1], scale );
+ pos[offset + vert + 2] = geomOffset + Vector3.Scale( spriteDef.positions[2], scale );
+ pos[offset + vert + 3] = geomOffset + Vector3.Scale( spriteDef.positions[3], scale );
+ uv[offset + vert + 0] = spriteDef.uvs[0];
+ uv[offset + vert + 1] = spriteDef.uvs[1];
+ uv[offset + vert + 2] = spriteDef.uvs[2];
+ uv[offset + vert + 3] = spriteDef.uvs[3];
+ }
+
+ vert += 4;
+ p.x += bounds.x;
+ }
+ p.y += bounds.y;
+ }
+ }
+
+ public static void SetTiledSpriteIndices(int[] indices, int offset, int vStart, tk2dSpriteDefinition spriteDef, Vector2 dimensions)
+ {
+ int numVertices;
+ int numIndices;
+ GetTiledSpriteGeomDesc(out numVertices, out numIndices, spriteDef, dimensions);
+
+ int baseIndex = 0;
+ for (int i = 0; i < numIndices; i += 6) {
+ indices[offset + i + 0] = vStart + spriteDef.indices[0] + baseIndex;
+ indices[offset + i + 1] = vStart + spriteDef.indices[1] + baseIndex;
+ indices[offset + i + 2] = vStart + spriteDef.indices[2] + baseIndex;
+ indices[offset + i + 3] = vStart + spriteDef.indices[3] + baseIndex;
+ indices[offset + i + 4] = vStart + spriteDef.indices[4] + baseIndex;
+ indices[offset + i + 5] = vStart + spriteDef.indices[5] + baseIndex;
+ baseIndex += 4;
+ }
+ }
+
+ // Composite mesh for batched mesh. Box, and SpriteDefinition meshes.
+ // Does transform here too.
+ static readonly int[] boxIndicesBack = { 0, 1, 2, 2, 1, 3, 6, 5, 4, 7, 5, 6, 3, 7, 6, 2, 3, 6, 4, 5, 1, 4, 1, 0, 6, 4, 0, 6, 0, 2, 1, 7, 3, 5, 7, 1 };
+ static readonly int[] boxIndicesFwd = { 2, 1, 0, 3, 1, 2, 4, 5, 6, 6, 5, 7, 6, 7, 3, 6, 3, 2, 1, 5, 4, 0, 1, 4, 0, 4, 6, 2, 0, 6, 3, 7, 1, 1, 7, 5 };
+ static readonly Vector3[] boxUnitVertices = new Vector3[] { new Vector3(-1,-1,-1), new Vector3(-1,-1,1), new Vector3(1,-1,-1), new Vector3(1,-1,1),
+ new Vector3(-1,1,-1), new Vector3(-1,1,1), new Vector3(1,1,-1), new Vector3(1,1,1) };
+ static Matrix4x4 boxScaleMatrix = Matrix4x4.identity;
+
+ public static void SetBoxMeshData(Vector3[] pos, int[] indices, int posOffset, int indicesOffset, int vStart, Vector3 origin, Vector3 extents, Matrix4x4 mat, Vector3 baseScale)
+ {
+ boxScaleMatrix.m03 = origin.x * baseScale.x;
+ boxScaleMatrix.m13 = origin.y * baseScale.y;
+ boxScaleMatrix.m23 = origin.z * baseScale.z;
+ boxScaleMatrix.m00 = extents.x * baseScale.x;
+ boxScaleMatrix.m11 = extents.y * baseScale.y;
+ boxScaleMatrix.m22 = extents.z * baseScale.z;
+ Matrix4x4 boxFinalMatrix = mat * boxScaleMatrix;
+ for (int j = 0; j < 8; ++j) {
+ pos[posOffset + j] = boxFinalMatrix.MultiplyPoint(boxUnitVertices[j]);
+ }
+
+ float scl = mat.m00 * mat.m11 * mat.m22 * baseScale.x * baseScale.y * baseScale.z;
+ int[] srcIndices = ( scl >= 0 ) ? boxIndicesFwd : boxIndicesBack;
+
+ for (int i = 0; i < srcIndices.Length; ++i)
+ indices[indicesOffset + i] = vStart + srcIndices[i];
+ }
+
+ public static void SetSpriteDefinitionMeshData(Vector3[] pos, int[] indices, int posOffset, int indicesOffset, int vStart, tk2dSpriteDefinition spriteDef, Matrix4x4 mat, Vector3 baseScale)
+ {
+ for (int i = 0; i < spriteDef.colliderVertices.Length; ++i)
+ {
+ Vector3 p = Vector3.Scale (spriteDef.colliderVertices[i], baseScale);
+ p = mat.MultiplyPoint (p);
+ pos[posOffset + i] = p;
+ }
+
+ float scl = mat.m00 * mat.m11 * mat.m22;
+ int[] srcIndices = (scl >= 0)?spriteDef.colliderIndicesFwd:spriteDef.colliderIndicesBack;
+
+ for (int i = 0; i < srcIndices.Length; ++i)
+ indices[indicesOffset + i] = vStart + srcIndices[i];
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs.meta
new file mode 100644
index 000000000..7b32f1ca2
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dSpriteGeomGen.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b526d497ff1dbb41911f8faa92fb066
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs
new file mode 100644
index 000000000..16303cc56
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs
@@ -0,0 +1,835 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+// Hideous überclass to work around Unity not supporting inheritence
+[System.Serializable]
+public class tk2dBatchedSprite
+{
+ public enum Type {
+ EmptyGameObject,
+ Sprite,
+ TiledSprite,
+ SlicedSprite,
+ ClippedSprite,
+ TextMesh
+ }
+
+ [System.Flags]
+ public enum Flags {
+ None = 0,
+ Sprite_CreateBoxCollider = 1,
+ SlicedSprite_BorderOnly = 2,
+ }
+
+ public Type type = Type.Sprite;
+ public string name = ""; // for editing
+ public int parentId = -1;
+ public int spriteId = 0;
+ public int xRefId = -1; // index into cross referenced array. what this is depends on type.
+ public tk2dSpriteCollectionData spriteCollection = null;
+ public Quaternion rotation = Quaternion.identity;
+ public Vector3 position = Vector3.zero;
+ public Vector3 localScale = Vector3.one;
+ public Color color = Color.white;
+ public Vector3 baseScale = Vector3.one; // sprite/textMesh scale
+ public int renderLayer = 0;
+
+ [SerializeField]
+ Vector2 internalData0; // Used for clipped region or sliced border
+ [SerializeField]
+ Vector2 internalData1; // Used for clipped region or sliced border
+ [SerializeField]
+ Vector2 internalData2; // Used for dimensions
+ [SerializeField]
+ Vector2 colliderData = new Vector2(0, 1); // collider offset z, collider extent z in x and y respectively
+ [SerializeField]
+ string formattedText = ""; // Formatted text cached for text mesh
+
+ [SerializeField]
+ Flags flags = Flags.None;
+ public tk2dBaseSprite.Anchor anchor = tk2dBaseSprite.Anchor.LowerLeft;
+
+ // Used to create batched mesh
+ public Matrix4x4 relativeMatrix = Matrix4x4.identity;
+
+ public float BoxColliderOffsetZ {
+ get { return colliderData.x; }
+ set { colliderData.x = value; }
+ }
+ public float BoxColliderExtentZ {
+ get { return colliderData.y; }
+ set { colliderData.y = value; }
+ }
+ public string FormattedText {
+ get {return formattedText;}
+ set {formattedText = value;}
+ }
+ public Vector2 ClippedSpriteRegionBottomLeft {
+ get { return internalData0; }
+ set { internalData0 = value; }
+ }
+ public Vector2 ClippedSpriteRegionTopRight {
+ get { return internalData1; }
+ set { internalData1 = value; }
+ }
+ public Vector2 SlicedSpriteBorderBottomLeft {
+ get { return internalData0; }
+ set { internalData0 = value; }
+ }
+ public Vector2 SlicedSpriteBorderTopRight {
+ get { return internalData1; }
+ set { internalData1 = value; }
+ }
+ public Vector2 Dimensions {
+ get { return internalData2; }
+ set { internalData2 = value; }
+ }
+
+ public bool IsDrawn { get { return type != Type.EmptyGameObject; } }
+ public bool CheckFlag(Flags mask) { return (flags & mask) != Flags.None; }
+ public void SetFlag(Flags mask, bool value) { if (value) flags |= mask; else flags &= ~mask; }
+
+ // Bounds - not serialized, but retrieved in BuildRenderMesh (used in BuildPhysicsMesh)
+ Vector3 cachedBoundsCenter = Vector3.zero;
+ Vector3 cachedBoundsExtents = Vector3.zero;
+ public Vector3 CachedBoundsCenter {
+ get {return cachedBoundsCenter;}
+ set {cachedBoundsCenter = value;}
+ }
+ public Vector3 CachedBoundsExtents {
+ get {return cachedBoundsExtents;}
+ set {cachedBoundsExtents = value;}
+ }
+
+ public tk2dSpriteDefinition GetSpriteDefinition() {
+ if (spriteCollection != null && spriteId != -1)
+ {
+ return spriteCollection.inst.spriteDefinitions[spriteId];
+ }
+ else {
+ return null;
+ }
+ }
+
+ public tk2dBatchedSprite()
+ {
+ parentId = -1;
+ }
+}
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dStaticSpriteBatcher")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+///
+/// Static sprite batcher builds a collection of sprites, textmeshes into one
+/// static mesh for better performance.
+///
+public class tk2dStaticSpriteBatcher : MonoBehaviour, tk2dRuntime.ISpriteCollectionForceBuild
+{
+ public static int CURRENT_VERSION = 3;
+
+ public int version = 0;
+ ///
+ /// The list of batched sprites. Fill this and call Build to build your mesh.
+ ///
+ public tk2dBatchedSprite[] batchedSprites = null;
+ public tk2dTextMeshData[] allTextMeshData = null;
+ public tk2dSpriteCollectionData spriteCollection = null;
+
+ // Flags
+ public enum Flags {
+ None = 0,
+ GenerateCollider = 1,
+ FlattenDepth = 2,
+ SortToCamera = 4,
+ }
+
+ // default to keep backwards compatibility
+ [SerializeField]
+ Flags flags = Flags.GenerateCollider;
+
+ public bool CheckFlag(Flags mask) { return (flags & mask) != Flags.None; }
+ public void SetFlag(Flags mask, bool value) {
+ if (CheckFlag(mask) != value) {
+ if (value) {
+ flags |= mask;
+ }
+ else {
+ flags &= ~mask;
+ }
+ Build();
+ }
+ }
+
+ Mesh mesh = null;
+ Mesh colliderMesh = null;
+
+ [SerializeField] Vector3 _scale = new Vector3(1.0f, 1.0f, 1.0f);
+
+#if UNITY_EDITOR
+ // This is not exposed to game, as the cost of rebuilding this data is very high
+ public Vector3 scale
+ {
+ get { UpgradeData(); return _scale; }
+ set
+ {
+ bool needBuild = _scale != value;
+ _scale = value;
+ if (needBuild)
+ Build();
+ }
+ }
+#endif
+
+ void Awake()
+ {
+ Build();
+ }
+
+ // Sanitize data, returns true if needs rebuild
+ bool UpgradeData()
+ {
+ if (version == CURRENT_VERSION) {
+ return false;
+ }
+
+ if (_scale == Vector3.zero) {
+ _scale = Vector3.one;
+ }
+
+ if (version < 2)
+ {
+ if (batchedSprites != null)
+ {
+ // Parented to this object
+ foreach (var sprite in batchedSprites)
+ sprite.parentId = -1;
+ }
+ }
+
+ if (version < 3)
+ {
+ if (batchedSprites != null)
+ {
+ foreach (var sprite in batchedSprites)
+ {
+ if (sprite.spriteId == -1)
+ {
+ sprite.type = tk2dBatchedSprite.Type.EmptyGameObject;
+ }
+ else {
+ sprite.type = tk2dBatchedSprite.Type.Sprite;
+ if (sprite.spriteCollection == null) {
+ sprite.spriteCollection = spriteCollection;
+ }
+ }
+ }
+
+ UpdateMatrices();
+ }
+
+ spriteCollection = null;
+ }
+
+ version = CURRENT_VERSION;
+
+#if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(this);
+#endif
+
+ return true;
+ }
+
+ protected void OnDestroy()
+ {
+ if (mesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(mesh);
+#else
+ Destroy(mesh);
+#endif
+ }
+
+ if (colliderMesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(colliderMesh);
+#else
+ Destroy(colliderMesh);
+#endif
+ }
+ }
+
+ ///
+ /// Update matrices, if the sprite batcher has been built using .position, etc.
+ /// It is far more efficient to simply set the matrices when building at runtime
+ /// so do that if possible.
+ ///
+ public void UpdateMatrices() {
+ bool hasParentIds = false;
+ foreach (var sprite in batchedSprites)
+ {
+ if (sprite.parentId != -1) {
+ hasParentIds = true;
+ break;
+ }
+ }
+
+ if (hasParentIds) {
+ // Reconstruct matrices from TRS, respecting hierarchy
+ Matrix4x4 tmpMatrix = new Matrix4x4();
+ List parentSortedSprites = new List( batchedSprites );
+ parentSortedSprites.Sort((a, b) => a.parentId.CompareTo(b.parentId) );
+ foreach (tk2dBatchedSprite sprite in parentSortedSprites) {
+ tmpMatrix.SetTRS( sprite.position, sprite.rotation, sprite.localScale );
+ sprite.relativeMatrix = ((sprite.parentId == -1) ? Matrix4x4.identity : batchedSprites[ sprite.parentId ].relativeMatrix) * tmpMatrix;
+ }
+ }
+ else {
+ foreach (tk2dBatchedSprite sprite in batchedSprites) {
+ sprite.relativeMatrix.SetTRS( sprite.position, sprite.rotation, sprite.localScale );
+ }
+ }
+ }
+
+ ///
+ /// Build a static sprite batcher's geometry and collider
+ ///
+ public void Build()
+ {
+ UpgradeData();
+
+ if (mesh == null)
+ {
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+ }
+ else
+ {
+ // this happens when the sprite rebuilds
+ mesh.Clear();
+ }
+
+ if (colliderMesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(colliderMesh);
+#else
+ Destroy(colliderMesh);
+#endif
+ colliderMesh = null;
+ }
+
+ if (batchedSprites == null || batchedSprites.Length == 0)
+ {
+ }
+ else
+ {
+ SortBatchedSprites();
+ BuildRenderMesh();
+ BuildPhysicsMesh();
+ }
+ }
+
+ void SortBatchedSprites()
+ {
+ List solidBatches = new List();
+ List otherBatches = new List();
+ List undrawnBatches = new List();
+ foreach (tk2dBatchedSprite batchedSprite in batchedSprites)
+ {
+ if (!batchedSprite.IsDrawn)
+ {
+ undrawnBatches.Add(batchedSprite);
+ continue;
+ }
+
+ Material material = GetMaterial(batchedSprite);
+ if (material != null) {
+ if (material.renderQueue == 2000) {
+ solidBatches.Add(batchedSprite);
+ }
+ else {
+ otherBatches.Add(batchedSprite);
+ }
+ }
+ else
+ {
+ solidBatches.Add(batchedSprite);
+ }
+ }
+
+ List allBatches = new List(solidBatches.Count + otherBatches.Count + undrawnBatches.Count);
+ allBatches.AddRange(solidBatches);
+ allBatches.AddRange(otherBatches);
+ allBatches.AddRange(undrawnBatches);
+
+ // Re-index parents
+ Dictionary lookup = new Dictionary();
+ int index = 0;
+ foreach (var v in allBatches)
+ lookup[v] = index++;
+
+ foreach (var v in allBatches)
+ {
+ if (v.parentId == -1)
+ continue;
+ v.parentId = lookup[ batchedSprites[v.parentId] ];
+ }
+
+ batchedSprites = allBatches.ToArray();
+ }
+
+ Material GetMaterial(tk2dBatchedSprite bs) {
+ switch (bs.type) {
+ case tk2dBatchedSprite.Type.EmptyGameObject: return null;
+ case tk2dBatchedSprite.Type.TextMesh: return allTextMeshData[bs.xRefId].font.materialInst;
+ default: return bs.GetSpriteDefinition().materialInst;
+ }
+ }
+
+ void BuildRenderMesh()
+ {
+ List materials = new List();
+ List> indices = new List>();
+
+ bool needNormals = false;
+ bool needTangents = false;
+ bool needUV2 = false;
+ bool flattenDepth = CheckFlag(Flags.FlattenDepth);
+
+ foreach (var bs in batchedSprites)
+ {
+ var spriteDef = bs.GetSpriteDefinition();
+ if (spriteDef != null)
+ {
+ needNormals |= (spriteDef.normals != null && spriteDef.normals.Length > 0);
+ needTangents |= (spriteDef.tangents != null && spriteDef.tangents.Length > 0);
+ }
+ if (bs.type == tk2dBatchedSprite.Type.TextMesh)
+ {
+ tk2dTextMeshData textMeshData = allTextMeshData[bs.xRefId];
+ if ((textMeshData.font != null) && textMeshData.font.inst.textureGradients)
+ {
+ needUV2 = true;
+ }
+ }
+ }
+
+ // just helpful to have these here, stop code being more messy
+ List bsNVerts = new List();
+ List bsNInds = new List();
+
+ int numVertices = 0;
+ foreach (var bs in batchedSprites)
+ {
+ if (!bs.IsDrawn) // when the first non-drawn child is found, it signals the end of the drawn list
+ break;
+
+ var spriteDef = bs.GetSpriteDefinition();
+ int nVerts = 0;
+ int nInds = 0;
+ switch (bs.type)
+ {
+ case tk2dBatchedSprite.Type.EmptyGameObject:
+ break;
+ case tk2dBatchedSprite.Type.Sprite:
+ if (spriteDef != null) tk2dSpriteGeomGen.GetSpriteGeomDesc(out nVerts, out nInds, spriteDef);
+ break;
+ case tk2dBatchedSprite.Type.TiledSprite:
+ if (spriteDef != null) tk2dSpriteGeomGen.GetTiledSpriteGeomDesc(out nVerts, out nInds, spriteDef, bs.Dimensions);
+ break;
+ case tk2dBatchedSprite.Type.SlicedSprite:
+ if (spriteDef != null) tk2dSpriteGeomGen.GetSlicedSpriteGeomDesc(out nVerts, out nInds, spriteDef, bs.CheckFlag(tk2dBatchedSprite.Flags.SlicedSprite_BorderOnly));
+ break;
+ case tk2dBatchedSprite.Type.ClippedSprite:
+ if (spriteDef != null) tk2dSpriteGeomGen.GetClippedSpriteGeomDesc(out nVerts, out nInds, spriteDef);
+ break;
+ case tk2dBatchedSprite.Type.TextMesh:
+ {
+ tk2dTextMeshData textMeshData = allTextMeshData[bs.xRefId];
+ tk2dTextGeomGen.GetTextMeshGeomDesc(out nVerts, out nInds, tk2dTextGeomGen.Data(textMeshData, textMeshData.font.inst, bs.FormattedText));
+ break;
+ }
+ }
+ numVertices += nVerts;
+
+ bsNVerts.Add(nVerts);
+ bsNInds.Add(nInds);
+ }
+
+ Vector3[] meshNormals = needNormals?new Vector3[numVertices]:null;
+ Vector4[] meshTangents = needTangents?new Vector4[numVertices]:null;
+ Vector3[] meshVertices = new Vector3[numVertices];
+ Color32[] meshColors = new Color32[numVertices];
+ Vector2[] meshUvs = new Vector2[numVertices];
+ Vector2[] meshUv2s = needUV2 ? new Vector2[numVertices] : null;
+
+ int currVertex = 0;
+
+ Material currentMaterial = null;
+ List currentIndices = null;
+
+ Matrix4x4 scaleMatrix = Matrix4x4.identity;
+ scaleMatrix.m00 = _scale.x;
+ scaleMatrix.m11 = _scale.y;
+ scaleMatrix.m22 = _scale.z;
+
+ int bsIndex = 0;
+ foreach (var bs in batchedSprites)
+ {
+ if (!bs.IsDrawn) // when the first non-drawn child is found, it signals the end of the drawn list
+ break;
+
+ if (bs.type == tk2dBatchedSprite.Type.EmptyGameObject)
+ {
+ ++bsIndex; // watch out for this
+ continue;
+ }
+
+ var spriteDef = bs.GetSpriteDefinition();
+ int nVerts = bsNVerts[bsIndex];
+ int nInds = bsNInds[bsIndex];
+
+ Material material = GetMaterial(bs);
+
+ // should have a material at this point
+ if (material != currentMaterial)
+ {
+ if (currentMaterial != null)
+ {
+ materials.Add(currentMaterial);
+ indices.Add(currentIndices);
+ }
+
+ currentMaterial = material;
+ currentIndices = new List();
+ }
+
+ Vector3[] posData = new Vector3[nVerts];
+ Vector2[] uvData = new Vector2[nVerts];
+ Vector2[] uv2Data = needUV2 ? new Vector2[nVerts] : null;
+ Color32[] colorData = new Color32[nVerts];
+ Vector3[] normalData = needNormals ? new Vector3[nVerts] : null;
+ Vector4[] tangentData = needTangents ? new Vector4[nVerts] : null;
+ int[] indData = new int[nInds];
+
+ Vector3 boundsCenter = Vector3.zero;
+ Vector3 boundsExtents = Vector3.zero;
+
+ switch (bs.type)
+ {
+ case tk2dBatchedSprite.Type.EmptyGameObject:
+ break;
+ case tk2dBatchedSprite.Type.Sprite:
+ if (spriteDef != null) {
+ tk2dSpriteGeomGen.SetSpriteGeom(posData, uvData, normalData, tangentData, 0, spriteDef, Vector3.one);
+ tk2dSpriteGeomGen.SetSpriteIndices(indData, 0, currVertex, spriteDef);
+ }
+ break;
+ case tk2dBatchedSprite.Type.TiledSprite:
+ if (spriteDef != null) {
+ tk2dSpriteGeomGen.SetTiledSpriteGeom(posData, uvData, 0, out boundsCenter, out boundsExtents, spriteDef, Vector3.one, bs.Dimensions, bs.anchor, bs.BoxColliderOffsetZ, bs.BoxColliderExtentZ);
+ tk2dSpriteGeomGen.SetTiledSpriteIndices(indData, 0, currVertex, spriteDef, bs.Dimensions);
+ }
+ break;
+ case tk2dBatchedSprite.Type.SlicedSprite:
+ if (spriteDef != null) {
+ tk2dSpriteGeomGen.SetSlicedSpriteGeom(posData, uvData, 0, out boundsCenter, out boundsExtents, spriteDef, Vector3.one, bs.Dimensions, bs.SlicedSpriteBorderBottomLeft, bs.SlicedSpriteBorderTopRight, bs.anchor, bs.BoxColliderOffsetZ, bs.BoxColliderExtentZ);
+ tk2dSpriteGeomGen.SetSlicedSpriteIndices(indData, 0, currVertex, spriteDef, bs.CheckFlag(tk2dBatchedSprite.Flags.SlicedSprite_BorderOnly));
+ }
+ break;
+ case tk2dBatchedSprite.Type.ClippedSprite:
+ if (spriteDef != null) {
+ tk2dSpriteGeomGen.SetClippedSpriteGeom(posData, uvData, 0, out boundsCenter, out boundsExtents, spriteDef, Vector3.one, bs.ClippedSpriteRegionBottomLeft, bs.ClippedSpriteRegionTopRight, bs.BoxColliderOffsetZ, bs.BoxColliderExtentZ);
+ tk2dSpriteGeomGen.SetClippedSpriteIndices(indData, 0, currVertex, spriteDef);
+ }
+ break;
+ case tk2dBatchedSprite.Type.TextMesh:
+ {
+ tk2dTextMeshData textMeshData = allTextMeshData[bs.xRefId];
+ var geomData = tk2dTextGeomGen.Data(textMeshData, textMeshData.font.inst, bs.FormattedText);
+ int target = tk2dTextGeomGen.SetTextMeshGeom(posData, uvData, uv2Data, colorData, 0, geomData);
+ if (!geomData.fontInst.isPacked) {
+ Color32 topColor = textMeshData.color;
+ Color32 bottomColor = textMeshData.useGradient ? textMeshData.color2 : textMeshData.color;
+ for (int i = 0; i < colorData.Length; ++i) {
+ Color32 c = ((i % 4) < 2) ? topColor : bottomColor;
+ byte red = (byte)(((int)colorData[i].r * (int)c.r) / 255);
+ byte green = (byte)(((int)colorData[i].g * (int)c.g) / 255);
+ byte blue = (byte)(((int)colorData[i].b * (int)c.b) / 255);
+ byte alpha = (byte)(((int)colorData[i].a * (int)c.a) / 255);
+ if (geomData.fontInst.premultipliedAlpha) {
+ red = (byte)(((int)red * (int)alpha) / 255);
+ green = (byte)(((int)green * (int)alpha) / 255);
+ blue = (byte)(((int)blue * (int)alpha) / 255);
+ }
+ colorData[i] = new Color32(red, green, blue, alpha);
+ }
+ }
+ tk2dTextGeomGen.SetTextMeshIndices(indData, 0, currVertex, geomData, target);
+ break;
+ }
+ }
+
+ bs.CachedBoundsCenter = boundsCenter;
+ bs.CachedBoundsExtents = boundsExtents;
+
+ if (nVerts > 0 && bs.type != tk2dBatchedSprite.Type.TextMesh)
+ {
+ bool premulAlpha = (bs.spriteCollection != null) ? bs.spriteCollection.premultipliedAlpha : false;
+ tk2dSpriteGeomGen.SetSpriteColors(colorData, 0, nVerts, bs.color, premulAlpha);
+ }
+
+ Matrix4x4 mat = scaleMatrix * bs.relativeMatrix;
+ for (int i = 0; i < nVerts; ++i)
+ {
+ Vector3 pos = Vector3.Scale(posData[i], bs.baseScale);
+ pos = mat.MultiplyPoint(pos);
+ if (flattenDepth) {
+ pos.z = 0;
+ }
+
+ meshVertices[currVertex + i] = pos;
+
+ meshUvs[currVertex + i] = uvData[i];
+ if (needUV2) meshUv2s[currVertex + i] = uv2Data[i];
+ meshColors[currVertex + i] = colorData[i];
+
+ if (needNormals)
+ {
+ meshNormals[currVertex + i] = bs.rotation * normalData[i];
+ }
+ if (needTangents)
+ {
+ Vector3 tang = new Vector3(tangentData[i].x, tangentData[i].y, tangentData[i].z);
+ tang = bs.rotation * tang;
+ meshTangents[currVertex + i] = new Vector4(tang.x, tang.y, tang.z, tangentData[i].w);
+ }
+ }
+
+ currentIndices.AddRange (indData);
+
+ currVertex += nVerts;
+
+ ++bsIndex;
+ }
+
+ if (currentIndices != null)
+ {
+ materials.Add(currentMaterial);
+ indices.Add(currentIndices);
+ }
+
+ if (mesh)
+ {
+ mesh.vertices = meshVertices;
+ mesh.uv = meshUvs;
+ if (needUV2)
+ mesh.uv2 = meshUv2s;
+ mesh.colors32 = meshColors;
+ if (needNormals)
+ mesh.normals = meshNormals;
+ if (needTangents)
+ mesh.tangents = meshTangents;
+
+ mesh.subMeshCount = indices.Count;
+ for (int i = 0; i < indices.Count; ++i)
+ mesh.SetTriangles(indices[i].ToArray(), i);
+
+ mesh.RecalculateBounds();
+ }
+
+ renderer.sharedMaterials = materials.ToArray();
+ }
+
+ void BuildPhysicsMesh()
+ {
+ MeshCollider meshCollider = GetComponent();
+ if (meshCollider != null)
+ {
+ if (collider != meshCollider) {
+ // Already has a collider
+ return;
+ }
+
+ if (!CheckFlag(Flags.GenerateCollider)) {
+#if UNITY_EDITOR
+ DestroyImmediate(meshCollider);
+#else
+ Destroy(meshCollider);
+#endif
+ }
+ }
+
+ if (!CheckFlag(Flags.GenerateCollider)) {
+ return;
+ }
+
+ bool flattenDepth = CheckFlag(Flags.FlattenDepth);
+ int numIndices = 0;
+ int numVertices = 0;
+
+ // first pass, count required vertices and indices
+ foreach (var bs in batchedSprites)
+ {
+ if (!bs.IsDrawn) // when the first non-drawn child is found, it signals the end of the drawn list
+ break;
+
+ var spriteDef = bs.GetSpriteDefinition();
+
+ bool buildSpriteDefinitionMesh = false;
+ bool buildBox = false;
+ switch (bs.type)
+ {
+ case tk2dBatchedSprite.Type.Sprite:
+ if (spriteDef != null && spriteDef.colliderType == tk2dSpriteDefinition.ColliderType.Mesh)
+ {
+ buildSpriteDefinitionMesh = true;
+ }
+ if (spriteDef != null && spriteDef.colliderType == tk2dSpriteDefinition.ColliderType.Box)
+ {
+ buildBox = true;
+ }
+ break;
+ case tk2dBatchedSprite.Type.ClippedSprite:
+ case tk2dBatchedSprite.Type.SlicedSprite:
+ case tk2dBatchedSprite.Type.TiledSprite:
+ buildBox = bs.CheckFlag(tk2dBatchedSprite.Flags.Sprite_CreateBoxCollider);
+ break;
+ case tk2dBatchedSprite.Type.TextMesh:
+ //...
+ break;
+ }
+
+ // might want to return these counts from SpriteGeomGen? (tidier...?)
+ if (buildSpriteDefinitionMesh)
+ {
+ numIndices += spriteDef.colliderIndicesFwd.Length;
+ numVertices += spriteDef.colliderVertices.Length;
+ }
+ else if (buildBox)
+ {
+ numIndices += 6 * 6;
+ numVertices += 8;
+ }
+ }
+
+ if (numIndices == 0)
+ {
+ if (colliderMesh)
+ {
+#if UNITY_EDTIOR
+ DestroyImmediate(colliderMesh);
+#else
+ Destroy(colliderMesh);
+#endif
+ }
+
+ return;
+ }
+
+ if (meshCollider == null)
+ {
+ meshCollider = gameObject.AddComponent();
+ }
+
+ if (colliderMesh == null)
+ {
+ colliderMesh = new Mesh();
+ colliderMesh.hideFlags = HideFlags.DontSave;
+ }
+ else
+ {
+ colliderMesh.Clear();
+ }
+
+ // second pass, build composite mesh
+ int currVertex = 0;
+ Vector3[] vertices = new Vector3[numVertices];
+ int currIndex = 0;
+ int[] indices = new int[numIndices];
+
+ Matrix4x4 scaleMatrix = Matrix4x4.identity;
+ scaleMatrix.m00 = _scale.x;
+ scaleMatrix.m11 = _scale.y;
+ scaleMatrix.m22 = _scale.z;
+
+ foreach (var bs in batchedSprites)
+ {
+ if (!bs.IsDrawn) // when the first non-drawn child is found, it signals the end of the drawn list
+ break;
+
+ var spriteDef = bs.GetSpriteDefinition();
+
+ bool buildSpriteDefinitionMesh = false;
+ bool buildBox = false;
+ Vector3 boxOrigin = Vector3.zero;
+ Vector3 boxExtents = Vector3.zero;
+ switch (bs.type)
+ {
+ case tk2dBatchedSprite.Type.Sprite:
+ if (spriteDef != null && spriteDef.colliderType == tk2dSpriteDefinition.ColliderType.Mesh)
+ {
+ buildSpriteDefinitionMesh = true;
+ }
+ if (spriteDef != null && spriteDef.colliderType == tk2dSpriteDefinition.ColliderType.Box)
+ {
+ buildBox = true;
+ boxOrigin = spriteDef.colliderVertices[0];
+ boxExtents = spriteDef.colliderVertices[1];
+ }
+ break;
+ case tk2dBatchedSprite.Type.ClippedSprite:
+ case tk2dBatchedSprite.Type.SlicedSprite:
+ case tk2dBatchedSprite.Type.TiledSprite:
+ buildBox = bs.CheckFlag(tk2dBatchedSprite.Flags.Sprite_CreateBoxCollider);
+ if (buildBox)
+ {
+ boxOrigin = bs.CachedBoundsCenter;
+ boxExtents = bs.CachedBoundsExtents;
+ }
+ break;
+ case tk2dBatchedSprite.Type.TextMesh:
+ break;
+ }
+
+ Matrix4x4 mat = scaleMatrix * bs.relativeMatrix;
+ if (flattenDepth) {
+ mat.m23 = 0;
+ }
+ if (buildSpriteDefinitionMesh)
+ {
+ tk2dSpriteGeomGen.SetSpriteDefinitionMeshData(vertices, indices, currVertex, currIndex, currVertex, spriteDef, mat, bs.baseScale);
+ currVertex += spriteDef.colliderVertices.Length;
+ currIndex += spriteDef.colliderIndicesFwd.Length;
+ }
+ else if (buildBox)
+ {
+ tk2dSpriteGeomGen.SetBoxMeshData(vertices, indices, currVertex, currIndex, currVertex, boxOrigin, boxExtents, mat, bs.baseScale);
+ currVertex += 8;
+ currIndex += 6 * 6;
+ }
+ }
+
+ colliderMesh.vertices = vertices;
+ colliderMesh.triangles = indices;
+
+ meshCollider.sharedMesh = colliderMesh;
+ }
+
+ public bool UsesSpriteCollection(tk2dSpriteCollectionData spriteCollection)
+ {
+ return this.spriteCollection == spriteCollection;
+ }
+
+ public void ForceBuild()
+ {
+ Build();
+ }
+}
+
+
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs.meta
new file mode 100644
index 000000000..2a0023d02
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dStaticSpriteBatcher.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5d4775e89280fa044835889590a966f0
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30500
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs
new file mode 100644
index 000000000..e27f8bba6
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs
@@ -0,0 +1,300 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dTiledSprite")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+///
+/// Sprite implementation that tiles a sprite to fill given dimensions.
+///
+public class tk2dTiledSprite : tk2dBaseSprite
+{
+ Mesh mesh;
+ Vector2[] meshUvs;
+ Vector3[] meshVertices;
+ Color32[] meshColors;
+ int[] meshIndices;
+
+ [SerializeField]
+ Vector2 _dimensions = new Vector2(50.0f, 50.0f);
+ [SerializeField]
+ Anchor _anchor = Anchor.LowerLeft;
+
+ ///
+ /// Gets or sets the dimensions.
+ ///
+ ///
+ /// Use this to change the dimensions of the sliced sprite in pixel units
+ ///
+ public Vector2 dimensions
+ {
+ get { return _dimensions; }
+ set
+ {
+ if (value != _dimensions)
+ {
+ _dimensions = value;
+ UpdateVertices();
+#if UNITY_EDITOR
+ EditMode__CreateCollider();
+#endif
+ UpdateCollider();
+ }
+ }
+ }
+
+ ///
+ /// The anchor position for this tiled sprite
+ ///
+ public Anchor anchor
+ {
+ get { return _anchor; }
+ set
+ {
+ if (value != _anchor)
+ {
+ _anchor = value;
+ UpdateVertices();
+#if UNITY_EDITOR
+ EditMode__CreateCollider();
+#endif
+ UpdateCollider();
+ }
+ }
+ }
+
+ [SerializeField]
+ protected bool _createBoxCollider = false;
+
+ ///
+ /// Create a trimmed box collider for this sprite
+ ///
+ public bool CreateBoxCollider {
+ get { return _createBoxCollider; }
+ set {
+ if (_createBoxCollider != value) {
+ _createBoxCollider = value;
+ UpdateCollider();
+ }
+ }
+ }
+
+ new void Awake()
+ {
+ base.Awake();
+
+ // Create mesh, independently to everything else
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ GetComponent().mesh = mesh;
+
+ // This will not be set when instantiating in code
+ // In that case, Build will need to be called
+ if (Collection)
+ {
+ // reset spriteId if outside bounds
+ // this is when the sprite collection data is corrupt
+ if (_spriteId < 0 || _spriteId >= Collection.Count)
+ _spriteId = 0;
+
+ Build();
+
+ if (boxCollider == null)
+ boxCollider = GetComponent();
+ }
+ }
+
+ protected void OnDestroy()
+ {
+ if (mesh)
+ {
+#if UNITY_EDITOR
+ DestroyImmediate(mesh);
+#else
+ Destroy(mesh);
+#endif
+ }
+ }
+
+ new protected void SetColors(Color32[] dest)
+ {
+ int numVertices;
+ int numIndices;
+ tk2dSpriteGeomGen.GetTiledSpriteGeomDesc(out numVertices, out numIndices, CurrentSprite, dimensions);
+ tk2dSpriteGeomGen.SetSpriteColors (dest, 0, numVertices, _color, collectionInst.premultipliedAlpha);
+ }
+
+ // Calculated center and extents
+ Vector3 boundsCenter = Vector3.zero, boundsExtents = Vector3.zero;
+
+
+
+ public override void Build()
+ {
+ var spriteDef = CurrentSprite;
+ int numVertices;
+ int numIndices;
+ tk2dSpriteGeomGen.GetTiledSpriteGeomDesc(out numVertices, out numIndices, spriteDef, dimensions);
+
+ if (meshUvs == null || meshUvs.Length != numVertices) {
+ meshUvs = new Vector2[numVertices];
+ meshVertices = new Vector3[numVertices];
+ meshColors = new Color32[numVertices];
+ }
+ if (meshIndices == null || meshIndices.Length != numIndices) {
+ meshIndices = new int[numIndices];
+ }
+
+ float colliderOffsetZ = ( boxCollider != null ) ? ( boxCollider.center.z ) : 0.0f;
+ float colliderExtentZ = ( boxCollider != null ) ? ( boxCollider.size.z * 0.5f ) : 0.5f;
+ tk2dSpriteGeomGen.SetTiledSpriteGeom(meshVertices, meshUvs, 0, out boundsCenter, out boundsExtents, spriteDef, _scale, dimensions, anchor, colliderOffsetZ, colliderExtentZ);
+ tk2dSpriteGeomGen.SetTiledSpriteIndices(meshIndices, 0, 0, spriteDef, dimensions);
+
+ SetColors(meshColors);
+
+ if (mesh == null)
+ {
+ mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ }
+ else
+ {
+ mesh.Clear();
+ }
+ mesh.vertices = meshVertices;
+ mesh.colors32 = meshColors;
+ mesh.uv = meshUvs;
+ mesh.triangles = meshIndices;
+ mesh.RecalculateBounds();
+ mesh.bounds = AdjustedMeshBounds( mesh.bounds, renderLayer );
+
+ GetComponent().mesh = mesh;
+
+ UpdateCollider();
+ UpdateMaterial();
+ }
+
+ protected override void UpdateGeometry() { UpdateGeometryImpl(); }
+ protected override void UpdateColors() { UpdateColorsImpl(); }
+ protected override void UpdateVertices() { UpdateGeometryImpl(); }
+
+
+ protected void UpdateColorsImpl()
+ {
+#if UNITY_EDITOR
+ // This can happen with prefabs in the inspector
+ if (meshColors == null || meshColors.Length == 0)
+ return;
+#endif
+ if (meshColors == null || meshColors.Length == 0) {
+ Build();
+ }
+ else {
+ SetColors(meshColors);
+ mesh.colors32 = meshColors;
+ }
+ }
+
+ protected void UpdateGeometryImpl()
+ {
+#if UNITY_EDITOR
+ // This can happen with prefabs in the inspector
+ if (mesh == null)
+ return;
+#endif
+ Build();
+ }
+
+#region Collider
+ protected override void UpdateCollider()
+ {
+ if (CreateBoxCollider) {
+ if (boxCollider == null) {
+ boxCollider = GetComponent();
+ if (boxCollider == null) {
+ boxCollider = gameObject.AddComponent();
+ }
+ }
+ boxCollider.size = 2 * boundsExtents;
+ boxCollider.center = boundsCenter;
+ } else {
+#if UNITY_EDITOR
+ boxCollider = GetComponent();
+ if (boxCollider != null) {
+ DestroyImmediate(boxCollider);
+ }
+#else
+ if (boxCollider != null) {
+ Destroy(boxCollider);
+ }
+#endif
+ }
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (mesh != null) {
+ Bounds b = mesh.bounds;
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube(b.center, b.extents * 2);
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+
+ protected override void CreateCollider() {
+ UpdateCollider();
+ }
+
+#if UNITY_EDITOR
+ public override void EditMode__CreateCollider() {
+ UpdateCollider();
+ }
+#endif
+#endregion
+
+ protected override void UpdateMaterial()
+ {
+ if (renderer.sharedMaterial != collectionInst.spriteDefinitions[spriteId].materialInst)
+ renderer.material = collectionInst.spriteDefinitions[spriteId].materialInst;
+ }
+
+ protected override int GetCurrentVertexCount()
+ {
+#if UNITY_EDITOR
+ if (meshVertices == null)
+ return 0;
+#endif
+ return 16;
+ }
+
+ public override void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ var sprite = CurrentSprite;
+ Vector3 oldSize = new Vector3(_dimensions.x * sprite.texelSize.x * _scale.x, _dimensions.y * sprite.texelSize.y * _scale.y);
+ Vector3 oldMin = Vector3.zero;
+ switch (_anchor) {
+ case Anchor.LowerLeft: oldMin.Set(0,0,0); break;
+ case Anchor.LowerCenter: oldMin.Set(0.5f,0,0); break;
+ case Anchor.LowerRight: oldMin.Set(1,0,0); break;
+ case Anchor.MiddleLeft: oldMin.Set(0,0.5f,0); break;
+ case Anchor.MiddleCenter: oldMin.Set(0.5f,0.5f,0); break;
+ case Anchor.MiddleRight: oldMin.Set(1,0.5f,0); break;
+ case Anchor.UpperLeft: oldMin.Set(0,1,0); break;
+ case Anchor.UpperCenter: oldMin.Set(0.5f,1,0); break;
+ case Anchor.UpperRight: oldMin.Set(1,1,0); break;
+ }
+ oldMin = Vector3.Scale(oldMin, oldSize) * -1;
+ Vector3 newDimensions = oldSize + dMax - dMin;
+ newDimensions.x /= sprite.texelSize.x * _scale.x;
+ newDimensions.y /= sprite.texelSize.y * _scale.y;
+ Vector3 scaledMin = new Vector3(Mathf.Approximately(_dimensions.x, 0) ? 0 : (oldMin.x * newDimensions.x / _dimensions.x),
+ Mathf.Approximately(_dimensions.y, 0) ? 0 : (oldMin.y * newDimensions.y / _dimensions.y));
+ Vector3 offset = oldMin + dMin - scaledMin;
+ offset.z = 0;
+ transform.position = transform.TransformPoint(offset);
+ dimensions = new Vector2(newDimensions.x, newDimensions.y);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs.meta b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs.meta
new file mode 100644
index 000000000..10933a704
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2d/Code/Sprites/tk2dTiledSprite.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 77ef0a107dd4346469517736d543be61
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30800
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap.meta b/Chromacore/Assets/Plugins/tk2dTileMap.meta
new file mode 100644
index 000000000..d237f5f61
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: ec88398cc7e4feb4aa17d8de8ae01f20
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code.meta
new file mode 100644
index 000000000..6639198aa
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 0676cdde77cc08d4b9d468ceb0a6f8bf
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs
new file mode 100644
index 000000000..d0fb78621
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs
@@ -0,0 +1,645 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+using tk2dRuntime.TileMap;
+
+[System.Flags]
+public enum tk2dTileFlags {
+ None = 0x00000000,
+ FlipX = 0x01000000,
+ FlipY = 0x02000000,
+ Rot90 = 0x04000000,
+}
+
+[ExecuteInEditMode]
+[AddComponentMenu("2D Toolkit/TileMap/TileMap")]
+///
+/// Tile Map
+///
+public class tk2dTileMap : MonoBehaviour, tk2dRuntime.ISpriteCollectionForceBuild
+{
+ ///
+ /// This is a link to the editor data object (tk2dTileMapEditorData).
+ /// It contains presets, and other data which isn't really relevant in game.
+ ///
+ public string editorDataGUID = "";
+
+ ///
+ /// Tile map data, stores shared parameters for tilemaps
+ ///
+ public tk2dTileMapData data;
+
+ ///
+ /// Tile map render and collider object
+ ///
+ public GameObject renderData;
+
+ ///
+ /// The sprite collection used by the tilemap
+ ///
+ [SerializeField]
+ private tk2dSpriteCollectionData spriteCollection = null;
+ public tk2dSpriteCollectionData Editor__SpriteCollection
+ {
+ get
+ {
+ return spriteCollection;
+ }
+ set
+ {
+ _spriteCollectionInst = null;
+ spriteCollection = value;
+ if (spriteCollection != null)
+ _spriteCollectionInst = spriteCollection.inst;
+ }
+ }
+
+ tk2dSpriteCollectionData _spriteCollectionInst = null;
+ public tk2dSpriteCollectionData SpriteCollectionInst
+ {
+ get
+ {
+ if (_spriteCollectionInst == null && spriteCollection != null)
+ _spriteCollectionInst = spriteCollection.inst;
+ return _spriteCollectionInst;
+ }
+ }
+
+ [SerializeField]
+ int spriteCollectionKey;
+
+
+ /// Width of the tilemap
+ public int width = 128;
+ /// Height of the tilemap
+ public int height = 128;
+
+ /// X axis partition size for this tilemap
+ public int partitionSizeX = 32;
+ /// Y axis partition size for this tilemap
+ public int partitionSizeY = 32;
+
+ [SerializeField]
+ Layer[] layers;
+
+ [SerializeField]
+ ColorChannel colorChannel;
+
+ [SerializeField]
+ GameObject prefabsRoot;
+
+ [System.Serializable]
+ public class TilemapPrefabInstance {
+ public int x, y, layer;
+ public GameObject instance;
+ }
+
+ [SerializeField]
+ List tilePrefabsList = new List();
+
+ [SerializeField]
+ bool _inEditMode = false;
+ public bool AllowEdit { get { return _inEditMode; } }
+
+ // holds a path to a serialized mesh, uses this to work out dump directory for meshes
+ public string serializedMeshPath;
+
+ void Awake()
+ {
+ if (spriteCollection != null)
+ _spriteCollectionInst = spriteCollection.inst;
+
+ bool spriteCollectionKeyMatch = true;
+ if (SpriteCollectionInst && SpriteCollectionInst.buildKey != spriteCollectionKey) spriteCollectionKeyMatch = false;
+
+ if (Application.platform == RuntimePlatform.WindowsEditor ||
+ Application.platform == RuntimePlatform.OSXEditor)
+ {
+ if ((Application.isPlaying && _inEditMode == true) || !spriteCollectionKeyMatch)
+ {
+ // Switched to edit mode while still in edit mode, rebuild
+ EndEditMode();
+ }
+ }
+ else
+ {
+ if (_inEditMode == true)
+ {
+ Debug.LogError("Tilemap " + name + " is still in edit mode. Please fix." +
+ "Building overhead will be significant.");
+ EndEditMode();
+ }
+ else if (!spriteCollectionKeyMatch)
+ {
+ Build(BuildFlags.ForceBuild);
+ }
+ }
+ }
+
+#if UNITY_EDITOR
+ void OnDrawGizmos() {
+ if (data != null) {
+ Vector3 p0 = data.tileOrigin;
+ Vector3 p1 = new Vector3(p0.x + data.tileSize.x * width, p0.y + data.tileSize.y * height, 0.0f);
+
+ Gizmos.color = Color.clear;
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Gizmos.DrawCube((p0 + p1) * 0.5f, (p1 - p0));
+ Gizmos.matrix = Matrix4x4.identity;
+ Gizmos.color = Color.white;
+ }
+ }
+#endif
+
+ [System.Flags]
+ public enum BuildFlags {
+ Default = 0,
+ EditMode = 1,
+ ForceBuild = 2
+ };
+
+
+ ///
+ /// Builds the tilemap. Call this after using the SetTile functions to
+ /// rebuild the affected partitions. Build only rebuilds affected partitions
+ /// and is efficent enough to use at runtime if you don't use Unity colliders.
+ /// Avoid building tilemaps every frame if you use Unity colliders as it will
+ /// likely be too slow for runtime use.
+ ///
+ public void Build() { Build(BuildFlags.Default); }
+
+ ///
+ /// Like above, but forces a build of all partitions.
+ ///
+ public void ForceBuild() { Build(BuildFlags.ForceBuild); }
+
+ // Clears all spawned instances, but retains the renderData object
+ void ClearSpawnedInstances()
+ {
+ if (layers == null)
+ return;
+
+ for (int layerIdx = 0; layerIdx < layers.Length; ++layerIdx)
+ {
+ Layer layer = layers[layerIdx];
+ for (int chunkIdx = 0; chunkIdx < layer.spriteChannel.chunks.Length; ++chunkIdx)
+ {
+ var chunk = layer.spriteChannel.chunks[chunkIdx];
+
+ if (chunk.gameObject == null)
+ continue;
+
+ var transform = chunk.gameObject.transform;
+ List children = new List();
+ for (int i = 0; i < transform.childCount; ++i)
+ children.Add(transform.GetChild(i));
+ for (int i = 0; i < children.Count; ++i)
+ DestroyImmediate(children[i].gameObject);
+ }
+ }
+ }
+
+ void SetPrefabsRootActive(bool active) {
+ if (prefabsRoot != null)
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ prefabsRoot.SetActiveRecursively(active);
+#else
+ prefabsRoot.SetActive(active);
+#endif
+ }
+
+ public void Build(BuildFlags buildFlags)
+ {
+ if (spriteCollection != null)
+ _spriteCollectionInst = spriteCollection.inst;
+
+
+#if UNITY_EDITOR || !UNITY_FLASH
+ // Sanitize tilePrefabs input, to avoid branches later
+ if (data != null && spriteCollection != null)
+ {
+ if (data.tilePrefabs == null)
+ data.tilePrefabs = new Object[SpriteCollectionInst.Count];
+ else if (data.tilePrefabs.Length != SpriteCollectionInst.Count)
+ System.Array.Resize(ref data.tilePrefabs, SpriteCollectionInst.Count);
+
+ // Fix up data if necessary
+ BuilderUtil.InitDataStore(this);
+ }
+ else
+ {
+ return;
+ }
+
+ // Sanitize sprite collection material ids
+ if (SpriteCollectionInst)
+ SpriteCollectionInst.InitMaterialIds();
+
+ bool forceBuild = (buildFlags & BuildFlags.ForceBuild) != 0;
+
+ // When invalid, everything needs to be rebuilt
+ if (SpriteCollectionInst && SpriteCollectionInst.buildKey != spriteCollectionKey)
+ forceBuild = true;
+
+ if (forceBuild)
+ ClearSpawnedInstances();
+
+ BuilderUtil.CreateRenderData(this, _inEditMode);
+
+ RenderMeshBuilder.Build(this, _inEditMode, forceBuild);
+
+ if (!_inEditMode)
+ {
+ ColliderBuilder.Build(this, forceBuild);
+ BuilderUtil.SpawnPrefabs(this, forceBuild);
+ }
+
+ // Clear dirty flag on everything
+ foreach (var layer in layers)
+ layer.ClearDirtyFlag();
+ if (colorChannel != null)
+ colorChannel.ClearDirtyFlag();
+
+ // Update sprite collection key
+ if (SpriteCollectionInst)
+ spriteCollectionKey = SpriteCollectionInst.buildKey;
+#endif
+ }
+
+ ///
+ /// Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers
+ /// Returns true if the position is within the tilemap bounds
+ ///
+ public bool GetTileAtPosition(Vector3 position, out int x, out int y)
+ {
+ float ox, oy;
+ bool b = GetTileFracAtPosition(position, out ox, out oy);
+ x = (int)ox;
+ y = (int)oy;
+ return b;
+ }
+
+ ///
+ /// Gets the tile coordinate at position. This can be used to obtain tile or color data explicitly from layers
+ /// The fractional value returned is the fraction into the current tile
+ /// Returns true if the position is within the tilemap bounds
+ ///
+ public bool GetTileFracAtPosition(Vector3 position, out float x, out float y)
+ {
+ switch (data.tileType)
+ {
+ case tk2dTileMapData.TileType.Rectangular:
+ {
+ Vector3 localPosition = transform.worldToLocalMatrix.MultiplyPoint(position);
+ x = (localPosition.x - data.tileOrigin.x) / data.tileSize.x;
+ y = (localPosition.y - data.tileOrigin.y) / data.tileSize.y;
+ return (x >= 0 && x <= width && y >= 0 && y <= height);
+ }
+ case tk2dTileMapData.TileType.Isometric:
+ {
+ if (data.tileSize.x == 0.0f)
+ break;
+
+ float tileAngle = Mathf.Atan2(data.tileSize.y, data.tileSize.x / 2.0f);
+
+ Vector3 localPosition = transform.worldToLocalMatrix.MultiplyPoint(position);
+ x = (localPosition.x - data.tileOrigin.x) / data.tileSize.x;
+ y = ((localPosition.y - data.tileOrigin.y) / (data.tileSize.y));
+
+ float fy = y * 0.5f;
+ int iy = (int)fy;
+
+ float fry = fy - iy;
+ float frx = x % 1.0f;
+
+ x = (int)x;
+ y = iy * 2;
+
+ if (frx > 0.5f)
+ {
+ if (fry > 0.5f && Mathf.Atan2(1.0f - fry, (frx - 0.5f) * 2) < tileAngle)
+ y += 1;
+ else if (fry < 0.5f && Mathf.Atan2(fry, (frx - 0.5f) * 2) < tileAngle)
+ y -= 1;
+ }
+ else if (frx < 0.5f)
+ {
+ if (fry > 0.5f && Mathf.Atan2(fry - 0.5f, frx * 2) > tileAngle)
+ {
+ y += 1;
+ x -= 1;
+ }
+
+ if (fry < 0.5f && Mathf.Atan2(fry, (0.5f - frx) * 2) < tileAngle)
+ {
+ y -= 1;
+ x -= 1;
+ }
+ }
+
+ return (x >= 0 && x <= width && y >= 0 && y <= height);
+ }
+ }
+
+ x = 0.0f;
+ y = 0.0f;
+ return false;
+ }
+
+ ///
+ /// Returns the tile position in world space
+ ///
+ public Vector3 GetTilePosition(int x, int y)
+ {
+ switch (data.tileType)
+ {
+ case tk2dTileMapData.TileType.Rectangular:
+ default:
+ {
+ Vector3 localPosition = new Vector3(
+ x * data.tileSize.x + data.tileOrigin.x,
+ y * data.tileSize.y + data.tileOrigin.y,
+ 0);
+ return transform.localToWorldMatrix.MultiplyPoint(localPosition);
+ }
+ case tk2dTileMapData.TileType.Isometric:
+ {
+ Vector3 localPosition = new Vector3(
+ ((float)x + (((y & 1) == 0) ? 0.0f : 0.5f)) * data.tileSize.x + data.tileOrigin.x,
+ y * data.tileSize.y + data.tileOrigin.y,
+ 0);
+ return transform.localToWorldMatrix.MultiplyPoint(localPosition);
+ }
+ }
+ }
+
+ ///
+ /// Gets the tile at position. This can be used to obtain tile data, etc
+ /// -1 = no data or empty tile
+ ///
+ public int GetTileIdAtPosition(Vector3 position, int layer)
+ {
+ if (layer < 0 || layer >= layers.Length)
+ return -1;
+
+ int x, y;
+ if (!GetTileAtPosition(position, out x, out y))
+ return -1;
+
+ return layers[layer].GetTile(x, y);
+ }
+
+ ///
+ /// Returns the tile info chunk for the tile. Use this to store additional metadata
+ ///
+ public tk2dRuntime.TileMap.TileInfo GetTileInfoForTileId(int tileId)
+ {
+ return data.GetTileInfoForSprite(tileId);
+ }
+
+ ///
+ /// Gets the tile at position. This can be used to obtain tile data, etc
+ /// -1 = no data or empty tile
+ ///
+ public Color GetInterpolatedColorAtPosition(Vector3 position)
+ {
+ Vector3 localPosition = transform.worldToLocalMatrix.MultiplyPoint(position);
+ int x = (int)((localPosition.x - data.tileOrigin.x) / data.tileSize.x);
+ int y = (int)((localPosition.y - data.tileOrigin.y) / data.tileSize.y);
+
+ if (colorChannel == null || colorChannel.IsEmpty)
+ return Color.white;
+
+ if (x < 0 || x >= width ||
+ y < 0 || y >= height)
+ {
+ return colorChannel.clearColor;
+ }
+
+ int offset;
+ ColorChunk colorChunk = colorChannel.FindChunkAndCoordinate(x, y, out offset);
+
+ if (colorChunk.Empty)
+ {
+ return colorChannel.clearColor;
+ }
+ else
+ {
+ int colorChunkRowOffset = partitionSizeX + 1;
+ Color tileColorx0y0 = colorChunk.colors[offset];
+ Color tileColorx1y0 = colorChunk.colors[offset + 1];
+ Color tileColorx0y1 = colorChunk.colors[offset + colorChunkRowOffset];
+ Color tileColorx1y1 = colorChunk.colors[offset + colorChunkRowOffset + 1];
+
+ float wx = x * data.tileSize.x + data.tileOrigin.x;
+ float wy = y * data.tileSize.y + data.tileOrigin.y;
+
+ float ix = (localPosition.x - wx) / data.tileSize.x;
+ float iy = (localPosition.y - wy) / data.tileSize.y;
+
+ Color cy0 = Color.Lerp(tileColorx0y0, tileColorx1y0, ix);
+ Color cy1 = Color.Lerp(tileColorx0y1, tileColorx1y1, ix);
+ return Color.Lerp(cy0, cy1, iy);
+ }
+ }
+
+ // ISpriteCollectionBuilder
+ public bool UsesSpriteCollection(tk2dSpriteCollectionData spriteCollection)
+ {
+ return spriteCollection == this.spriteCollection || _spriteCollectionInst == spriteCollection;
+ }
+
+ // We might need to end edit mode when running in game
+ public void EndEditMode()
+ {
+ _inEditMode = false;
+ SetPrefabsRootActive(true);
+ Build(BuildFlags.ForceBuild);
+
+ if (prefabsRoot != null) {
+ GameObject.DestroyImmediate(prefabsRoot);
+ prefabsRoot = null;
+ }
+ }
+
+#if UNITY_EDITOR
+ public void BeginEditMode()
+ {
+ if (layers == null) {
+ _inEditMode = true;
+ return;
+ }
+
+ if (!_inEditMode) {
+ _inEditMode = true;
+
+ // Destroy all children
+ // Only necessary when switching INTO edit mode
+ BuilderUtil.HideTileMapPrefabs(this);
+ SetPrefabsRootActive(false);
+ }
+
+ Build(BuildFlags.ForceBuild);
+ }
+
+ public bool AreSpritesInitialized()
+ {
+ return layers != null;
+ }
+
+ public bool HasColorChannel()
+ {
+ return (colorChannel != null && !colorChannel.IsEmpty);
+ }
+
+ public void CreateColorChannel()
+ {
+ colorChannel = new ColorChannel(width, height, partitionSizeX, partitionSizeY);
+ colorChannel.Create();
+ }
+
+ public void DeleteColorChannel()
+ {
+ colorChannel.Delete();
+ }
+
+ public void DeleteSprites(int layerId, int x0, int y0, int x1, int y1)
+ {
+ x0 = Mathf.Clamp(x0, 0, width - 1);
+ y0 = Mathf.Clamp(y0, 0, height - 1);
+ x1 = Mathf.Clamp(x1, 0, width - 1);
+ y1 = Mathf.Clamp(y1, 0, height - 1);
+ int numTilesX = x1 - x0 + 1;
+ int numTilesY = y1 - y0 + 1;
+ var layer = layers[layerId];
+ for (int y = 0; y < numTilesY; ++y)
+ {
+ for (int x = 0; x < numTilesX; ++x)
+ {
+ layer.SetTile(x0 + x, y0 + y, -1);
+ }
+ }
+
+ layer.OptimizeIncremental();
+ }
+#endif
+
+ public void TouchMesh(Mesh mesh)
+ {
+#if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(mesh);
+#endif
+ }
+
+ public void DestroyMesh(Mesh mesh)
+ {
+#if UNITY_EDITOR
+ if (UnityEditor.AssetDatabase.GetAssetPath(mesh).Length != 0)
+ {
+ mesh.Clear();
+ UnityEditor.AssetDatabase.DeleteAsset(UnityEditor.AssetDatabase.GetAssetPath(mesh));
+ }
+ else
+ {
+ DestroyImmediate(mesh);
+ }
+#else
+ DestroyImmediate(mesh);
+#endif
+ }
+
+ public int GetTilePrefabsListCount() {
+ return tilePrefabsList.Count;
+ }
+
+ public List TilePrefabsList {
+ get {
+ return tilePrefabsList;
+ }
+ }
+
+ public void GetTilePrefabsListItem(int index, out int x, out int y, out int layer, out GameObject instance) {
+ TilemapPrefabInstance item = tilePrefabsList[index];
+ x = item.x;
+ y = item.y;
+ layer = item.layer;
+ instance = item.instance;
+ }
+
+ public void SetTilePrefabsList(List xs, List ys, List layers, List instances) {
+ int n = instances.Count;
+ tilePrefabsList = new List(n);
+ for (int i = 0; i < n; ++i) {
+ TilemapPrefabInstance item = new TilemapPrefabInstance();
+ item.x = xs[i];
+ item.y = ys[i];
+ item.layer = layers[i];
+ item.instance = instances[i];
+ tilePrefabsList.Add(item);
+ }
+ }
+
+ ///
+ /// Gets or sets the layers.
+ ///
+ public Layer[] Layers
+ {
+ get { return layers; }
+ set { layers = value; }
+ }
+
+ ///
+ /// Gets or sets the color channel.
+ ///
+ public ColorChannel ColorChannel
+ {
+ get { return colorChannel; }
+ set { colorChannel = value; }
+ }
+
+ ///
+ /// Gets or sets the prefabs root.
+ ///
+ public GameObject PrefabsRoot
+ {
+ get { return prefabsRoot; }
+ set { prefabsRoot = value; }
+ }
+
+ /// Gets the tile on a layer at x, y
+ /// The tile - either a sprite Id or -1 if the tile is empty.
+ public int GetTile(int x, int y, int layer) {
+ if (layer < 0 || layer >= layers.Length)
+ return -1;
+ return layers[layer].GetTile(x, y);
+ }
+
+ /// Gets the tile flags on a layer at x, y
+ /// The tile flags - a combination of tk2dTileFlags
+ public tk2dTileFlags GetTileFlags(int x, int y, int layer) {
+ if (layer < 0 || layer >= layers.Length)
+ return tk2dTileFlags.None;
+ return layers[layer].GetTileFlags(x, y);
+ }
+
+ /// Sets the tile on a layer at x, y - either a sprite Id or -1 if the tile is empty.
+ public void SetTile(int x, int y, int layer, int tile) {
+ if (layer < 0 || layer >= layers.Length)
+ return;
+ layers[layer].SetTile(x, y, tile);
+ }
+
+ /// Sets the tile flags on a layer at x, y - a combination of tk2dTileFlags
+ public void SetTileFlags(int x, int y, int layer, tk2dTileFlags flags) {
+ if (layer < 0 || layer >= layers.Length)
+ return;
+ layers[layer].SetTileFlags(x, y, flags);
+ }
+
+ /// Clears the tile on a layer at x, y
+ public void ClearTile(int x, int y, int layer) {
+ if (layer < 0 || layer >= layers.Length)
+ return;
+ layers[layer].ClearTile(x, y);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs.meta
new file mode 100644
index 000000000..095fc68e3
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMap.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d77403963ccc13b4bb3544092ec7858f
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -30085
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs
new file mode 100644
index 000000000..b8668deca
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs
@@ -0,0 +1,453 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+#if UNITY_EDITOR || !UNITY_FLASH
+
+namespace tk2dRuntime.TileMap
+{
+ public static class BuilderUtil
+ {
+ /// Syncs layer data and makes sure data is valid
+ public static bool InitDataStore(tk2dTileMap tileMap)
+ {
+ bool dataChanged = false;
+ int numLayers = tileMap.data.NumLayers;
+ if (tileMap.Layers == null)
+ {
+ tileMap.Layers = new Layer[numLayers];
+ for (int i = 0; i < numLayers; ++i)
+ tileMap.Layers[i] = new Layer(tileMap.data.Layers[i].hash, tileMap.width, tileMap.height, tileMap.partitionSizeX, tileMap.partitionSizeY);
+ dataChanged = true;
+ }
+ else
+ {
+ // link up layer hashes
+ Layer[] newLayers = new Layer[numLayers];
+
+ for (int i = 0; i < numLayers; ++i)
+ {
+ var layerInfo = tileMap.data.Layers[i];
+ bool found = false;
+
+ // Find an existing layer with this hash
+ for (int j = 0; j < tileMap.Layers.Length; ++j)
+ {
+ if (tileMap.Layers[j].hash == layerInfo.hash)
+ {
+ newLayers[i] = tileMap.Layers[j];
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ newLayers[i] = new Layer(layerInfo.hash, tileMap.width, tileMap.height, tileMap.partitionSizeX, tileMap.partitionSizeY);
+ }
+
+ // Identify if it has changed
+ int numActiveLayers = 0;
+ foreach (var layer in newLayers)
+ if (!layer.IsEmpty)
+ numActiveLayers++;
+
+ int numPreviousActiveLayers = 0;
+ foreach (var layer in tileMap.Layers)
+ {
+ if (!layer.IsEmpty)
+ numPreviousActiveLayers++;
+ }
+
+ if (numActiveLayers != numPreviousActiveLayers)
+ dataChanged = true;
+
+ tileMap.Layers = newLayers;
+ }
+
+ if (tileMap.ColorChannel == null)
+ {
+ tileMap.ColorChannel = new ColorChannel(tileMap.width, tileMap.height, tileMap.partitionSizeX, tileMap.partitionSizeY);
+ }
+
+ return dataChanged;
+ }
+
+ static List TilePrefabsX;
+ static List TilePrefabsY;
+ static List TilePrefabsLayer;
+ static List TilePrefabsInstance;
+
+ static GameObject GetExistingTilePrefabInstance(tk2dTileMap tileMap, int tileX, int tileY, int tileLayer) {
+ int n = tileMap.GetTilePrefabsListCount();
+ for (int i = 0; i < n; ++i) {
+ int x, y, layer;
+ GameObject instance;
+ tileMap.GetTilePrefabsListItem(i, out x, out y, out layer, out instance);
+ if (x == tileX && y == tileY && layer == tileLayer)
+ return instance;
+ }
+ return null;
+ }
+
+ /// Spawns all prefabs for a given chunk
+ /// Expects the chunk to have a valid GameObject
+ public static void SpawnPrefabsForChunk(tk2dTileMap tileMap, SpriteChunk chunk, int baseX, int baseY, int layer, int[] prefabCounts)
+ {
+ var chunkData = chunk.spriteIds;
+ var tilePrefabs = tileMap.data.tilePrefabs;
+ Vector3 tileSize = tileMap.data.tileSize;
+ var parent = chunk.gameObject.transform;
+
+ float xOffsetMult = 0.0f, yOffsetMult = 0.0f;
+ tileMap.data.GetTileOffset(out xOffsetMult, out yOffsetMult);
+
+ for (int y = 0; y < tileMap.partitionSizeY; ++y)
+ {
+ float xOffset = ((baseY + y) & 1) * xOffsetMult;
+ for (int x = 0; x < tileMap.partitionSizeX; ++x)
+ {
+ int tile = GetTileFromRawTile(chunkData[y * tileMap.partitionSizeX + x]);
+ if (tile < 0 || tile >= tilePrefabs.Length)
+ continue;
+
+ Object prefab = tilePrefabs[tile];
+ if (prefab != null)
+ {
+ prefabCounts[tile]++;
+
+ GameObject instance = GetExistingTilePrefabInstance(tileMap, baseX + x, baseY + y, layer);
+ bool foundExisting = (instance != null);
+
+ if (instance == null) {
+ #if UNITY_EDITOR && !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4)
+ instance = UnityEditor.PrefabUtility.InstantiatePrefab(prefab) as GameObject;
+ #else
+ instance = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.identity) as GameObject;
+ #endif
+ }
+
+ if (instance != null) {
+ GameObject prefabGameObject = prefab as GameObject;
+
+ Vector3 pos = new Vector3(tileSize.x * (x + xOffset), tileSize.y * y, 0);
+ bool enablePrefabOffset = false;
+ var tileInfo = tileMap.data.GetTileInfoForSprite(tile);
+ if (tileInfo != null)
+ enablePrefabOffset = tileInfo.enablePrefabOffset;
+ if (enablePrefabOffset && prefabGameObject != null)
+ pos += prefabGameObject.transform.position;
+
+ if (!foundExisting)
+ instance.name = prefab.name + " " + prefabCounts[tile].ToString();
+
+ instance.transform.parent = parent;
+ instance.transform.localPosition = pos;
+
+ // Add to tilePrefabs list
+ TilePrefabsX.Add(baseX + x);
+ TilePrefabsY.Add(baseY + y);
+ TilePrefabsLayer.Add(layer);
+ TilePrefabsInstance.Add(instance);
+ }
+ }
+ }
+ }
+ }
+
+ /// Spawns all prefabs for a given tilemap
+ /// Expects populated chunks to have valid GameObjects
+ public static void SpawnPrefabs(tk2dTileMap tileMap, bool forceBuild)
+ {
+ // Restart these lists that will be stored in the tileMap tilePrefabsList
+ TilePrefabsX = new List();
+ TilePrefabsY = new List();
+ TilePrefabsLayer = new List();
+ TilePrefabsInstance = new List();
+
+ int[] prefabCounts = new int[tileMap.data.tilePrefabs.Length];
+
+ int numLayers = tileMap.Layers.Length;
+ for (int layerId = 0; layerId < numLayers; ++layerId)
+ {
+ var layer = tileMap.Layers[layerId];
+ var layerData = tileMap.data.Layers[layerId];
+
+ // We skip offsetting the first one
+ if (layer.IsEmpty || layerData.skipMeshGeneration)
+ continue;
+
+ for (int cellY = 0; cellY < layer.numRows; ++cellY)
+ {
+ int baseY = cellY * layer.divY;
+ for (int cellX = 0; cellX < layer.numColumns; ++cellX)
+ {
+ int baseX = cellX * layer.divX;
+ var chunk = layer.GetChunk(cellX, cellY);
+ if (chunk.IsEmpty)
+ continue;
+ if (!forceBuild && !chunk.Dirty)
+ continue;
+
+ SpawnPrefabsForChunk(tileMap, chunk, baseX, baseY, layerId, prefabCounts);
+ }
+ }
+ }
+
+ tileMap.SetTilePrefabsList(TilePrefabsX, TilePrefabsY, TilePrefabsLayer, TilePrefabsInstance);
+ }
+
+ ///
+ /// Moves the chunk's gameobject's children to the prefab root
+ ///
+ public static void HideTileMapPrefabs(tk2dTileMap tileMap) {
+ if (tileMap.renderData == null) {
+ // No Render Data to parent Prefab Root to
+ return;
+ } else {
+ if (tileMap.PrefabsRoot == null) {
+ var go = tileMap.PrefabsRoot = new GameObject("Prefabs");
+ go.transform.parent = tileMap.renderData.transform;
+ go.transform.localPosition = Vector3.zero;
+ go.transform.localRotation = Quaternion.identity;
+ go.transform.localScale = Vector3.one;
+ }
+ }
+
+ if (tileMap.Layers == null)
+ return;
+
+ int instListCount = tileMap.GetTilePrefabsListCount();
+ bool[] instExists = new bool[instListCount];
+
+ for (int i = 0; i < tileMap.Layers.Length; ++i) {
+ var layer = tileMap.Layers[i];
+ for (int j = 0; j < layer.spriteChannel.chunks.Length; ++j) {
+ var chunk = layer.spriteChannel.chunks[j];
+ if (chunk.gameObject == null)
+ continue;
+
+ var t = chunk.gameObject.transform;
+ int childCount = t.childCount;
+ for (int k = 0; k < childCount; ++k) {
+ GameObject go = t.GetChild(k).gameObject;
+ for (int q = 0; q < instListCount; ++q) {
+ int x, y, layerIdx;
+ GameObject instance;
+ tileMap.GetTilePrefabsListItem(q, out x, out y, out layerIdx, out instance);
+ if (instance == go) {
+ instExists[q] = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ List tileX = new List();
+ List tileY = new List();
+ List tileLayer = new List();
+ List tileInst = new List();
+ for (int i = 0; i < instListCount; ++i) {
+ if (instExists[i]) {
+ int x, y, layerIdx;
+ GameObject instance;
+ tileMap.GetTilePrefabsListItem(i, out x, out y, out layerIdx, out instance);
+ tileX.Add(x);
+ tileY.Add(y);
+ tileLayer.Add(layerIdx);
+ tileInst.Add(instance);
+
+ instance.transform.parent = tileMap.PrefabsRoot.transform;
+ }
+ }
+ tileMap.SetTilePrefabsList(tileX, tileY, tileLayer, tileInst);
+ }
+
+ static Vector3 GetTilePosition(tk2dTileMap tileMap, int x, int y)
+ {
+ return new Vector3(tileMap.data.tileSize.x * x, tileMap.data.tileSize.y * y, 0.0f);
+ }
+
+ /// Creates render data for given tilemap
+ public static void CreateRenderData(tk2dTileMap tileMap, bool editMode)
+ {
+ // Create render data
+ if (tileMap.renderData == null)
+ tileMap.renderData = new GameObject(tileMap.name + " Render Data");
+
+ tileMap.renderData.transform.position = tileMap.transform.position;
+
+ float accumulatedLayerZ = 0.0f;
+
+ // Create all objects
+ int layerId = 0;
+ foreach (var layer in tileMap.Layers)
+ {
+ // We skip offsetting the first one
+ float layerInfoZ = tileMap.data.Layers[layerId].z;
+ if (layerId != 0)
+ accumulatedLayerZ -= layerInfoZ;
+
+ if (layer.IsEmpty && layer.gameObject != null)
+ {
+ GameObject.DestroyImmediate(layer.gameObject);
+ layer.gameObject = null;
+ }
+ else if (!layer.IsEmpty && layer.gameObject == null)
+ {
+ var go = layer.gameObject = new GameObject("");
+ go.transform.parent = tileMap.renderData.transform;
+ }
+
+ int unityLayer = tileMap.data.Layers[layerId].unityLayer;
+
+ if (layer.gameObject != null)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (!editMode && layer.gameObject.active == false)
+ layer.gameObject.SetActiveRecursively(true);
+#else
+ if (!editMode && layer.gameObject.activeSelf == false)
+ layer.gameObject.SetActive(true);
+#endif
+
+ layer.gameObject.name = tileMap.data.Layers[layerId].name;
+ layer.gameObject.transform.localPosition = new Vector3(0, 0, tileMap.data.layersFixedZ ? (-layerInfoZ) : accumulatedLayerZ);
+ layer.gameObject.transform.localRotation = Quaternion.identity;
+ layer.gameObject.transform.localScale = Vector3.one;
+ layer.gameObject.layer = unityLayer;
+ }
+
+ int x0, x1, dx;
+ int y0, y1, dy;
+ BuilderUtil.GetLoopOrder(tileMap.data.sortMethod,
+ layer.numColumns, layer.numRows,
+ out x0, out x1, out dx,
+ out y0, out y1, out dy);
+
+ float z = 0.0f;
+ for (int y = y0; y != y1; y += dy)
+ {
+ for (int x = x0; x != x1; x += dx)
+ {
+ var chunk = layer.GetChunk(x, y);
+ bool isEmpty = layer.IsEmpty || chunk.IsEmpty;
+ if (editMode) {
+ isEmpty = false;
+ }
+
+ if (isEmpty && chunk.HasGameData)
+ {
+ chunk.DestroyGameData(tileMap);
+ }
+ else if (!isEmpty && chunk.gameObject == null)
+ {
+ string chunkName = "Chunk " + y.ToString() + " " + x.ToString();
+ var go = chunk.gameObject = new GameObject(chunkName);
+ go.transform.parent = layer.gameObject.transform;
+
+ // render mesh
+ MeshFilter meshFilter = go.AddComponent();
+ go.AddComponent();
+ chunk.mesh = new Mesh();
+ meshFilter.mesh = chunk.mesh;
+
+ // collider mesh
+ chunk.meshCollider = go.AddComponent();
+ chunk.meshCollider.sharedMesh = null;
+ chunk.colliderMesh = null;
+ }
+
+ if (chunk.gameObject != null)
+ {
+ Vector3 tilePosition = GetTilePosition(tileMap, x * tileMap.partitionSizeX, y * tileMap.partitionSizeY);
+ tilePosition.z += z;
+ chunk.gameObject.transform.localPosition = tilePosition;
+ chunk.gameObject.transform.localRotation = Quaternion.identity;
+ chunk.gameObject.transform.localScale = Vector3.one;
+ chunk.gameObject.layer = unityLayer;
+
+ // We won't be generating collider data in edit mode, so clear everything
+ if (editMode)
+ {
+ if (chunk.colliderMesh)
+ chunk.DestroyColliderData(tileMap);
+ }
+ }
+
+ z -= 0.000001f;
+ }
+ }
+
+ ++layerId;
+ }
+ }
+
+ public static void GetLoopOrder(tk2dTileMapData.SortMethod sortMethod, int w, int h, out int x0, out int x1, out int dx, out int y0, out int y1, out int dy)
+ {
+ switch (sortMethod)
+ {
+ case tk2dTileMapData.SortMethod.BottomLeft:
+ x0 = 0; x1 = w; dx = 1;
+ y0 = 0; y1 = h; dy = 1;
+ break;
+ case tk2dTileMapData.SortMethod.BottomRight:
+ x0 = w - 1; x1 = -1; dx = -1;
+ y0 = 0; y1 = h; dy = 1;
+ break;
+ case tk2dTileMapData.SortMethod.TopLeft:
+ x0 = 0; x1 = w; dx = 1;
+ y0 = h - 1; y1 = -1; dy = -1;
+ break;
+ case tk2dTileMapData.SortMethod.TopRight:
+ x0 = w - 1; x1 = -1; dx = -1;
+ y0 = h - 1; y1 = -1; dy = -1;
+ break;
+ default:
+ Debug.LogError("Unhandled sort method");
+ goto case tk2dTileMapData.SortMethod.BottomLeft;
+ }
+ }
+
+ const int tileMask = 0x00ffffff;
+
+ public static int GetTileFromRawTile(int rawTile) {
+ if (rawTile == -1) return -1;
+ return rawTile & tileMask;
+ }
+
+ public static bool IsRawTileFlagSet(int rawTile, tk2dTileFlags flag) {
+ if (rawTile == -1) return false;
+ return (rawTile & (int)flag) != 0;
+ }
+
+ public static void SetRawTileFlag(ref int rawTile, tk2dTileFlags flag, bool setValue) {
+ if (rawTile == -1) return;
+ rawTile = setValue ? (rawTile | (int)flag) : (rawTile & (int)(~flag));
+ }
+
+ public static void InvertRawTileFlag(ref int rawTile, tk2dTileFlags flag) {
+ if (rawTile == -1) return;
+ bool setValue = (rawTile & (int)flag) == 0;
+ rawTile = setValue ? (rawTile | (int)flag) : (rawTile & (int)(~flag));
+ }
+
+ public static Vector3 ApplySpriteVertexTileFlags(tk2dTileMap tileMap, tk2dSpriteDefinition spriteDef, Vector3 pos, bool flipH, bool flipV, bool rot90) {
+ float cx = tileMap.data.tileOrigin.x + 0.5f * tileMap.data.tileSize.x;
+ float cy = tileMap.data.tileOrigin.y + 0.5f * tileMap.data.tileSize.y;
+ float dx = pos.x - cx;
+ float dy = pos.y - cy;
+ if (rot90) {
+ float tmp = dx;
+ dx = dy;
+ dy = -tmp;
+ }
+ if (flipH) dx *= -1.0f;
+ if (flipV) dy *= -1.0f;
+ pos.x = cx + dx;
+ pos.y = cy + dy;
+ return pos;
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs.meta
new file mode 100644
index 000000000..a54950fdd
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapBuilderUtil.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ac77ab74c31426246bd2b1fe5cfd345e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs
new file mode 100644
index 000000000..fdcfe50ab
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs
@@ -0,0 +1,514 @@
+using UnityEngine;
+using System.Collections;
+
+namespace tk2dRuntime.TileMap
+{
+ [System.Serializable]
+ public class LayerSprites
+ {
+ public int[] spriteIds;
+ public LayerSprites()
+ {
+ spriteIds = new int[0];
+ }
+ }
+
+ [System.Serializable]
+ public class SpriteChunk
+ {
+ bool dirty;
+ public int[] spriteIds;
+ public GameObject gameObject;
+ public Mesh mesh;
+ public MeshCollider meshCollider;
+ public Mesh colliderMesh;
+ public SpriteChunk() { spriteIds = new int[0]; }
+
+ public bool Dirty
+ {
+ get { return dirty; }
+ set { dirty = value; }
+ }
+
+ public bool IsEmpty
+ {
+ get { return spriteIds.Length == 0; }
+ }
+
+ public bool HasGameData
+ {
+ get { return gameObject != null || mesh != null || meshCollider != null || colliderMesh != null; }
+ }
+
+ public void DestroyGameData(tk2dTileMap tileMap)
+ {
+ if (mesh != null) tileMap.DestroyMesh(mesh);
+ if (gameObject != null) GameObject.DestroyImmediate(gameObject);
+ gameObject = null;
+ mesh = null;
+
+ DestroyColliderData(tileMap);
+ }
+
+ public void DestroyColliderData(tk2dTileMap tileMap)
+ {
+ if (colliderMesh != null)
+ tileMap.DestroyMesh(colliderMesh);
+ if (meshCollider != null && meshCollider.sharedMesh != null && meshCollider.sharedMesh != colliderMesh)
+ tileMap.DestroyMesh(meshCollider.sharedMesh);
+ if (meshCollider != null) GameObject.DestroyImmediate(meshCollider);
+ meshCollider = null;
+ colliderMesh = null;
+ }
+ }
+
+ [System.Serializable]
+ public class SpriteChannel
+ {
+ public SpriteChunk[] chunks;
+ public SpriteChannel() { chunks = new SpriteChunk[0]; }
+ }
+
+ [System.Serializable]
+ public class ColorChunk
+ {
+ public bool Dirty { get; set; }
+ public bool Empty { get { return colors.Length == 0; } }
+ public Color32[] colors;
+ public ColorChunk() { colors = new Color32[0]; }
+ }
+
+ [System.Serializable]
+ ///
+ /// Color channel.
+ ///
+ public class ColorChannel
+ {
+ public ColorChannel(int width, int height, int divX, int divY)
+ {
+ Init(width, height, divX, divY);
+ }
+
+ public Color clearColor = Color.white;
+ public ColorChunk[] chunks;
+ public ColorChannel() { chunks = new ColorChunk[0]; }
+
+ public void Init(int width, int height, int divX, int divY)
+ {
+ numColumns = (width + divX - 1) / divX;
+ numRows = (height + divY - 1) / divY;
+ chunks = new ColorChunk[0];
+ this.divX = divX;
+ this.divY = divY;
+ }
+
+ public ColorChunk FindChunkAndCoordinate(int x, int y, out int offset)
+ {
+ int cellX = x / divX;
+ int cellY = y / divY;
+ cellX = Mathf.Clamp(cellX, 0, numColumns - 1);
+ cellY = Mathf.Clamp(cellY, 0, numRows - 1);
+ int idx = cellY * numColumns + cellX;
+ var chunk = chunks[idx];
+ int localX = x - cellX * divX;
+ int localY = y - cellY * divY;
+ offset = localY * (divX + 1) + localX;
+ return chunk;
+ }
+
+ ///
+ /// Gets the color.
+ ///
+ /// The color.
+ /// The x coordinate.
+ /// The y coordinate.
+ public Color GetColor(int x, int y)
+ {
+ if (IsEmpty)
+ return clearColor;
+
+ int offset;
+ var chunk = FindChunkAndCoordinate(x, y, out offset);
+ if (chunk.colors.Length == 0)
+ return clearColor;
+ else
+ return chunk.colors[offset];
+ }
+
+ // create chunk if it doesn't already exist
+ void InitChunk(ColorChunk chunk)
+ {
+ if (chunk.colors.Length == 0)
+ {
+ chunk.colors = new Color32[(divX + 1) * (divY + 1)];
+ for (int i = 0; i < chunk.colors.Length; ++i)
+ chunk.colors[i] = clearColor;
+ }
+ }
+
+ ///
+ /// Sets the color.
+ ///
+ /// The x coordinate.
+ /// The y coordinate.
+ /// Color.
+ public void SetColor(int x, int y, Color color)
+ {
+ if (IsEmpty)
+ Create();
+
+ int cellLocalWidth = divX + 1;
+
+ // at edges, set to all overlapping coordinates
+ int cellX = Mathf.Max(x - 1, 0) / divX;
+ int cellY = Mathf.Max(y - 1, 0) / divY;
+ var chunk = GetChunk(cellX, cellY, true);
+ int localX = x - cellX * divX;
+ int localY = y - cellY * divY;
+ chunk.colors[localY * cellLocalWidth + localX] = color;
+ chunk.Dirty = true;
+
+ // May need to set it to adjancent cells too
+ bool needX = false, needY = false;
+ if (x != 0 && (x % divX) == 0 && (cellX + 1) < numColumns)
+ needX = true;
+ if (y != 0 && (y % divY) == 0 && (cellY + 1) < numRows)
+ needY = true;
+
+ if (needX)
+ {
+ int cx = cellX + 1;
+ chunk = GetChunk(cx, cellY, true);
+ localX = x - cx * divX;
+ localY = y - cellY * divY;
+ chunk.colors[localY * cellLocalWidth + localX] = color;
+ chunk.Dirty = true;
+ }
+ if (needY)
+ {
+ int cy = cellY + 1;
+ chunk = GetChunk(cellX, cy, true);
+ localX = x - cellX * divX;
+ localY = y - cy * divY;
+ chunk.colors[localY * cellLocalWidth + localX] = color;
+ chunk.Dirty = true;
+ }
+ if (needX && needY)
+ {
+ int cx = cellX + 1;
+ int cy = cellY + 1;
+ chunk = GetChunk(cx, cy, true);
+ localX = x - cx * divX;
+ localY = y - cy * divY;
+ chunk.colors[localY * cellLocalWidth + localX] = color;
+ chunk.Dirty = true;
+ }
+ }
+
+ public ColorChunk GetChunk(int x, int y)
+ {
+ if (chunks == null || chunks.Length == 0)
+ return null;
+
+ return chunks[y * numColumns + x];
+ }
+
+ public ColorChunk GetChunk(int x, int y, bool init)
+ {
+ if (chunks == null || chunks.Length == 0)
+ return null;
+
+ var chunk = chunks[y * numColumns + x];
+ InitChunk(chunk);
+ return chunk;
+ }
+
+ public void ClearChunk(ColorChunk chunk)
+ {
+ for (int i = 0; i < chunk.colors.Length; ++i)
+ chunk.colors[i] = clearColor;
+ }
+
+ public void ClearDirtyFlag()
+ {
+ foreach (var chunk in chunks)
+ chunk.Dirty = false;
+ }
+
+ ///
+ /// Clear the specified color.
+ ///
+ /// Color.
+ public void Clear(Color color)
+ {
+ clearColor = color;
+ foreach (var chunk in chunks)
+ ClearChunk(chunk);
+ Optimize();
+ }
+
+ public void Delete()
+ {
+ chunks = new ColorChunk[0];
+ }
+
+ public void Create()
+ {
+ chunks = new ColorChunk[numColumns * numRows];
+ for (int i = 0; i < chunks.Length; ++i)
+ chunks[i] = new ColorChunk();
+ }
+
+ void Optimize(ColorChunk chunk)
+ {
+ bool empty = true;
+ Color32 clearColor32 = this.clearColor;
+ foreach (var c in chunk.colors)
+ {
+ if (c.r != clearColor32.r ||
+ c.g != clearColor32.g ||
+ c.b != clearColor32.b ||
+ c.a != clearColor32.a)
+ {
+ empty = false;
+ break;
+ }
+ }
+
+ if (empty)
+ chunk.colors = new Color32[0];
+ }
+
+ public void Optimize()
+ {
+ foreach (var chunk in chunks)
+ Optimize(chunk);
+ }
+
+ public bool IsEmpty { get { return chunks.Length == 0; } }
+
+ public int NumActiveChunks
+ {
+ get
+ {
+ int numActiveChunks = 0;
+ foreach (var chunk in chunks)
+ if (chunk != null && chunk.colors != null && chunk.colors.Length > 0)
+ numActiveChunks++;
+ return numActiveChunks;
+ }
+ }
+
+ public int numColumns, numRows;
+ public int divX, divY;
+ }
+
+ [System.Serializable]
+ ///
+ /// Layer.
+ ///
+ public class Layer
+ {
+ public int hash;
+ public SpriteChannel spriteChannel;
+ public Layer(int hash, int width, int height, int divX, int divY)
+ {
+ spriteChannel = new SpriteChannel();
+ Init(hash, width, height, divX, divY);
+ }
+
+ public void Init(int hash, int width, int height, int divX, int divY)
+ {
+ this.divX = divX;
+ this.divY = divY;
+ this.hash = hash;
+ this.numColumns = (width + divX - 1) / divX;
+ this.numRows = (height + divY - 1) / divY;
+ this.width = width;
+ this.height = height;
+ spriteChannel.chunks = new SpriteChunk[numColumns * numRows];
+ for (int i = 0; i < numColumns * numRows; ++i)
+ spriteChannel.chunks[i] = new SpriteChunk();
+ }
+
+ public bool IsEmpty { get { return spriteChannel.chunks.Length == 0; } }
+
+ public void Create()
+ {
+ spriteChannel.chunks = new SpriteChunk[numColumns * numRows];
+ }
+
+ public int[] GetChunkData(int x, int y)
+ {
+ return GetChunk(x, y).spriteIds;
+ }
+
+ public SpriteChunk GetChunk(int x, int y)
+ {
+ return spriteChannel.chunks[y * numColumns + x];
+ }
+
+ SpriteChunk FindChunkAndCoordinate(int x, int y, out int offset)
+ {
+ int cellX = x / divX;
+ int cellY = y / divY;
+ var chunk = spriteChannel.chunks[cellY * numColumns + cellX];
+ int localX = x - cellX * divX;
+ int localY = y - cellY * divY;
+ offset = localY * divX + localX;
+ return chunk;
+ }
+
+ const int tileMask = 0x00ffffff;
+ const int flagMask = unchecked((int)0xff000000);
+
+ private bool GetRawTileValue(int x, int y, ref int value) {
+ int offset;
+ SpriteChunk chunk = FindChunkAndCoordinate(x, y, out offset);
+ if (chunk.spriteIds == null || chunk.spriteIds.Length == 0)
+ return false;
+ value = chunk.spriteIds[offset];
+ return true;
+ }
+
+ private void SetRawTileValue(int x, int y, int value) {
+ int offset;
+ SpriteChunk chunk = FindChunkAndCoordinate(x, y, out offset);
+ if (chunk != null) {
+ CreateChunk(chunk);
+ chunk.spriteIds[offset] = value;
+ chunk.Dirty = true;
+ }
+ }
+
+ // Get functions
+
+ /// Gets the tile at x, y
+ /// The tile - either a sprite Id or -1 if the tile is empty.
+ public int GetTile(int x, int y) {
+ int rawTileValue = 0;
+ if (GetRawTileValue(x, y, ref rawTileValue)) {
+ if (rawTileValue != -1) {
+ return rawTileValue & tileMask;
+ }
+ }
+ return -1;
+ }
+
+ /// Gets the tile flags at x, y
+ /// The tile flags - a combination of tk2dTileFlags
+ public tk2dTileFlags GetTileFlags(int x, int y) {
+ int rawTileValue = 0;
+ if (GetRawTileValue(x, y, ref rawTileValue)) {
+ if (rawTileValue != -1) {
+ return (tk2dTileFlags)(rawTileValue & flagMask);
+ }
+ }
+ return tk2dTileFlags.None;
+ }
+
+ /// Gets the raw tile value at x, y
+ /// Either a combination of Tile and flags or -1 if the tile is empty
+ public int GetRawTile(int x, int y) {
+ int rawTileValue = 0;
+ if (GetRawTileValue(x, y, ref rawTileValue)) {
+ return rawTileValue;
+ }
+ return -1;
+ }
+
+ // Set functions
+
+ /// Sets the tile at x, y - either a sprite Id or -1 if the tile is empty.
+ public void SetTile(int x, int y, int tile) {
+ tk2dTileFlags currentFlags = GetTileFlags(x, y);
+ int rawTileValue = (tile == -1) ? -1 : (tile | (int)currentFlags);
+ SetRawTileValue(x, y, rawTileValue);
+ }
+
+ /// Sets the tile flags at x, y - a combination of tk2dTileFlags
+ public void SetTileFlags(int x, int y, tk2dTileFlags flags) {
+ int currentTile = GetTile(x, y);
+ if (currentTile != -1) {
+ int rawTileValue = currentTile | (int)flags;
+ SetRawTileValue(x, y, rawTileValue);
+ }
+ }
+
+ /// Clears the tile at x, y
+ public void ClearTile(int x, int y) {
+ SetTile(x, y, -1);
+ }
+
+ /// Sets the raw tile value at x, y
+ /// Either a combination of Tile and flags or -1 if the tile is empty
+ public void SetRawTile(int x, int y, int rawTile) {
+ SetRawTileValue(x, y, rawTile);
+ }
+
+
+
+ void CreateChunk(SpriteChunk chunk)
+ {
+ if (chunk.spriteIds == null || chunk.spriteIds.Length == 0)
+ {
+ chunk.spriteIds = new int[divX * divY];
+ for (int i = 0; i < divX * divY; ++i)
+ chunk.spriteIds[i] = -1;
+ }
+ }
+
+ void Optimize(SpriteChunk chunk)
+ {
+ bool empty = true;
+ foreach (var v in chunk.spriteIds)
+ {
+ if (v != -1)
+ {
+ empty = false;
+ break;
+ }
+ }
+ if (empty)
+ chunk.spriteIds = new int[0];
+ }
+
+ public void Optimize()
+ {
+ foreach (var chunk in spriteChannel.chunks)
+ Optimize(chunk);
+ }
+
+ public void OptimizeIncremental()
+ {
+ foreach (var chunk in spriteChannel.chunks)
+ {
+ if (chunk.Dirty)
+ Optimize(chunk);
+ }
+ }
+
+ public void ClearDirtyFlag()
+ {
+ foreach (var chunk in spriteChannel.chunks)
+ chunk.Dirty = false;
+ }
+
+ public int NumActiveChunks
+ {
+ get
+ {
+ int numActiveChunks = 0;
+ foreach (var chunk in spriteChannel.chunks)
+ if (!chunk.IsEmpty)
+ numActiveChunks++;
+ return numActiveChunks;
+ }
+ }
+
+ public int width, height;
+ public int numColumns, numRows;
+ public int divX, divY;
+ public GameObject gameObject;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs.meta
new file mode 100644
index 000000000..3d0339c77
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapChunks.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 836470520c7a845cd9f6c72791ea25e5
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs
new file mode 100644
index 000000000..60b805368
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs
@@ -0,0 +1,299 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+#if UNITY_EDITOR || !UNITY_FLASH
+
+namespace tk2dRuntime.TileMap
+{
+ public static class ColliderBuilder
+ {
+ public static void Build(tk2dTileMap tileMap, bool forceBuild)
+ {
+ bool incremental = !forceBuild;
+ int numLayers = tileMap.Layers.Length;
+ for (int layerId = 0; layerId < numLayers; ++layerId)
+ {
+ var layer = tileMap.Layers[layerId];
+ if (layer.IsEmpty || !tileMap.data.Layers[layerId].generateCollider)
+ continue;
+
+ for (int cellY = 0; cellY < layer.numRows; ++cellY)
+ {
+ int baseY = cellY * layer.divY;
+ for (int cellX = 0; cellX < layer.numColumns; ++cellX)
+ {
+ int baseX = cellX * layer.divX;
+ var chunk = layer.GetChunk(cellX, cellY);
+
+ if (incremental && !chunk.Dirty)
+ continue;
+
+ if (chunk.IsEmpty)
+ continue;
+
+ BuildForChunk(tileMap, chunk, baseX, baseY);
+
+ PhysicMaterial material = tileMap.data.Layers[layerId].physicMaterial;
+ if (material != null)
+ chunk.meshCollider.sharedMaterial = material;
+ }
+ }
+ }
+ }
+
+ public static void BuildForChunk(tk2dTileMap tileMap, SpriteChunk chunk, int baseX, int baseY)
+ {
+ // Build local mesh
+ Vector3[] localMeshVertices = new Vector3[0];
+ int[] localMeshIndices = new int[0];
+ BuildLocalMeshForChunk(tileMap, chunk, baseX, baseY, ref localMeshVertices, ref localMeshIndices);
+
+ // only process when there are more than two triangles
+ // avoids a lot of branches later
+ if (localMeshIndices.Length > 6)
+ {
+ // Remove duplicate verts
+ localMeshVertices = WeldVertices(localMeshVertices, ref localMeshIndices);
+
+ // Remove duplicate and back-to-back faces
+ // Removes inside faces
+ localMeshIndices = RemoveDuplicateFaces(localMeshIndices);
+
+ // Merge coplanar faces
+ // Optimize (remove unused vertices, reindex)
+ }
+
+ if (localMeshVertices.Length > 0)
+ {
+ if (chunk.colliderMesh != null)
+ {
+ GameObject.DestroyImmediate(chunk.colliderMesh);
+ chunk.colliderMesh = null;
+ }
+
+ if (chunk.meshCollider == null)
+ {
+ chunk.meshCollider = chunk.gameObject.GetComponent();
+ if (chunk.meshCollider == null)
+ chunk.meshCollider = chunk.gameObject.AddComponent();
+ }
+
+ chunk.colliderMesh = new Mesh();
+ chunk.colliderMesh.vertices = localMeshVertices;
+ chunk.colliderMesh.triangles = localMeshIndices;
+
+ chunk.colliderMesh.RecalculateBounds();
+
+ chunk.meshCollider.sharedMesh = chunk.colliderMesh;
+ }
+ else
+ {
+ chunk.DestroyColliderData(tileMap);
+ }
+ }
+
+ // Builds an unoptimized mesh for this chunk
+ static void BuildLocalMeshForChunk(tk2dTileMap tileMap, SpriteChunk chunk, int baseX, int baseY, ref Vector3[] vertices, ref int[] indices)
+ {
+ List vertexList = new List();
+ List indexList = new List();
+
+ int spriteCount = tileMap.SpriteCollectionInst.spriteDefinitions.Length;
+ Vector3 tileSize = tileMap.data.tileSize;
+
+ var tilePrefabs = tileMap.data.tilePrefabs;
+
+ float xOffsetMult = 0.0f, yOffsetMult = 0.0f;
+ tileMap.data.GetTileOffset(out xOffsetMult, out yOffsetMult);
+
+ var chunkData = chunk.spriteIds;
+ for (int y = 0; y < tileMap.partitionSizeY; ++y)
+ {
+ float xOffset = ((baseY + y) & 1) * xOffsetMult;
+ for (int x = 0; x < tileMap.partitionSizeX; ++x)
+ {
+ int spriteId = chunkData[y * tileMap.partitionSizeX + x];
+ int spriteIdx = BuilderUtil.GetTileFromRawTile(spriteId);
+ Vector3 currentPos = new Vector3(tileSize.x * (x + xOffset), tileSize.y * y, 0);
+
+ if (spriteIdx < 0 || spriteIdx >= spriteCount)
+ continue;
+
+ if (tilePrefabs[spriteIdx])
+ continue;
+
+ bool flipH = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.FlipX);
+ bool flipV = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.FlipY);
+ bool rot90 = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.Rot90);
+
+ bool reverseIndices = false;
+ if (flipH) reverseIndices = !reverseIndices;
+ if (flipV) reverseIndices = !reverseIndices;
+
+ var spriteData = tileMap.SpriteCollectionInst.spriteDefinitions[spriteIdx];
+ int baseVertexIndex = vertexList.Count;
+
+ if (spriteData.colliderType == tk2dSpriteDefinition.ColliderType.Box)
+ {
+ Vector3 origin = spriteData.colliderVertices[0];
+ Vector3 extents = spriteData.colliderVertices[1];
+ Vector3 min = origin - extents;
+ Vector3 max = origin + extents;
+
+ Vector3[] pos = new Vector3[8];
+ pos[0] = new Vector3(min.x, min.y, min.z);
+ pos[1] = new Vector3(min.x, min.y, max.z);
+ pos[2] = new Vector3(max.x, min.y, min.z);
+ pos[3] = new Vector3(max.x, min.y, max.z);
+ pos[4] = new Vector3(min.x, max.y, min.z);
+ pos[5] = new Vector3(min.x, max.y, max.z);
+ pos[6] = new Vector3(max.x, max.y, min.z);
+ pos[7] = new Vector3(max.x, max.y, max.z);
+ for (int i = 0; i < 8; ++i) {
+ Vector3 flippedPos = BuilderUtil.ApplySpriteVertexTileFlags(tileMap, spriteData, pos[i], flipH, flipV, rot90);
+ vertexList.Add (flippedPos + currentPos);
+ }
+
+ // int[] indicesBack = { 0, 1, 2, 2, 1, 3, 6, 5, 4, 7, 5, 6, 3, 7, 6, 2, 3, 6, 4, 5, 1, 4, 1, 0 };
+ int[] indicesFwd = { 2, 1, 0, 3, 1, 2, 4, 5, 6, 6, 5, 7, 6, 7, 3, 6, 3, 2, 1, 5, 4, 0, 1, 4 };
+
+ var srcIndices = indicesFwd;
+ for (int i = 0; i < srcIndices.Length; ++i)
+ {
+ int j = reverseIndices ? (srcIndices.Length - 1 - i) : i;
+ indexList.Add(baseVertexIndex + srcIndices[j]);
+ }
+ }
+ else if (spriteData.colliderType == tk2dSpriteDefinition.ColliderType.Mesh)
+ {
+ for (int i = 0; i < spriteData.colliderVertices.Length; ++i)
+ {
+ Vector3 flippedPos = BuilderUtil.ApplySpriteVertexTileFlags(tileMap, spriteData, spriteData.colliderVertices[i], flipH, flipV, rot90);
+ vertexList.Add(flippedPos + currentPos);
+ }
+
+ var srcIndices = spriteData.colliderIndicesFwd;
+ for (int i = 0; i < srcIndices.Length; ++i)
+ {
+ int j = reverseIndices ? (srcIndices.Length - 1 - i) : i;
+ indexList.Add(baseVertexIndex + srcIndices[j]);
+ }
+ }
+ }
+ }
+
+ vertices = vertexList.ToArray();
+ indices = indexList.ToArray();
+ }
+
+ static int CompareWeldVertices(Vector3 a, Vector3 b)
+ {
+ // Compare one component at a time, using epsilon
+ float epsilon = 0.01f;
+ float dx = a.x - b.x;
+ if (Mathf.Abs(dx) > epsilon) return (int)Mathf.Sign(dx);
+ float dy = a.y - b.y;
+ if (Mathf.Abs(dy) > epsilon) return (int)Mathf.Sign(dy);
+ float dz = a.z - b.z;
+ if (Mathf.Abs(dz) > epsilon) return (int)Mathf.Sign(dz);
+ return 0;
+ }
+
+ static Vector3[] WeldVertices(Vector3[] vertices, ref int[] indices)
+ {
+ // Sort by x, y and z
+ // Adjacent values could be the same after this sort
+ int[] sortIndex = new int[vertices.Length];
+ for (int i = 0; i < vertices.Length; ++i)
+ {
+ sortIndex[i] = i;
+ }
+ System.Array.Sort(sortIndex, (a, b) => CompareWeldVertices(vertices[a], vertices[b]) );
+
+ // Step through the list, comparing current with previous value
+ // If they are the same, use the current index
+ // Otherwise add a new vertex to the vertex list, and use this index
+ // Welding all similar vertices
+ List newVertices = new List();
+ int[] vertexRemap = new int[vertices.Length];
+ // prime first value
+ Vector3 previousValue = vertices[sortIndex[0]];
+ newVertices.Add(previousValue);
+ vertexRemap[sortIndex[0]] = newVertices.Count - 1;
+ for (int i = 1; i < sortIndex.Length; ++i)
+ {
+ Vector3 v = vertices[sortIndex[i]];
+ if (CompareWeldVertices(v, previousValue) != 0)
+ {
+ // add new vertex
+ previousValue = v;
+ newVertices.Add(previousValue);
+ vertexRemap[sortIndex[i]] = newVertices.Count - 1;
+ }
+ vertexRemap[sortIndex[i]] = newVertices.Count - 1;
+ }
+
+ // remap indices
+ for (int i = 0; i < indices.Length; ++i)
+ {
+ indices[i] = vertexRemap[indices[i]];
+ }
+
+ return newVertices.ToArray();
+ }
+
+ static int CompareDuplicateFaces(int[] indices, int face0index, int face1index)
+ {
+ for (int i = 0; i < 3; ++i)
+ {
+ int d = indices[face0index + i] - indices[face1index + i];
+ if (d != 0) return d;
+ }
+ return 0;
+ }
+
+ static int[] RemoveDuplicateFaces(int[] indices)
+ {
+ // Create an ascending sorted list of face indices
+ // If 2 sets of indices are identical, then the faces share the same vertices, and either
+ // is a duplicate, or back-to-back
+ int[] sortedFaceIndices = new int[indices.Length];
+ for (int i = 0; i < indices.Length; i += 3)
+ {
+ int[] faceIndices = { indices[i], indices[i + 1], indices[i + 2] };
+ System.Array.Sort(faceIndices);
+ sortedFaceIndices[i] = faceIndices[0];
+ sortedFaceIndices[i+1] = faceIndices[1];
+ sortedFaceIndices[i+2] = faceIndices[2];
+ }
+
+ // Sort by faces
+ int[] sortIndex = new int[indices.Length / 3];
+ for (int i = 0; i < indices.Length; i += 3)
+ {
+ sortIndex[i / 3] = i;
+ }
+ System.Array.Sort(sortIndex, (a, b) => CompareDuplicateFaces(sortedFaceIndices, a, b));
+
+ List newIndices = new List();
+ for (int i = 0; i < sortIndex.Length; ++i)
+ {
+ if (i != sortIndex.Length - 1 && CompareDuplicateFaces(sortedFaceIndices, sortIndex[i], sortIndex[i+1]) == 0)
+ {
+ // skip both faces
+ // this will fail in the case where there are 3 coplanar faces
+ // but that is probably likely user error / intentional
+ i++;
+ continue;
+ }
+
+ for (int j = 0; j < 3; ++j)
+ newIndices.Add(indices[sortIndex[i] + j]);
+ }
+
+ return newIndices.ToArray();
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs.meta
new file mode 100644
index 000000000..1c6e940e7
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapColliderBuilder.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 603293c8df6842541a2c131b1247f541
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs
new file mode 100644
index 000000000..d76e7bbf1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs
@@ -0,0 +1,150 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+namespace tk2dRuntime.TileMap
+{
+ [System.Serializable]
+ public class LayerInfo
+ {
+ public string name;
+ public int hash;
+ public bool useColor;
+ public bool generateCollider;
+ public float z = 0.1f;
+ public int unityLayer = 0;
+ public bool skipMeshGeneration = false;
+ public PhysicMaterial physicMaterial = null;
+
+ public LayerInfo()
+ {
+ unityLayer = 0;
+ useColor = true;
+ generateCollider = true;
+ skipMeshGeneration = false;
+ }
+ }
+
+ [System.Serializable]
+ public class TileInfo
+ {
+ public string stringVal = "";
+ public int intVal;
+ public float floatVal;
+ public bool enablePrefabOffset;
+ }
+}
+
+public class tk2dTileMapData : ScriptableObject
+{
+ // Start at this point
+ public enum SortMethod
+ {
+ BottomLeft,
+ TopLeft,
+ BottomRight,
+ TopRight,
+ }
+
+ // Tile type
+ public enum TileType
+ {
+ Rectangular,
+ Isometric, // isometric tiles, offset in horizontal axis
+ }
+
+ public Vector3 tileSize;
+ public Vector3 tileOrigin;
+
+ public TileType tileType = TileType.Rectangular;
+
+ public SortMethod sortMethod = SortMethod.BottomLeft;
+
+ public bool layersFixedZ = false;
+
+ public Object[] tilePrefabs = new Object[0];
+ [SerializeField]
+ tk2dRuntime.TileMap.TileInfo[] tileInfo = new tk2dRuntime.TileMap.TileInfo[0];
+
+ [SerializeField]
+ public List tileMapLayers = new List();
+
+ public int NumLayers
+ {
+ get
+ {
+ if (tileMapLayers == null || tileMapLayers.Count == 0)
+ InitLayers();
+ return tileMapLayers.Count;
+ }
+ }
+
+ public tk2dRuntime.TileMap.LayerInfo[] Layers
+ {
+ get
+ {
+ if (tileMapLayers == null || tileMapLayers.Count == 0)
+ InitLayers();
+ return tileMapLayers.ToArray();
+ }
+ }
+
+ public tk2dRuntime.TileMap.TileInfo GetTileInfoForSprite(int tileId)
+ {
+ if (tileInfo == null || tileId < 0 || tileId >= tileInfo.Length)
+ return null;
+
+ return tileInfo[tileId];
+ }
+
+ public tk2dRuntime.TileMap.TileInfo[] GetOrCreateTileInfo(int numTiles)
+ {
+#if UNITY_EDITOR || !UNITY_FLASH
+ bool needInit = false;
+ if (tileInfo == null)
+ {
+ tileInfo = new tk2dRuntime.TileMap.TileInfo[numTiles];
+ needInit = true;
+ }
+ else if (tileInfo.Length != numTiles)
+ {
+ System.Array.Resize(ref tileInfo, numTiles);
+ needInit = true;
+ }
+
+ if (needInit)
+ {
+ for (int i = 0; i < tileInfo.Length; ++i)
+ {
+ if (tileInfo[i] == null)
+ tileInfo[i] = new tk2dRuntime.TileMap.TileInfo();
+ }
+ }
+#endif
+
+ return tileInfo;
+ }
+
+ public void GetTileOffset(out float x, out float y)
+ {
+ switch (tileType)
+ {
+ case TileType.Isometric: x = 0.5f; y = 0.0f; break;
+// case TileType.HexHoritonal: x = 0.5f; y = 0.0f; break;
+
+ case TileType.Rectangular:
+ default:
+ x = 0.0f; y = 0.0f; break;
+ }
+ }
+
+ void InitLayers()
+ {
+ tileMapLayers = new List();
+ var newLayer = new tk2dRuntime.TileMap.LayerInfo();
+ newLayer = new tk2dRuntime.TileMap.LayerInfo();
+ newLayer.name = "Layer 0";
+ newLayer.hash = 0x70d32b98;
+ newLayer.z = 0.0f;
+ tileMapLayers.Add(newLayer);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs.meta
new file mode 100644
index 000000000..5650d9a1c
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapData.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fb356b9a6a1da084695128b00c8721be
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs
new file mode 100644
index 000000000..c253b79ae
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs
@@ -0,0 +1,197 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+#if UNITY_EDITOR || !UNITY_FLASH
+
+namespace tk2dRuntime.TileMap
+{
+ public static class RenderMeshBuilder
+ {
+ public static void BuildForChunk(tk2dTileMap tileMap, SpriteChunk chunk, ColorChunk colorChunk, bool useColor, bool skipPrefabs, int baseX, int baseY)
+ {
+ List meshVertices = new List();
+ List meshColors = new List();
+ List meshUvs = new List();
+ //List meshIndices = new List();
+
+ int[] spriteIds = chunk.spriteIds;
+ Vector3 tileSize = tileMap.data.tileSize;
+ int spriteCount = tileMap.SpriteCollectionInst.spriteDefinitions.Length;
+ Object[] tilePrefabs = tileMap.data.tilePrefabs;
+
+ Color32 clearColor = (useColor && tileMap.ColorChannel != null)?tileMap.ColorChannel.clearColor:Color.white;
+
+ // revert to no color mode (i.e. fill with clear color) when there isn't a color channel, or it is empty
+ if (colorChunk == null || colorChunk.colors.Length == 0)
+ useColor = false;
+
+ int x0, x1, dx;
+ int y0, y1, dy;
+ BuilderUtil.GetLoopOrder(tileMap.data.sortMethod,
+ tileMap.partitionSizeX, tileMap.partitionSizeY,
+ out x0, out x1, out dx,
+ out y0, out y1, out dy);
+
+ float xOffsetMult = 0.0f, yOffsetMult = 0.0f;
+ tileMap.data.GetTileOffset(out xOffsetMult, out yOffsetMult);
+
+ List[] meshIndices = new List[tileMap.SpriteCollectionInst.materials.Length];
+ for (int j = 0; j < meshIndices.Length; ++j)
+ meshIndices[j] = new List();
+
+ int colorChunkSize = tileMap.partitionSizeX + 1;
+ for (int y = y0; y != y1; y += dy)
+ {
+ float xOffset = ((baseY + y) & 1) * xOffsetMult;
+ for (int x = x0; x != x1; x += dx)
+ {
+ int spriteId = spriteIds[y * tileMap.partitionSizeX + x];
+ int tile = BuilderUtil.GetTileFromRawTile(spriteId);
+ bool flipH = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.FlipX);
+ bool flipV = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.FlipY);
+ bool rot90 = BuilderUtil.IsRawTileFlagSet(spriteId, tk2dTileFlags.Rot90);
+
+ Vector3 currentPos = new Vector3(tileSize.x * (x + xOffset), tileSize.y * y, 0);
+
+ if (tile < 0 || tile >= spriteCount)
+ continue;
+
+ if (skipPrefabs && tilePrefabs[tile])
+ continue;
+
+ var sprite = tileMap.SpriteCollectionInst.spriteDefinitions[tile];
+
+ int baseVertex = meshVertices.Count;
+ for (int v = 0; v < sprite.positions.Length; ++v)
+ {
+ Vector3 flippedPos = BuilderUtil.ApplySpriteVertexTileFlags(tileMap, sprite, sprite.positions[v], flipH, flipV, rot90);
+
+ if (useColor)
+ {
+ Color tileColorx0y0 = colorChunk.colors[y * colorChunkSize + x];
+ Color tileColorx1y0 = colorChunk.colors[y * colorChunkSize + x + 1];
+ Color tileColorx0y1 = colorChunk.colors[(y + 1) * colorChunkSize + x];
+ Color tileColorx1y1 = colorChunk.colors[(y + 1) * colorChunkSize + (x + 1)];
+
+ Vector3 centeredSpriteVertex = flippedPos - sprite.untrimmedBoundsData[0];
+ Vector3 alignedSpriteVertex = centeredSpriteVertex + tileMap.data.tileSize * 0.5f;
+ float tileColorX = Mathf.Clamp01(alignedSpriteVertex.x / tileMap.data.tileSize.x);
+ float tileColorY = Mathf.Clamp01(alignedSpriteVertex.y / tileMap.data.tileSize.y);
+
+ Color color = Color.Lerp(
+ Color.Lerp(tileColorx0y0, tileColorx1y0, tileColorX),
+ Color.Lerp(tileColorx0y1, tileColorx1y1, tileColorX),
+ tileColorY);
+ meshColors.Add(color);
+ }
+ else
+ {
+ meshColors.Add(clearColor);
+ }
+
+ meshVertices.Add(currentPos + flippedPos);
+ meshUvs.Add(sprite.uvs[v]);
+ }
+
+ bool reverseIndices = false; // flipped?
+ if (flipH) reverseIndices = !reverseIndices;
+ if (flipV) reverseIndices = !reverseIndices;
+
+ List indices = meshIndices[sprite.materialId];
+ for (int i = 0; i < sprite.indices.Length; ++i) {
+ int j = reverseIndices ? (sprite.indices.Length - 1 - i) : i;
+ indices.Add(baseVertex + sprite.indices[j]);
+ }
+
+ }
+ }
+
+ if (chunk.mesh == null)
+ chunk.mesh = new Mesh();
+
+ chunk.mesh.vertices = meshVertices.ToArray();
+ chunk.mesh.uv = meshUvs.ToArray();
+ chunk.mesh.colors = meshColors.ToArray();
+
+ List materials = new List();
+ int materialId = 0;
+ int subMeshCount = 0;
+ foreach (var indices in meshIndices)
+ {
+ if (indices.Count > 0)
+ {
+ materials.Add(tileMap.SpriteCollectionInst.materials[materialId]);
+ subMeshCount++;
+ }
+ materialId++;
+ }
+ if (subMeshCount > 0)
+ {
+ chunk.mesh.subMeshCount = subMeshCount;
+ chunk.gameObject.renderer.materials = materials.ToArray();
+ int subMeshId = 0;
+ foreach (var indices in meshIndices)
+ {
+ if (indices.Count > 0)
+ {
+ chunk.mesh.SetTriangles(indices.ToArray(), subMeshId);
+ subMeshId++;
+ }
+ }
+ }
+
+ chunk.mesh.RecalculateBounds();
+
+ var meshFilter = chunk.gameObject.GetComponent();
+ meshFilter.sharedMesh = chunk.mesh;
+ }
+
+ public static void Build(tk2dTileMap tileMap, bool editMode, bool forceBuild)
+ {
+ bool skipPrefabs = editMode?false:true;
+ bool incremental = !forceBuild;
+ int numLayers = tileMap.data.NumLayers;
+
+ for (int layerId = 0; layerId < numLayers; ++layerId)
+ {
+ var layer = tileMap.Layers[layerId];
+ if (layer.IsEmpty)
+ continue;
+
+ var layerData = tileMap.data.Layers[layerId];
+ bool useColor = !tileMap.ColorChannel.IsEmpty && tileMap.data.Layers[layerId].useColor;
+
+ for (int cellY = 0; cellY < layer.numRows; ++cellY)
+ {
+ int baseY = cellY * layer.divY;
+ for (int cellX = 0; cellX < layer.numColumns; ++cellX)
+ {
+ int baseX = cellX * layer.divX;
+ var chunk = layer.GetChunk(cellX, cellY);
+
+ ColorChunk colorChunk = tileMap.ColorChannel.GetChunk(cellX, cellY);
+
+ bool colorChunkDirty = (colorChunk != null) && colorChunk.Dirty;
+ if (incremental && !colorChunkDirty && !chunk.Dirty)
+ continue;
+
+ if (chunk.mesh != null)
+ chunk.mesh.Clear();
+
+ if (chunk.IsEmpty)
+ continue;
+
+ if (editMode ||
+ (!editMode && !layerData.skipMeshGeneration))
+ BuildForChunk(tileMap, chunk, colorChunk, useColor, skipPrefabs, baseX, baseY);
+
+ if (chunk.mesh != null)
+ tileMap.TouchMesh(chunk.mesh);
+ }
+ }
+ }
+ }
+ }
+}
+
+#endif
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs.meta b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs.meta
new file mode 100644
index 000000000..d9bd1dfcb
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dTileMap/Code/tk2dTileMapMeshBuilder.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 240ff6cddfe6aca498b861d1b1a458c4
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI.meta b/Chromacore/Assets/Plugins/tk2dUI.meta
new file mode 100644
index 000000000..1723e326f
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: f0348ef308dc020439cb8c5499440c28
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code.meta b/Chromacore/Assets/Plugins/tk2dUI/Code.meta
new file mode 100644
index 000000000..bdeacc8f5
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 857b0d178385f4841833d456f18514c2
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls.meta
new file mode 100644
index 000000000..00add9d73
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 199bb34d67b7d9740aeb3a9f023d8ab6
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs
new file mode 100644
index 000000000..51e757c9e
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs
@@ -0,0 +1,59 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Button base class. Button controls can extend this to get some base level structure and inspector editor support
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIBaseItemControl")]
+public abstract class tk2dUIBaseItemControl : MonoBehaviour
+{
+ ///
+ /// Button(uiItem) for this control
+ ///
+ public tk2dUIItem uiItem;
+
+ public GameObject SendMessageTarget {
+ get {
+ if (uiItem != null) {
+ return uiItem.sendMessageTarget;
+ }
+ else return null;
+ }
+ set {
+ if (uiItem != null) {
+ uiItem.sendMessageTarget = value;
+ }
+ }
+ }
+
+ ///
+ /// Used for SetActive so easily works between Unity 3.x and Unity 4.x
+ ///
+ public static void ChangeGameObjectActiveState(GameObject go, bool isActive)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ go.SetActiveRecursively(isActive);
+#else
+ go.SetActive(isActive);
+#endif
+ }
+
+ ///
+ /// Changes active state, but first checks to make sure it isn't null
+ ///
+ public static void ChangeGameObjectActiveStateWithNullCheck(GameObject go, bool isActive)
+ {
+ if (go != null)
+ {
+ ChangeGameObjectActiveState(go, isActive);
+ }
+ }
+
+ protected void DoSendMessage( string methodName, object parameter )
+ {
+ if (SendMessageTarget != null && methodName.Length > 0)
+ {
+ SendMessageTarget.SendMessage( methodName, parameter, SendMessageOptions.RequireReceiver );
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs.meta
new file mode 100644
index 000000000..14c3a551a
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIBaseItemControl.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a4029874653131345ab65c3702dceea9
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs
new file mode 100644
index 000000000..36b32b8bd
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs
@@ -0,0 +1,89 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// UIItem you wish be able to drag on press
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIDragItem")]
+public class tk2dUIDragItem : tk2dUIBaseItemControl
+{
+ ///
+ /// Active tk2dUIManager in scene
+ ///
+ public tk2dUIManager uiManager = null;
+
+ private Vector3 offset = Vector3.zero; //offset on touch/click
+ private bool isBtnActive = false; //if currently active
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown += ButtonDown;
+ uiItem.OnRelease += ButtonRelease;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown -= ButtonDown;
+ uiItem.OnRelease -= ButtonRelease;
+ }
+
+ if (isBtnActive)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= UpdateBtnPosition;
+ }
+ isBtnActive = false;
+ }
+ }
+
+
+ private void UpdateBtnPosition()
+ {
+ transform.position = CalculateNewPos();
+ }
+
+ private Vector3 CalculateNewPos()
+ {
+ Vector2 pos = uiItem.Touch.position;
+
+ Camera viewingCamera = tk2dUIManager.Instance.GetUICameraForControl( gameObject );
+ Vector3 worldPos = viewingCamera.ScreenToWorldPoint(new Vector3(pos.x, pos.y, transform.position.z - viewingCamera.transform.position.z));
+ worldPos.z = transform.position.z;
+ worldPos += offset;
+ return worldPos;
+ }
+
+ ///
+ /// Set button to be down (drag can begin)
+ ///
+ public void ButtonDown()
+ {
+ if (!isBtnActive)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += UpdateBtnPosition;
+ }
+ isBtnActive = true;
+ offset = Vector3.zero;
+ Vector3 newWorldPos = CalculateNewPos();
+ offset = transform.position - newWorldPos;
+ }
+
+ ///
+ /// Set button release (so drag will stop)
+ ///
+ public void ButtonRelease()
+ {
+ if (isBtnActive)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= UpdateBtnPosition;
+ }
+ isBtnActive = false;
+ }
+
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs.meta
new file mode 100644
index 000000000..da27808f8
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDragItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d07e2813ed19c7346827e964f086f873
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs
new file mode 100644
index 000000000..ff17f95c5
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs
@@ -0,0 +1,75 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Dropdown Item in the list of a DropDownMenu
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIDropDownItem")]
+public class tk2dUIDropDownItem : tk2dUIBaseItemControl
+{
+ ///
+ /// Text Label for dropdown Item
+ ///
+ public tk2dTextMesh label;
+
+ ///
+ /// Visible height of this ui item, used for vertical spacing
+ ///
+ public float height;
+
+ ///
+ /// Button used for hovers
+ ///
+ public tk2dUIUpDownHoverButton upDownHoverBtn;
+
+ private int index;
+
+ ///
+ /// Which item in the list is this (0-index)
+ ///
+ public int Index
+ {
+ get { return index; }
+ set { index = value; }
+ }
+
+ ///
+ /// Event on this item being selected
+ ///
+ public event System.Action OnItemSelected;
+
+ ///
+ /// Auto sets the label text (does commit)
+ ///
+ public string LabelText
+ {
+ get { return label.text; }
+ set
+ {
+ label.text = value;
+ label.Commit();
+ }
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick += ItemSelected;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick -= ItemSelected;
+ }
+ }
+
+ //if item is selected
+ private void ItemSelected()
+ {
+ if (OnItemSelected != null) { OnItemSelected(this); }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs.meta
new file mode 100644
index 000000000..3578a35e7
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e6ed8ad7a8512c545828ebf43c83edf7
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs
new file mode 100644
index 000000000..620e4be78
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs
@@ -0,0 +1,348 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+///
+/// DropDown Menu Control
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIDropDownMenu")]
+public class tk2dUIDropDownMenu : MonoBehaviour
+{
+ ///
+ /// Button that controls, dropdown list from appearing
+ ///
+ public tk2dUIItem dropDownButton;
+
+ ///
+ /// Primary textMesh, this will read what DropDownItem is selected
+ ///
+ public tk2dTextMesh selectedTextMesh;
+
+ ///
+ /// Visual height of this ui item, used for spacing
+ ///
+ [HideInInspector]
+ public float height;
+
+ ///
+ /// Template for each drop down item. Will be cloned.
+ ///
+ public tk2dUIDropDownItem dropDownItemTemplate;
+
+ ///
+ /// List all all the text for the dropdown list
+ ///
+ [SerializeField]
+#pragma warning disable 649
+ private string[] startingItemList;
+#pragma warning restore 649
+
+ ///
+ /// Index of which item in the dropdown list will be selected first
+ ///
+ [SerializeField]
+ private int startingIndex = 0;
+
+ private List itemList = new List();
+
+ ///
+ /// List of all text item in dropdown menu
+ ///
+ public List ItemList
+ {
+ get { return itemList; }
+ set { itemList = value; }
+ }
+
+ ///
+ /// Event, if different item is selected
+ ///
+ public event System.Action OnSelectedItemChange;
+
+ public string SendMessageOnSelectedItemChangeMethodName = "";
+
+ private int index;
+
+ ///
+ /// Which list index is currently selected
+ ///
+ public int Index
+ {
+ get { return index; }
+ set
+ {
+ index = Mathf.Clamp(value, 0, ItemList.Count - 1);
+ SetSelectedItem();
+ }
+ }
+
+ ///
+ /// Text of the currently selected dropdown list item
+ ///
+ public string SelectedItem
+ {
+ get
+ {
+ if (index >= 0 && index < itemList.Count)
+ {
+ return itemList[index];
+ }
+ else
+ {
+ return "";
+ }
+ }
+ }
+
+ public GameObject SendMessageTarget
+ {
+ get
+ {
+ if (dropDownButton != null)
+ {
+ return dropDownButton.sendMessageTarget;
+ }
+ else return null;
+ }
+ set
+ {
+ if (dropDownButton != null && dropDownButton.sendMessageTarget != value)
+ {
+ dropDownButton.sendMessageTarget = value;
+
+ #if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(dropDownButton);
+ #endif
+ }
+ }
+ }
+
+ private List dropDownItems = new List();
+
+ private bool isExpanded = false; //is currently in expanded state
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayout menuLayoutItem = null;
+
+ public tk2dUILayout MenuLayoutItem {
+ get { return menuLayoutItem; }
+ set { menuLayoutItem = value; }
+ }
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayout templateLayoutItem = null;
+
+ public tk2dUILayout TemplateLayoutItem {
+ get { return templateLayoutItem; }
+ set { templateLayoutItem = value; }
+ }
+
+ void Awake()
+ {
+ foreach (string itemStr in startingItemList)
+ {
+ itemList.Add(itemStr);
+ }
+ index = startingIndex;
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ //disable all items in template, do make it so Unity 4.x works nicely
+ dropDownItemTemplate.gameObject.SetActiveRecursively(false);
+#else
+ dropDownItemTemplate.gameObject.SetActive(false);
+#endif
+ UpdateList();
+ }
+
+ void OnEnable()
+ {
+ dropDownButton.OnDown += ExpandButtonPressed;
+ }
+
+ void OnDisable()
+ {
+ dropDownButton.OnDown -= ExpandButtonPressed;
+ }
+
+ ///
+ /// Updates all items in list. Need to call this after manipulating strings
+ ///
+ public void UpdateList()
+ {
+ Vector3 localPos;
+ tk2dUIDropDownItem item;
+ if (dropDownItems.Count > ItemList.Count)
+ {
+ for (int n = ItemList.Count; n < dropDownItems.Count; n++)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ dropDownItems[n].gameObject.SetActiveRecursively(false);
+#else
+ dropDownItems[n].gameObject.SetActive(false);
+#endif
+ }
+ }
+
+ while (dropDownItems.Count < ItemList.Count)
+ {
+ dropDownItems.Add(CreateAnotherDropDownItem());
+ }
+
+ for (int p = 0; p < ItemList.Count; p++)
+ {
+ item = dropDownItems[p];
+ localPos = item.transform.localPosition;
+ if (menuLayoutItem != null && templateLayoutItem != null)
+ localPos.y = menuLayoutItem.bMin.y - (p * (templateLayoutItem.bMax.y - templateLayoutItem.bMin.y));
+ else
+ localPos.y = -height - (p * item.height);
+ item.transform.localPosition = localPos;
+ if (item.label != null)
+ {
+ item.LabelText = itemList[p];
+ }
+ item.Index = p;
+ }
+
+ SetSelectedItem();
+ }
+
+ ///
+ /// Sets the selected item (based on index)
+ ///
+ public void SetSelectedItem()
+ {
+ if (index < 0 || index >= ItemList.Count)
+ {
+ index = 0;
+ }
+ if (index >= 0 && index < ItemList.Count)
+ {
+ selectedTextMesh.text = ItemList[index];
+ selectedTextMesh.Commit();
+ }
+ else
+ {
+ selectedTextMesh.text = "";
+ selectedTextMesh.Commit();
+ }
+
+ if (OnSelectedItemChange != null) { OnSelectedItemChange(); }
+
+ if (SendMessageTarget != null && SendMessageOnSelectedItemChangeMethodName.Length > 0)
+ {
+ SendMessageTarget.SendMessage( SendMessageOnSelectedItemChangeMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+
+ //clones another dropdown item from template
+ private tk2dUIDropDownItem CreateAnotherDropDownItem()
+ {
+ GameObject go = Instantiate(dropDownItemTemplate.gameObject) as GameObject;
+ go.name = "DropDownItem";
+ go.transform.parent = transform;
+ go.transform.localPosition = dropDownItemTemplate.transform.localPosition;
+ go.transform.localRotation = dropDownItemTemplate.transform.localRotation;
+ go.transform.localScale = dropDownItemTemplate.transform.localScale;
+ tk2dUIDropDownItem item = go.GetComponent();
+
+ item.OnItemSelected += ItemSelected;
+
+ tk2dUIUpDownHoverButton itemUpDownHoverBtn = go.GetComponent();
+ item.upDownHoverBtn = itemUpDownHoverBtn;
+
+ itemUpDownHoverBtn.OnToggleOver += DropDownItemHoverBtnToggle;
+
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ go.SetActiveRecursively(false);
+#endif
+
+ return item;
+ }
+
+ //when an item in list is selected
+ private void ItemSelected(tk2dUIDropDownItem item)
+ {
+ if (isExpanded)
+ {
+ CollapseList();
+ }
+ Index = item.Index;
+ }
+
+ private void ExpandButtonPressed()
+ {
+ if (isExpanded)
+ {
+ CollapseList();
+ }
+ else
+ {
+ ExpandList();
+ }
+ }
+
+ //drops list down
+ private void ExpandList()
+ {
+ isExpanded = true;
+ int count = Mathf.Min( ItemList.Count, dropDownItems.Count );
+ for(int i = 0; i < count; ++i)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ dropDownItems[i].gameObject.SetActiveRecursively(true);
+ dropDownItems[i].upDownHoverBtn.SetState(); //deals with how active recursive needs to work in Unity 3.x
+#else
+ dropDownItems[i].gameObject.SetActive(true);
+#endif
+ }
+
+ tk2dUIDropDownItem selectedItem = dropDownItems[index];
+
+ if (selectedItem.upDownHoverBtn != null)
+ {
+ selectedItem.upDownHoverBtn.IsOver = true;
+ }
+ }
+
+ //collapses list on selecting item or closing
+ private void CollapseList()
+ {
+ isExpanded = false;
+ foreach (tk2dUIDropDownItem item in dropDownItems)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ item.gameObject.SetActiveRecursively(false);
+#else
+ item.gameObject.SetActive(false);
+#endif
+ }
+ }
+
+ private void DropDownItemHoverBtnToggle(tk2dUIUpDownHoverButton upDownHoverButton)
+ {
+ if (upDownHoverButton.IsOver)
+ {
+ foreach (tk2dUIDropDownItem item in dropDownItems)
+ {
+ if (item.upDownHoverBtn != upDownHoverButton && item.upDownHoverBtn != null)
+ {
+ item.upDownHoverBtn.IsOver = false;
+ }
+ }
+ }
+ }
+
+ void OnDestroy()
+ {
+ foreach (tk2dUIDropDownItem item in dropDownItems)
+ {
+ item.OnItemSelected -= ItemSelected;
+ if (item.upDownHoverBtn != null)
+ {
+ item.upDownHoverBtn.OnToggleOver -= DropDownItemHoverBtnToggle;
+ }
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs.meta
new file mode 100644
index 000000000..8196bc205
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIDropDownMenu.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1c1dd8695f7fb5c4d959e149ba0c967a
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs
new file mode 100644
index 000000000..f52ae0e8b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs
@@ -0,0 +1,90 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// On HoverOver and HoverOut will switch states. Hover needs to be enabled to work (Hover actived(tk2dUIManager.areHoverEventsTracked), using a mouse
+/// and mult-touch is disabled (tk2dUIManager.useMultiTouch)
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIHoverItem")]
+public class tk2dUIHoverItem : tk2dUIBaseItemControl
+{
+ ///
+ /// This GameObject will be set to active if hover is not over. Deactivated if hover is over.
+ ///
+ public GameObject outStateGO;
+
+ ///
+ /// This GameObject will be set to active if hover is over. Deactivated if hover is out.
+ ///
+ public GameObject overStateGO;
+
+ private bool isOver = false; //is currently over
+
+ ///
+ /// Event on hover status change
+ ///
+ public event System.Action OnToggleHover;
+
+ public string SendMessageOnToggleHoverMethodName = "";
+
+ ///
+ /// Is mouse currently over
+ ///
+ public bool IsOver
+ {
+ get { return isOver; }
+ set
+ {
+ if (isOver != value)
+ {
+ isOver = value;
+ SetState();
+ if (OnToggleHover != null) { OnToggleHover(this); }
+ base.DoSendMessage( SendMessageOnToggleHoverMethodName, this );
+ }
+ }
+ }
+
+ void Start()
+ {
+ SetState();
+ }
+
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnHoverOver += HoverOver;
+ uiItem.OnHoverOut += HoverOut;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnHoverOver -= HoverOver;
+ uiItem.OnHoverOut -= HoverOut;
+ }
+ }
+
+ private void HoverOver()
+ {
+ IsOver = true;
+ }
+
+ private void HoverOut()
+ {
+ IsOver = false;
+ }
+
+ ///
+ /// Manually updates state based on IsOver
+ ///
+ public void SetState()
+ {
+ ChangeGameObjectActiveStateWithNullCheck(overStateGO, isOver);
+ ChangeGameObjectActiveStateWithNullCheck(outStateGO, !isOver);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs.meta
new file mode 100644
index 000000000..1d6f74642
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIHoverItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4a6965bcf1d2ea74ab217879a0651c78
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs
new file mode 100644
index 000000000..d9c2c5e4a
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs
@@ -0,0 +1,149 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// ToggleButton which can have multi-different states which it will toggle between
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIMultiStateToggleButton")]
+public class tk2dUIMultiStateToggleButton : tk2dUIBaseItemControl
+{
+ ///
+ /// All states which toggle between. They will be actived/deactived as cycle through list.
+ /// These do not need to be set to anything, you can simply set the array to required length.
+ ///
+ public GameObject[] states; //these don't have to be anything, you can simply set the array to required length
+
+ ///
+ /// If false toggles on click, if true toggles on down
+ ///
+ public bool activateOnPress = false;
+
+ ///
+ /// Event on change of state
+ ///
+ public event System.Action OnStateToggle;
+ private int index = 0;
+
+ public string SendMessageOnStateToggleMethodName = "";
+
+ ///
+ /// Currently selected index of active state
+ ///
+ public int Index
+ {
+ get { return index; }
+ set
+ {
+ if (value >= states.Length)
+ {
+ value = states.Length;
+ }
+ if (value < 0)
+ {
+ value = 0;
+ }
+ if (index != value)
+ {
+ index = value;
+ SetState();
+ if (OnStateToggle != null) { OnStateToggle(this); }
+ base.DoSendMessage( SendMessageOnStateToggleMethodName, this );
+ }
+ }
+ }
+
+ void Start()
+ {
+ SetState();
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick += ButtonClick;
+ uiItem.OnDown += ButtonDown;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick -= ButtonClick;
+ uiItem.OnDown -= ButtonDown;
+ }
+ }
+
+
+ private void ButtonClick()
+ {
+ if (!activateOnPress)
+ {
+ ButtonToggle();
+ }
+ }
+
+ private void ButtonDown()
+ {
+ if (activateOnPress)
+ {
+ ButtonToggle();
+ }
+ }
+
+ private void ButtonToggle()
+ {
+ if (Index + 1 >= states.Length)
+ {
+ Index = 0;
+ }
+ else
+ {
+ Index++;
+ }
+ }
+
+ private void SetState()
+ {
+ GameObject go;
+
+ for (int n = 0; n < states.Length; n++)
+ {
+ go = states[n];
+ if (go != null)
+ {
+ if (n != index)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (states[n].active)
+ {
+ states[n].SetActiveRecursively(false);
+ }
+#else
+ if (states[n].activeInHierarchy)
+ {
+ states[n].SetActive(false);
+ }
+#endif
+
+ }
+ else
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (!states[n].active)
+ {
+ states[n].SetActiveRecursively(true);
+ }
+#else
+ if (!states[n].activeInHierarchy)
+ {
+ states[n].SetActive(true);
+ }
+#endif
+ }
+ }
+ }
+ }
+
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs.meta
new file mode 100644
index 000000000..64910d2b8
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIMultiStateToggleButton.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 169cbeccc1269e64ca63bc4d164fe3de
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs
new file mode 100644
index 000000000..38a75c752
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs
@@ -0,0 +1,108 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/tk2dUIProgressBar")]
+public class tk2dUIProgressBar : MonoBehaviour
+{
+ ///
+ /// Event, if progress becomes 1, is complete
+ ///
+ public event System.Action OnProgressComplete;
+
+ ///
+ /// Transform that will be scaled from 0 to 1 on X-axis, used to move bar (this will be used instead of clippedSpriteBar)
+ ///
+ public Transform scalableBar;
+
+ ///
+ /// This will clip the sprite from right to left based on the progress (this will be used instead of scalableBar)
+ ///
+ public tk2dClippedSprite clippedSpriteBar;
+
+ ///
+ /// This will clip the sprite from right to left based on the progress (this will be used instead of scalableBar or clippedSpriteBar)
+ ///
+ public tk2dSlicedSprite slicedSpriteBar;
+
+ bool initializedSlicedSpriteDimensions = false;
+ Vector2 emptySlicedSpriteDimensions = Vector2.zero;
+ Vector2 fullSlicedSpriteDimensions = Vector2.zero;
+ Vector2 currentDimensions = Vector2.zero;
+
+ [SerializeField]
+ private float percent = 0; //0 - 1
+
+ private bool isProgressComplete = false;
+
+ ///
+ /// Target GameObject to SendMessage to. Use only if you want to use SendMessage, recommend using events instead if possble
+ ///
+ public GameObject sendMessageTarget = null;
+
+ public string SendMessageOnProgressCompleteMethodName = "";
+
+ void Start()
+ {
+ InitializeSlicedSpriteDimensions();
+ Value = percent;
+ }
+
+ ///
+ /// Percent complete, between 0-1
+ ///
+ public float Value
+ {
+ get { return percent; }
+ set
+ {
+ percent = Mathf.Clamp(value, 0f, 1f);
+ if (Application.isPlaying) {
+ if (clippedSpriteBar != null)
+ {
+ clippedSpriteBar.clipTopRight = new Vector2(Value, 1);
+ }
+ else if (scalableBar != null)
+ {
+ scalableBar.localScale = new Vector3(Value, scalableBar.localScale.y, scalableBar.localScale.z);
+ }
+ else if (slicedSpriteBar != null)
+ {
+ InitializeSlicedSpriteDimensions();
+ float slicedLength = Mathf.Lerp( emptySlicedSpriteDimensions.x, fullSlicedSpriteDimensions.x, Value );
+ currentDimensions.Set( slicedLength, fullSlicedSpriteDimensions.y );
+ slicedSpriteBar.dimensions = currentDimensions;
+ }
+
+ if (!isProgressComplete && Value == 1)
+ {
+ isProgressComplete = true;
+ if (OnProgressComplete != null) { OnProgressComplete(); }
+
+ if (sendMessageTarget != null && SendMessageOnProgressCompleteMethodName.Length > 0)
+ {
+ sendMessageTarget.SendMessage( SendMessageOnProgressCompleteMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+ else if (isProgressComplete && Value < 1)
+ {
+ isProgressComplete = false;
+ }
+ }
+ }
+ }
+
+ void InitializeSlicedSpriteDimensions() {
+ if (!initializedSlicedSpriteDimensions) {
+ if (slicedSpriteBar != null)
+ {
+ // Until there is a better way to do this.
+ tk2dSpriteDefinition spriteDef = slicedSpriteBar.CurrentSprite;
+ Vector3 extents = spriteDef.boundsData[1];
+ fullSlicedSpriteDimensions = slicedSpriteBar.dimensions;
+ emptySlicedSpriteDimensions.Set( (slicedSpriteBar.borderLeft + slicedSpriteBar.borderRight) * extents.x / spriteDef.texelSize.x,
+ fullSlicedSpriteDimensions.y );
+ }
+ initializedSlicedSpriteDimensions = true;
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs.meta
new file mode 100644
index 000000000..b7c81a892
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIProgressBar.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 08511686997577d4c9dbe9f553cf33d2
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs
new file mode 100644
index 000000000..baf094f54
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs
@@ -0,0 +1,678 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Scrollable Area Control. Can be actually by changing Value, external scrollbar or swipe gesture
+///
+[ExecuteInEditMode]
+[AddComponentMenu("2D Toolkit/UI/tk2dUIScrollableArea")]
+public class tk2dUIScrollableArea : MonoBehaviour
+{
+ ///
+ /// XAxis - horizontal, YAxis - vertical
+ ///
+ public enum Axes { XAxis, YAxis }
+
+ ///
+ /// Length of all the content in the scrollable area
+ ///
+ [SerializeField]
+ private float contentLength = 1;
+
+ public float ContentLength
+ {
+ get { return contentLength; }
+ set
+ {
+ ContentLengthVisibleAreaLengthChange(contentLength, value,visibleAreaLength,visibleAreaLength);
+ }
+ }
+
+ ///
+ /// Length of visible area of content, what can be seen
+ ///
+ [SerializeField]
+ private float visibleAreaLength = 1;
+
+ public float VisibleAreaLength
+ {
+ get { return visibleAreaLength; }
+ set
+ {
+ ContentLengthVisibleAreaLengthChange(contentLength, contentLength, visibleAreaLength, value);
+ }
+ }
+
+ ///
+ /// Transform the will be moved to scroll content. All content needs to be a child of this Transform
+ ///
+ public GameObject contentContainer;
+
+ ///
+ /// Scrollbar to be attached. Not required.
+ ///
+ public tk2dUIScrollbar scrollBar;
+
+ ///
+ /// Used to record swipe scrolling events
+ ///
+ public tk2dUIItem backgroundUIItem;
+
+ ///
+ /// Axes scrolling will happen on
+ ///
+ public Axes scrollAxes = Axes.YAxis;
+
+ ///
+ /// If swipe (gesture) scrolling is enabled
+ ///
+ public bool allowSwipeScrolling = true;
+
+ ///
+ /// If mouse will is enabled, hover needs to be active
+ ///
+ public bool allowScrollWheel = true;
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayout backgroundLayoutItem = null;
+
+ public tk2dUILayout BackgroundLayoutItem {
+ get { return backgroundLayoutItem; }
+ set {
+ if (backgroundLayoutItem != value) {
+ if (backgroundLayoutItem != null) {
+ backgroundLayoutItem.OnReshape -= LayoutReshaped;
+ }
+ backgroundLayoutItem = value;
+ if (backgroundLayoutItem != null) {
+ backgroundLayoutItem.OnReshape += LayoutReshaped;
+ }
+ }
+ }
+ }
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayoutContainer contentLayoutContainer = null;
+
+ public tk2dUILayoutContainer ContentLayoutContainer {
+ get { return contentLayoutContainer; }
+ set {
+ if (contentLayoutContainer != value) {
+ if (contentLayoutContainer != null) {
+ contentLayoutContainer.OnChangeContent -= ContentLayoutChangeCallback;
+ }
+ contentLayoutContainer = value;
+ if (contentLayoutContainer != null) {
+ contentLayoutContainer.OnChangeContent += ContentLayoutChangeCallback;
+ }
+ }
+ }
+ }
+
+ private bool isBackgroundButtonDown = false;
+ private bool isBackgroundButtonOver = false;
+
+ private Vector3 swipeScrollingPressDownStartLocalPos = Vector3.zero;
+ private Vector3 swipeScrollingContentStartLocalPos = Vector3.zero;
+ private Vector3 swipeScrollingContentDestLocalPos = Vector3.zero;
+ private bool isSwipeScrollingInProgress = false;
+ private const float SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD = .02f; //at what point swipe scrolling will start moving the list
+ private const float WITHOUT_SCROLLBAR_FIXED_SCROLL_WHEEL_PERCENT = .1f; //if not scrollbar attached how much scroll wheel will move list
+ private Vector3 swipePrevScrollingContentPressLocalPos = Vector3.zero;
+ private float swipeCurrVelocity = 0; //velocity of current frame (used for inertia swipe scrolling)
+ private float snapBackVelocity = 0;
+
+ public GameObject SendMessageTarget
+ {
+ get
+ {
+ if (backgroundUIItem != null)
+ {
+ return backgroundUIItem.sendMessageTarget;
+ }
+ else return null;
+ }
+ set
+ {
+ if (backgroundUIItem != null && backgroundUIItem.sendMessageTarget != value)
+ {
+ backgroundUIItem.sendMessageTarget = value;
+
+ #if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(backgroundUIItem);
+ #endif
+ }
+ }
+ }
+
+ ///
+ /// If scrollable area is being scrolled
+ ///
+ public event System.Action OnScroll;
+
+ public string SendMessageOnScrollMethodName = "";
+
+ private float percent = 0; //0-1
+
+ ///
+ /// Scroll position percent 0-1
+ ///
+ public float Value
+ {
+ get { return Mathf.Clamp01( percent ); }
+ set
+ {
+ value = Mathf.Clamp(value, 0f, 1f);
+ if (value != percent)
+ {
+ UnpressAllUIItemChildren();
+ percent = value;
+ if (OnScroll != null) { OnScroll(this); }
+
+ TargetOnScrollCallback();
+ }
+ if (scrollBar != null) { scrollBar.SetScrollPercentWithoutEvent(percent); }
+ SetContentPosition();
+ }
+ }
+
+ ///
+ /// Manually set scrolling percent without firing OnScroll event
+ ///
+ public void SetScrollPercentWithoutEvent(float newScrollPercent)
+ {
+ percent = Mathf.Clamp(newScrollPercent, 0f, 1f);
+ UnpressAllUIItemChildren();
+ if (scrollBar != null) { scrollBar.SetScrollPercentWithoutEvent(percent); }
+ SetContentPosition();
+ }
+
+ ///
+ /// Measures the content length. This isn't very fast, so if you know the content length
+ /// it is often more efficient to tell it rather than asking it to measure the content.
+ /// Returns the height in Unity units, of everything under the Content contentContainer.
+ ///
+ public float MeasureContentLength() {
+ Vector3 vector3Min = new Vector3(float.MinValue, float.MinValue, float.MinValue);
+ Vector3 vector3Max = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue);
+ Vector3[] minMax = new Vector3[] {
+ vector3Max,
+ vector3Min
+ };
+ Transform t = contentContainer.transform;
+ GetRendererBoundsInChildren(t.worldToLocalMatrix, minMax, t);
+ if (minMax[0] != vector3Max && minMax[1] != vector3Min) {
+ minMax[0] = Vector3.Min(minMax[0], Vector3.zero);
+ minMax[1] = Vector3.Max(minMax[1], Vector3.zero);
+ return (scrollAxes == Axes.YAxis) ? (minMax[1].y - minMax[0].y) : (minMax[1].x - minMax[0].x);
+ }
+ else {
+ Debug.LogError("Unable to measure content length");
+ return VisibleAreaLength * 0.9f;
+ }
+ }
+
+ void OnEnable()
+ {
+ if (scrollBar != null)
+ {
+ scrollBar.OnScroll += ScrollBarMove;
+ }
+
+ if (backgroundUIItem != null)
+ {
+ backgroundUIItem.OnDown += BackgroundButtonDown;
+ backgroundUIItem.OnRelease += BackgroundButtonRelease;
+ backgroundUIItem.OnHoverOver += BackgroundButtonHoverOver;
+ backgroundUIItem.OnHoverOut += BackgroundButtonHoverOut;
+ }
+
+ if (backgroundLayoutItem != null)
+ {
+ backgroundLayoutItem.OnReshape += LayoutReshaped;
+ }
+ if (contentLayoutContainer != null)
+ {
+ contentLayoutContainer.OnChangeContent += ContentLayoutChangeCallback;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (scrollBar != null)
+ {
+ scrollBar.OnScroll -= ScrollBarMove;
+ }
+
+ if (backgroundUIItem != null)
+ {
+ backgroundUIItem.OnDown -= BackgroundButtonDown;
+ backgroundUIItem.OnRelease -= BackgroundButtonRelease;
+ backgroundUIItem.OnHoverOver -= BackgroundButtonHoverOver;
+ backgroundUIItem.OnHoverOut -= BackgroundButtonHoverOut;
+ }
+
+ if (isBackgroundButtonOver)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange -= BackgroundHoverOverScrollWheelChange;
+ }
+ isBackgroundButtonOver = false;
+ }
+
+ if (isBackgroundButtonDown || isSwipeScrollingInProgress)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= BackgroundOverUpdate;
+ }
+ isBackgroundButtonDown = false;
+ isSwipeScrollingInProgress = false;
+ }
+
+ if (backgroundLayoutItem != null)
+ {
+ backgroundLayoutItem.OnReshape -= LayoutReshaped;
+ }
+ if (contentLayoutContainer != null)
+ {
+ contentLayoutContainer.OnChangeContent -= ContentLayoutChangeCallback;
+ }
+
+ swipeCurrVelocity = 0;
+ }
+
+ void Start()
+ {
+ UpdateScrollbarActiveState();
+ }
+
+ private void BackgroundHoverOverScrollWheelChange(float mouseWheelChange)
+ {
+ if (mouseWheelChange > 0)
+ {
+ if (scrollBar)
+ {
+ scrollBar.ScrollUpFixed();
+ }
+ else
+ {
+ Value -= WITHOUT_SCROLLBAR_FIXED_SCROLL_WHEEL_PERCENT;
+ }
+ }
+ else if (mouseWheelChange < 0)
+ {
+ if (scrollBar)
+ {
+ scrollBar.ScrollDownFixed();
+ }
+ else
+ {
+ Value += WITHOUT_SCROLLBAR_FIXED_SCROLL_WHEEL_PERCENT;
+ }
+ }
+ }
+
+ private void ScrollBarMove(tk2dUIScrollbar scrollBar)
+ {
+ Value = scrollBar.Value;
+ isSwipeScrollingInProgress = false;
+ if (isBackgroundButtonDown)
+ {
+ BackgroundButtonRelease();
+ }
+ }
+
+ Vector3 ContentContainerOffset {
+ get {
+ return Vector3.Scale(new Vector3(-1, 1, 1), contentContainer.transform.localPosition);
+ }
+ set {
+ contentContainer.transform.localPosition = Vector3.Scale(new Vector3(-1, 1, 1), value);
+ }
+ }
+
+ private void SetContentPosition()
+ {
+ Vector3 localPos = ContentContainerOffset;
+ float pos = (contentLength - visibleAreaLength) * Value;
+
+ if (pos < 0) { pos = 0; }
+
+ if (scrollAxes == Axes.XAxis)
+ {
+ localPos.x = pos;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ localPos.y = pos;
+ }
+
+ ContentContainerOffset = localPos;
+ }
+
+ private void BackgroundButtonDown()
+ {
+ if (allowSwipeScrolling && contentLength > visibleAreaLength)
+ {
+ if (!isBackgroundButtonDown && !isSwipeScrollingInProgress)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += BackgroundOverUpdate;
+ }
+ swipeScrollingPressDownStartLocalPos = transform.InverseTransformPoint(CalculateClickWorldPos(backgroundUIItem));
+ swipePrevScrollingContentPressLocalPos = swipeScrollingPressDownStartLocalPos;
+ swipeScrollingContentStartLocalPos = ContentContainerOffset;
+ swipeScrollingContentDestLocalPos = swipeScrollingContentStartLocalPos;
+ isBackgroundButtonDown = true;
+ swipeCurrVelocity = 0;
+ }
+ }
+
+ private void BackgroundOverUpdate()
+ {
+ if (isBackgroundButtonDown)
+ {
+ UpdateSwipeScrollDestintationPosition();
+ }
+ if (isSwipeScrollingInProgress)
+ {
+ float newPercent = percent;
+ float destValue = 0;
+ if (scrollAxes == Axes.XAxis)
+ {
+ destValue = swipeScrollingContentDestLocalPos.x;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ destValue = swipeScrollingContentDestLocalPos.y;
+ }
+
+ float minDest = 0;
+ float maxDest = contentLength - visibleAreaLength;
+ if (isBackgroundButtonDown)
+ {
+ if (destValue < minDest)
+ {
+ destValue += (-destValue / visibleAreaLength) / 2;
+ if (destValue > minDest )
+ {
+ destValue =minDest;
+ }
+ }
+ else if (destValue > maxDest)
+ {
+ destValue-= ((destValue-maxDest)/visibleAreaLength)/2;
+
+ if (destValue< maxDest)
+ {
+ destValue=maxDest;
+ }
+ }
+
+ if (scrollAxes == Axes.XAxis)
+ {
+ swipeScrollingContentDestLocalPos.x = destValue;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ swipeScrollingContentDestLocalPos.y = destValue;
+ }
+
+ newPercent = destValue / (contentLength - visibleAreaLength);
+ }
+ else //background button not down
+ {
+ float velocityThreshold = visibleAreaLength * 0.001f;
+ if (destValue < minDest || destValue > maxDest)
+ {
+ float target = ( destValue < minDest ) ? minDest : maxDest;
+ destValue = Mathf.SmoothDamp( destValue, target, ref snapBackVelocity, 0.05f, Mathf.Infinity, tk2dUITime.deltaTime );
+ if (Mathf.Abs(snapBackVelocity) < velocityThreshold) {
+ destValue = target;
+ snapBackVelocity = 0;
+ }
+ swipeCurrVelocity = 0;
+ }
+ else if (swipeCurrVelocity != 0) //velocity scrolling
+ {
+ destValue += swipeCurrVelocity * tk2dUITime.deltaTime * 20; //swipe velocity multiplier
+ if (swipeCurrVelocity > velocityThreshold || swipeCurrVelocity < -velocityThreshold)
+ {
+ swipeCurrVelocity = Mathf.Lerp(swipeCurrVelocity, 0, tk2dUITime.deltaTime * 2.5f); //change multiplier to change slowdown velocity
+ }
+ else
+ {
+ swipeCurrVelocity = 0;
+ }
+ }
+ else
+ {
+ isSwipeScrollingInProgress = false;
+ tk2dUIManager.Instance.OnInputUpdate -= BackgroundOverUpdate;
+ }
+
+ if (scrollAxes == Axes.XAxis)
+ {
+ swipeScrollingContentDestLocalPos.x = destValue;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ swipeScrollingContentDestLocalPos.y = destValue;
+ }
+
+ newPercent = destValue / (contentLength - visibleAreaLength);
+ }
+
+ if (newPercent != percent) {
+ percent = newPercent;
+ ContentContainerOffset = swipeScrollingContentDestLocalPos;
+ if (OnScroll != null) OnScroll(this);
+ TargetOnScrollCallback();
+ }
+
+ if (scrollBar != null)
+ {
+ float scrollBarPercent = percent;
+ if (scrollAxes == Axes.XAxis)
+ {
+ scrollBarPercent = (ContentContainerOffset.x / (contentLength - visibleAreaLength));
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ scrollBarPercent = (ContentContainerOffset.y / (contentLength - visibleAreaLength));
+
+ }
+
+ scrollBar.SetScrollPercentWithoutEvent(scrollBarPercent);
+ }
+ }
+ }
+
+ private void UpdateSwipeScrollDestintationPosition()
+ {
+ Vector3 currTouchPosLocal = transform.InverseTransformPoint(CalculateClickWorldPos(backgroundUIItem));
+
+ // X axis is inverted
+ Vector3 moveDiffVector = currTouchPosLocal - swipeScrollingPressDownStartLocalPos;
+ moveDiffVector.x *= -1;
+
+ float moveDiff = 0;
+ if (scrollAxes == Axes.XAxis)
+ {
+ moveDiff = moveDiffVector.x;
+ // Invert x axis
+ swipeCurrVelocity = -(currTouchPosLocal.x - swipePrevScrollingContentPressLocalPos.x);
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ moveDiff = moveDiffVector.y;
+ swipeCurrVelocity = currTouchPosLocal.y - swipePrevScrollingContentPressLocalPos.y;
+ }
+ if (!isSwipeScrollingInProgress)
+ {
+ if (Mathf.Abs(moveDiff) > SWIPE_SCROLLING_FIRST_SCROLL_THRESHOLD)
+ {
+ isSwipeScrollingInProgress = true;
+
+ //unpress anything currently pressed in list
+ tk2dUIManager.Instance.OverrideClearAllChildrenPresses(backgroundUIItem);
+ }
+ }
+ if (isSwipeScrollingInProgress)
+ {
+ Vector3 destContentPos = swipeScrollingContentStartLocalPos + moveDiffVector;
+ destContentPos.z = ContentContainerOffset.z;
+
+ if (scrollAxes == Axes.XAxis)
+ {
+ destContentPos.y = ContentContainerOffset.y;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ destContentPos.x = ContentContainerOffset.x;
+ }
+ destContentPos.z = ContentContainerOffset.z;
+
+ swipeScrollingContentDestLocalPos = destContentPos;
+ swipePrevScrollingContentPressLocalPos = currTouchPosLocal;
+ }
+ }
+
+ private void BackgroundButtonRelease()
+ {
+ if (allowSwipeScrolling)
+ {
+ if (isBackgroundButtonDown)
+ {
+ if (!isSwipeScrollingInProgress)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= BackgroundOverUpdate;
+ }
+ }
+ isBackgroundButtonDown = false;
+ }
+ }
+
+ private void BackgroundButtonHoverOver()
+ {
+ if (allowScrollWheel)
+ {
+ if (!isBackgroundButtonOver)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange += BackgroundHoverOverScrollWheelChange;
+ }
+ isBackgroundButtonOver = true;
+ }
+ }
+
+ private void BackgroundButtonHoverOut()
+ {
+ if (isBackgroundButtonOver)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange -= BackgroundHoverOverScrollWheelChange;
+ }
+
+ isBackgroundButtonOver = false;
+ }
+
+ private Vector3 CalculateClickWorldPos(tk2dUIItem btn)
+ {
+ Vector2 pos = btn.Touch.position;
+ Camera viewingCamera = tk2dUIManager.Instance.GetUICameraForControl( gameObject );
+ Vector3 worldPos = viewingCamera.ScreenToWorldPoint(new Vector3(pos.x, pos.y, btn.transform.position.z - viewingCamera.transform.position.z));
+ worldPos.z = btn.transform.position.z;
+ return worldPos;
+ }
+
+ private void UpdateScrollbarActiveState()
+ {
+ bool scrollBarVisible = (contentLength > visibleAreaLength);
+ if (scrollBar != null)
+ {
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (scrollBar.gameObject.active != scrollBarVisible)
+#else
+ if (scrollBar.gameObject.activeSelf != scrollBarVisible)
+#endif
+ {
+ tk2dUIBaseItemControl.ChangeGameObjectActiveState(scrollBar.gameObject, scrollBarVisible);
+ }
+ }
+ }
+
+ private void ContentLengthVisibleAreaLengthChange(float prevContentLength,float newContentLength,float prevVisibleAreaLength,float newVisibleAreaLength)
+ {
+ float newValue;
+ if (newContentLength-visibleAreaLength!=0)
+ {
+ newValue = ((prevContentLength - prevVisibleAreaLength) * Value) / (newContentLength - newVisibleAreaLength);
+ }
+ else
+ {
+ newValue = 0;
+ }
+
+ contentLength = newContentLength;
+ visibleAreaLength = newVisibleAreaLength;
+ UpdateScrollbarActiveState();
+ Value = newValue;
+ }
+
+ private void UnpressAllUIItemChildren()
+ {
+ }
+
+ private void TargetOnScrollCallback()
+ {
+ if (SendMessageTarget != null && SendMessageOnScrollMethodName.Length > 0)
+ {
+ SendMessageTarget.SendMessage( SendMessageOnScrollMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+
+
+ private static readonly Vector3[] boxExtents = new Vector3[] {
+ new Vector3(-1, -1, -1), new Vector3( 1, -1, -1), new Vector3(-1, 1, -1), new Vector3( 1, 1, -1), new Vector3(-1, -1, 1), new Vector3( 1, -1, 1), new Vector3(-1, 1, 1), new Vector3( 1, 1, 1)
+ };
+
+ private static void GetRendererBoundsInChildren(Matrix4x4 rootWorldToLocal, Vector3[] minMax, Transform t) {
+ MeshFilter mf = t.GetComponent();
+ if (mf != null && mf.sharedMesh != null) {
+ Bounds b = mf.sharedMesh.bounds;
+ Matrix4x4 relativeMatrix = rootWorldToLocal * t.localToWorldMatrix;
+ for (int j = 0; j < 8; ++j) {
+ Vector3 localPoint = b.center + Vector3.Scale(b.extents, boxExtents[j]);
+ Vector3 pointRelativeToRoot = relativeMatrix.MultiplyPoint(localPoint);
+ minMax[0] = Vector3.Min(minMax[0], pointRelativeToRoot);
+ minMax[1] = Vector3.Max(minMax[1], pointRelativeToRoot);
+ }
+ }
+ int childCount = t.childCount;
+ for (int i = 0; i < childCount; ++i) {
+ Transform child = t.GetChild(i);
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ if (t.gameObject.active) {
+#else
+ if (t.gameObject.activeSelf) {
+#endif
+ GetRendererBoundsInChildren(rootWorldToLocal, minMax, child);
+ }
+ }
+ }
+
+ private void LayoutReshaped(Vector3 dMin, Vector3 dMax)
+ {
+ VisibleAreaLength += (scrollAxes == Axes.XAxis) ? (dMax.x - dMin.x) : (dMax.y - dMin.y);
+ }
+
+ private void ContentLayoutChangeCallback()
+ {
+ if (contentLayoutContainer != null) {
+ Vector2 contentSize = contentLayoutContainer.GetInnerSize();
+ ContentLength = (scrollAxes == Axes.XAxis) ? contentSize.x : contentSize.y;
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs.meta
new file mode 100644
index 000000000..04cfb36e3
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollableArea.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fdb75476e7494c9409973f55d0b30b6d
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs
new file mode 100644
index 000000000..4eae471b3
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs
@@ -0,0 +1,512 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Scrollbar/Slider Control
+///
+[ExecuteInEditMode]
+[AddComponentMenu("2D Toolkit/UI/tk2dUIScrollbar")]
+public class tk2dUIScrollbar : MonoBehaviour
+{
+ ///
+ /// XAxis - horizontal, YAxis - vertical
+ ///
+ public enum Axes { XAxis, YAxis }
+
+ ///
+ /// Whole bar uiItem. Used to record clicks/touches to move thumb directly to that locations
+ ///
+ public tk2dUIItem barUIItem;
+
+ ///
+ /// Lenght of the scrollbar
+ ///
+ public float scrollBarLength;
+
+ ///
+ /// Scroll thumb button. Events will be taken from this.
+ ///
+ public tk2dUIItem thumbBtn;
+
+ ///
+ /// Generally same as thumbBtn, but sometimes you want a thumb that user can't interactive with.
+ ///
+ public Transform thumbTransform;
+
+ ///
+ /// Length of the scroll thumb
+ ///
+ public float thumbLength;
+
+ ///
+ /// Button up, moves list up. Not required.
+ ///
+ public tk2dUIItem upButton;
+
+ //direct reference to hover button of up button (if exists)
+ private tk2dUIHoverItem hoverUpButton;
+
+ ///
+ /// Button down, moves list down. Not required
+ ///
+ public tk2dUIItem downButton;
+
+ //direct reference to hover button of up button (if exists)
+ private tk2dUIHoverItem hoverDownButton;
+
+ ///
+ /// Disable up/down buttons will scroll
+ ///
+ public float buttonUpDownScrollDistance = 1f;
+
+ ///
+ /// Allows for mouse scroll wheel to scroll list while hovered. Requires hover to be active.
+ ///
+ public bool allowScrollWheel = true;
+
+ ///
+ /// Axes while scrolling will occur.
+ ///
+ public Axes scrollAxes = Axes.YAxis;
+
+ ///
+ /// Highlighted progress bar control used to move a highlighted bar. Not required.
+ ///
+ public tk2dUIProgressBar highlightProgressBar;
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayout barLayoutItem = null;
+
+ public tk2dUILayout BarLayoutItem {
+ get { return barLayoutItem; }
+ set {
+ if (barLayoutItem != value) {
+ if (barLayoutItem != null) {
+ barLayoutItem.OnReshape -= LayoutReshaped;
+ }
+ barLayoutItem = value;
+ if (barLayoutItem != null) {
+ barLayoutItem.OnReshape += LayoutReshaped;
+ }
+ }
+ }
+ }
+
+ private bool isScrollThumbButtonDown = false;
+ private bool isTrackHoverOver = false;
+
+ private float percent = 0; //0-1
+
+ private Vector3 moveThumbBtnOffset = Vector3.zero;
+
+ //which, if any up down scrollbuttons are currently down
+ private int scrollUpDownButtonState = 0; //0=nothing, -1=up, 1-down
+ private float timeOfUpDownButtonPressStart = 0; //time of scroll up/down button press
+ private float repeatUpDownButtonHoldCounter = 0; //counts how many moves are made by holding
+
+ private const float WITHOUT_SCROLLBAR_FIXED_SCROLL_WHEEL_PERCENT = .1f; //distance to be scroll if not attached to ScrollableArea
+
+ private const float INITIAL_TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD = .55f;
+ private const float TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD = .45f;
+
+ ///
+ /// Event, on scrolling
+ ///
+ public event System.Action OnScroll;
+
+ public string SendMessageOnScrollMethodName = "";
+
+ public GameObject SendMessageTarget
+ {
+ get
+ {
+ if (barUIItem != null)
+ {
+ return barUIItem.sendMessageTarget;
+ }
+ else return null;
+ }
+ set
+ {
+ if (barUIItem != null && barUIItem.sendMessageTarget != value)
+ {
+ barUIItem.sendMessageTarget = value;
+
+ #if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(barUIItem);
+ #endif
+ }
+ }
+ }
+
+ ///
+ /// Percent scrolled. 0-1
+ ///
+ public float Value
+ {
+ get { return percent; }
+ set
+ {
+ percent = Mathf.Clamp(value, 0f, 1f);
+ if (OnScroll != null) { OnScroll(this); }
+ SetScrollThumbPosition();
+
+ if (SendMessageTarget != null && SendMessageOnScrollMethodName.Length > 0)
+ {
+ SendMessageTarget.SendMessage( SendMessageOnScrollMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+ }
+
+ ///
+ /// Manually set scrolling percent without firing OnScroll event
+ ///
+ public void SetScrollPercentWithoutEvent(float newScrollPercent)
+ {
+ percent = Mathf.Clamp(newScrollPercent, 0f, 1f);
+ SetScrollThumbPosition();
+ }
+
+ void OnEnable()
+ {
+ if (barUIItem != null)
+ {
+ barUIItem.OnDown += ScrollTrackButtonDown;
+ barUIItem.OnHoverOver += ScrollTrackButtonHoverOver;
+ barUIItem.OnHoverOut += ScrollTrackButtonHoverOut;
+ }
+ if (thumbBtn != null)
+ {
+ thumbBtn.OnDown += ScrollThumbButtonDown;
+ thumbBtn.OnRelease += ScrollThumbButtonRelease;
+ }
+
+ if (upButton != null)
+ {
+ upButton.OnDown += ScrollUpButtonDown;
+ upButton.OnUp += ScrollUpButtonUp;
+ }
+
+ if (downButton != null)
+ {
+ downButton.OnDown += ScrollDownButtonDown;
+ downButton.OnUp += ScrollDownButtonUp;
+ }
+
+ if (barLayoutItem != null)
+ {
+ barLayoutItem.OnReshape += LayoutReshaped;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (barUIItem != null)
+ {
+ barUIItem.OnDown -= ScrollTrackButtonDown;
+ barUIItem.OnHoverOver -= ScrollTrackButtonHoverOver;
+ barUIItem.OnHoverOut -= ScrollTrackButtonHoverOut;
+ }
+ if (thumbBtn != null)
+ {
+ thumbBtn.OnDown -= ScrollThumbButtonDown;
+ thumbBtn.OnRelease -= ScrollThumbButtonRelease;
+ }
+
+ if (upButton != null)
+ {
+ upButton.OnDown -= ScrollUpButtonDown;
+ upButton.OnUp -= ScrollUpButtonUp;
+ }
+
+ if (downButton != null)
+ {
+ downButton.OnDown -= ScrollDownButtonDown;
+ downButton.OnUp -= ScrollDownButtonUp;
+ }
+
+ if (isScrollThumbButtonDown)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= MoveScrollThumbButton;
+ }
+ isScrollThumbButtonDown = false;
+ }
+
+ if (isTrackHoverOver)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange -= TrackHoverScrollWheelChange;
+ }
+ isTrackHoverOver = false;
+ }
+
+ if (scrollUpDownButtonState != 0)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= CheckRepeatScrollUpDownButton;
+ scrollUpDownButtonState = 0;
+ }
+
+ if (barLayoutItem != null)
+ {
+ barLayoutItem.OnReshape -= LayoutReshaped;
+ }
+ }
+
+ void Awake()
+ {
+ if (upButton != null)
+ {
+ hoverUpButton = upButton.GetComponent();
+ }
+ if (downButton != null)
+ {
+ hoverDownButton = downButton.GetComponent();
+ }
+ }
+
+ void Start()
+ {
+ SetScrollThumbPosition();
+ }
+
+ private void TrackHoverScrollWheelChange(float mouseWheelChange)
+ {
+ if (mouseWheelChange > 0)
+ {
+ ScrollUpFixed();
+ }
+ else if(mouseWheelChange<0)
+ {
+ ScrollDownFixed();
+ }
+ }
+
+ private void SetScrollThumbPosition()
+ {
+ if (thumbTransform != null)
+ {
+ float pos= -((scrollBarLength - thumbLength) * Value)/* + ((scrollBarLength - thumbLength) / 2.0f)*/;
+
+ Vector3 thumbLocalPos = thumbTransform.localPosition;
+ if (scrollAxes == Axes.XAxis)
+ {
+ thumbLocalPos.x = -pos;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ thumbLocalPos.y = pos;
+ }
+ thumbTransform.localPosition = thumbLocalPos;
+ }
+
+ if (highlightProgressBar != null)
+ {
+ highlightProgressBar.Value = Value;
+ }
+ }
+
+ private void MoveScrollThumbButton()
+ {
+ ScrollToPosition(CalculateClickWorldPos(thumbBtn) + moveThumbBtnOffset);
+ }
+
+ private Vector3 CalculateClickWorldPos(tk2dUIItem btn)
+ {
+ Camera viewingCamera = tk2dUIManager.Instance.GetUICameraForControl( gameObject );
+ Vector2 pos = btn.Touch.position;
+ Vector3 worldPos = viewingCamera.ScreenToWorldPoint(new Vector3(pos.x, pos.y, btn.transform.position.z - viewingCamera.transform.position.z));
+ worldPos.z = btn.transform.position.z;
+ return worldPos;
+ }
+
+
+ private void ScrollToPosition(Vector3 worldPos)
+ {
+ Vector3 localPos=thumbTransform.parent.InverseTransformPoint(worldPos);
+
+ float axisPos = 0;
+
+ if (scrollAxes == Axes.XAxis)
+ {
+ axisPos = localPos.x;
+ }
+ else if (scrollAxes == Axes.YAxis)
+ {
+ axisPos = -localPos.y;
+ }
+
+ Value = (axisPos / (scrollBarLength - thumbLength));
+ }
+
+ private void ScrollTrackButtonDown()
+ {
+ ScrollToPosition(CalculateClickWorldPos(barUIItem));
+ }
+
+ private void ScrollTrackButtonHoverOver()
+ {
+ if (allowScrollWheel)
+ {
+ if (!isTrackHoverOver)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange += TrackHoverScrollWheelChange;
+ }
+ isTrackHoverOver = true;
+ }
+ }
+
+ private void ScrollTrackButtonHoverOut()
+ {
+ if (isTrackHoverOver)
+ {
+ tk2dUIManager.Instance.OnScrollWheelChange -= TrackHoverScrollWheelChange;
+ }
+ isTrackHoverOver = false;
+ }
+
+ private void ScrollThumbButtonDown()
+ {
+ if (!isScrollThumbButtonDown)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += MoveScrollThumbButton;
+ }
+ isScrollThumbButtonDown = true;
+
+ Vector3 newWorldPos = CalculateClickWorldPos(thumbBtn);
+ moveThumbBtnOffset = thumbBtn.transform.position - newWorldPos;
+ moveThumbBtnOffset.z = 0;
+
+ if (hoverUpButton != null)
+ {
+ hoverUpButton.IsOver = true;
+ }
+ if (hoverDownButton != null)
+ {
+ hoverDownButton.IsOver = true;
+ }
+ }
+
+ private void ScrollThumbButtonRelease()
+ {
+ if (isScrollThumbButtonDown)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= MoveScrollThumbButton;
+ }
+ isScrollThumbButtonDown = false;
+
+ if (hoverUpButton != null)
+ {
+ hoverUpButton.IsOver = false;
+ }
+ if (hoverDownButton != null)
+ {
+ hoverDownButton.IsOver = false;
+ }
+ }
+
+ private void ScrollUpButtonDown()
+ {
+ timeOfUpDownButtonPressStart = Time.realtimeSinceStartup;
+ repeatUpDownButtonHoldCounter = 0;
+ if (scrollUpDownButtonState == 0)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += CheckRepeatScrollUpDownButton;
+ }
+ scrollUpDownButtonState = -1;
+
+ ScrollUpFixed();
+ }
+
+ private void ScrollUpButtonUp()
+ {
+ if (scrollUpDownButtonState != 0)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= CheckRepeatScrollUpDownButton;
+ }
+ scrollUpDownButtonState = 0;
+ }
+
+ private void ScrollDownButtonDown()
+ {
+ timeOfUpDownButtonPressStart = Time.realtimeSinceStartup;
+ repeatUpDownButtonHoldCounter = 0;
+ if (scrollUpDownButtonState == 0)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += CheckRepeatScrollUpDownButton;
+ }
+ scrollUpDownButtonState = 1;
+ ScrollDownFixed();
+ }
+
+ private void ScrollDownButtonUp()
+ {
+ if (scrollUpDownButtonState != 0)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= CheckRepeatScrollUpDownButton;
+ }
+ scrollUpDownButtonState = 0;
+ }
+
+ public void ScrollUpFixed()
+ {
+ ScrollDirection(-1);
+ }
+
+ public void ScrollDownFixed()
+ {
+ ScrollDirection(1);
+ }
+
+ private void CheckRepeatScrollUpDownButton()
+ {
+ if (scrollUpDownButtonState != 0)
+ {
+ float timePassed = Time.realtimeSinceStartup - timeOfUpDownButtonPressStart;
+
+ if (repeatUpDownButtonHoldCounter == 0)
+ {
+ if (timePassed > INITIAL_TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD)
+ {
+ repeatUpDownButtonHoldCounter++;
+ timePassed -= INITIAL_TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD;
+ ScrollDirection(scrollUpDownButtonState);
+ }
+ }
+ else //greater then 0
+ {
+ if (timePassed > TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD)
+ {
+ repeatUpDownButtonHoldCounter++;
+ timePassed -= TIME_TO_REPEAT_UP_DOWN_SCROLL_BUTTON_SCROLLING_ON_HOLD;
+ ScrollDirection(scrollUpDownButtonState);
+ }
+ }
+ }
+ }
+
+ public void ScrollDirection(int dir)
+ {
+ if (scrollAxes == Axes.XAxis)
+ {
+ Value = Value - CalcScrollPercentOffsetButtonScrollDistance() * dir * buttonUpDownScrollDistance;
+ }
+ else
+ {
+ Value = Value + CalcScrollPercentOffsetButtonScrollDistance() * dir * buttonUpDownScrollDistance;
+ }
+ }
+
+ private float CalcScrollPercentOffsetButtonScrollDistance()
+ {
+ return WITHOUT_SCROLLBAR_FIXED_SCROLL_WHEEL_PERCENT;
+ }
+
+ private void LayoutReshaped(Vector3 dMin, Vector3 dMax)
+ {
+ scrollBarLength += (scrollAxes == Axes.XAxis) ? (dMax.x - dMin.x) : (dMax.y - dMin.y);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs.meta
new file mode 100644
index 000000000..254f7f75b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIScrollbar.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ffc470a0ff440194fa949b17f4ea9b54
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs
new file mode 100644
index 000000000..e179d86cc
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs
@@ -0,0 +1,75 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Plays audioclips based on uiItem events
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUISoundItem")]
+public class tk2dUISoundItem : tk2dUIBaseItemControl
+{
+ ///
+ /// Audio clip to play when the button transitions from up to down state. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip downButtonSound;
+ ///
+ /// Audio clip to play when the button transitions from down to up state. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip upButtonSound;
+ ///
+ /// Audio clip to play when the button is clicked. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip clickButtonSound;
+ ///
+ /// Audio clip to play when the button on release. Requires an AudioSource component to be attached to work.
+ ///
+ public AudioClip releaseButtonSound;
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ if (downButtonSound != null) { uiItem.OnDown += PlayDownSound; }
+ if (upButtonSound != null) { uiItem.OnUp += PlayUpSound; }
+ if (clickButtonSound != null) { uiItem.OnClick += PlayClickSound; }
+ if (releaseButtonSound != null) { uiItem.OnRelease += PlayReleaseSound; }
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ if (downButtonSound != null) { uiItem.OnDown -= PlayDownSound; }
+ if (upButtonSound != null) { uiItem.OnUp -= PlayUpSound; }
+ if (clickButtonSound != null) { uiItem.OnClick -= PlayClickSound; }
+ if (releaseButtonSound != null) { uiItem.OnRelease -= PlayReleaseSound; }
+ }
+ }
+
+ private void PlayDownSound()
+ {
+ PlaySound(downButtonSound);
+ }
+
+ private void PlayUpSound()
+ {
+ PlaySound(upButtonSound);
+ }
+
+ private void PlayClickSound()
+ {
+ PlaySound(clickButtonSound);
+ }
+
+ private void PlayReleaseSound()
+ {
+ PlaySound(releaseButtonSound);
+ }
+
+ //plays audioclip using audio manager
+ private void PlaySound(AudioClip source)
+ {
+ tk2dUIAudioManager.Instance.Play(source);
+ }
+
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs.meta
new file mode 100644
index 000000000..9c3672247
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUISoundItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 53832391ed852794ba17308fbfe61d42
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs
new file mode 100644
index 000000000..b3fdebf41
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs
@@ -0,0 +1,454 @@
+#if (UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8)
+ #define TOUCH_SCREEN_KEYBOARD
+#endif
+
+using UnityEngine;
+using System.Collections;
+
+///
+/// TextInput control
+///
+[ExecuteInEditMode]
+[AddComponentMenu("2D Toolkit/UI/tk2dUITextInput")]
+public class tk2dUITextInput : MonoBehaviour
+{
+ ///
+ /// UItem that will make cause TextInput to become selected on click
+ ///
+ public tk2dUIItem selectionBtn;
+
+ ///
+ /// TextMesh while text input will be displayed
+ ///
+ public tk2dTextMesh inputLabel;
+
+ ///
+ /// TextMesh that will be displayed if nothing in inputLabel and is not selected
+ ///
+ public tk2dTextMesh emptyDisplayLabel;
+
+ ///
+ /// State to be active if text input is not selected
+ ///
+ public GameObject unSelectedStateGO;
+
+ ///
+ /// Stated to be active if text input is selected
+ ///
+ public GameObject selectedStateGO;
+
+ ///
+ /// Text cursor to be displayed at next of text input on selection
+ ///
+ public GameObject cursor;
+
+ ///
+ /// How long the field is (visible)
+ ///
+ public float fieldLength = 1;
+
+ ///
+ /// Maximum number of characters allowed for input
+ ///
+ public int maxCharacterLength = 30;
+
+ ///
+ /// Text to be displayed when no text is entered and text input is not selected
+ ///
+ public string emptyDisplayText;
+
+ ///
+ /// If set to true (is a password field), then all characters will be replaced with password char
+ ///
+ public bool isPasswordField = false;
+
+ ///
+ /// Each character in the password field is replaced with the first character of this string
+ /// Default: * if string is empty.
+ ///
+ public string passwordChar = "*";
+
+ [SerializeField]
+ [HideInInspector]
+ private tk2dUILayout layoutItem = null;
+
+ public tk2dUILayout LayoutItem {
+ get { return layoutItem; }
+ set {
+ if (layoutItem != value) {
+ if (layoutItem != null) {
+ layoutItem.OnReshape -= LayoutReshaped;
+ }
+ layoutItem = value;
+ if (layoutItem != null) {
+ layoutItem.OnReshape += LayoutReshaped;
+ }
+ }
+ }
+ }
+
+ private bool isSelected = false;
+
+ private bool wasStartedCalled = false;
+ private bool wasOnAnyPressEventAttached = false;
+
+#if TOUCH_SCREEN_KEYBOARD
+ private TouchScreenKeyboard keyboard = null;
+#endif
+
+ private bool listenForKeyboardText = false;
+
+ private bool isDisplayTextShown =false;
+
+ public System.Action OnTextChange;
+
+ public string SendMessageOnTextChangeMethodName = "";
+
+ public GameObject SendMessageTarget
+ {
+ get
+ {
+ if (selectionBtn != null)
+ {
+ return selectionBtn.sendMessageTarget;
+ }
+ else return null;
+ }
+ set
+ {
+ if (selectionBtn != null && selectionBtn.sendMessageTarget != value)
+ {
+ selectionBtn.sendMessageTarget = value;
+
+ #if UNITY_EDITOR
+ UnityEditor.EditorUtility.SetDirty(selectionBtn);
+ #endif
+ }
+ }
+ }
+
+ public bool IsFocus
+ {
+ get
+ {
+ return isSelected;
+ }
+ }
+
+ private string text = "";
+
+ ///
+ /// Update the input text
+ ///
+ public string Text
+ {
+ get { return text; }
+ set
+ {
+ if (text != value)
+ {
+ text = value;
+ if (text.Length > maxCharacterLength)
+ {
+ text = text.Substring(0, maxCharacterLength);
+ }
+ FormatTextForDisplay(text);
+ if (isSelected)
+ {
+ SetCursorPosition();
+ }
+ }
+ }
+ }
+
+ void Awake()
+ {
+ SetState();
+ ShowDisplayText();
+ }
+
+ void Start()
+ {
+ wasStartedCalled = true;
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnAnyPress += AnyPress;
+ }
+ wasOnAnyPressEventAttached = true;
+ }
+
+ void OnEnable()
+ {
+ if (wasStartedCalled && !wasOnAnyPressEventAttached)
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnAnyPress += AnyPress;
+ }
+ }
+
+ if (layoutItem != null)
+ {
+ layoutItem.OnReshape += LayoutReshaped;
+ }
+
+ selectionBtn.OnClick += InputSelected;
+ }
+
+ void OnDisable()
+ {
+ if (tk2dUIManager.Instance__NoCreate != null)
+ {
+ tk2dUIManager.Instance.OnAnyPress -= AnyPress;
+ if (listenForKeyboardText)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= ListenForKeyboardTextUpdate;
+ }
+ }
+ wasOnAnyPressEventAttached = false;
+
+ selectionBtn.OnClick -= InputSelected;
+
+
+ listenForKeyboardText = false;
+
+ if (layoutItem != null)
+ {
+ layoutItem.OnReshape -= LayoutReshaped;
+ }
+ }
+
+ public void SetFocus()
+ {
+ if (!IsFocus)
+ {
+ InputSelected();
+ }
+ }
+
+ private void FormatTextForDisplay(string modifiedText)
+ {
+ if (isPasswordField)
+ {
+ int charLength = modifiedText.Length;
+ char passwordReplaceChar = ( passwordChar.Length > 0 ) ? passwordChar[0] : '*';
+ modifiedText = "";
+ modifiedText=modifiedText.PadRight(charLength, passwordReplaceChar);
+ }
+
+ inputLabel.text = modifiedText;
+ inputLabel.Commit();
+
+ while (inputLabel.renderer.bounds.extents.x * 2 > fieldLength)
+ {
+ modifiedText=modifiedText.Substring(1, modifiedText.Length - 1);
+ inputLabel.text = modifiedText;
+ inputLabel.Commit();
+ }
+
+ if (modifiedText.Length==0 && !listenForKeyboardText)
+ {
+ ShowDisplayText();
+ }
+ else
+ {
+ HideDisplayText();
+ }
+ }
+
+ private void ListenForKeyboardTextUpdate()
+ {
+ bool change = false;
+ string newText = text;
+ //http://docs.unity3d.com/Documentation/ScriptReference/Input-inputString.html
+
+ string inputStr = Input.inputString;
+ char c;
+ for (int i=0; i 0)
+ {
+ SendMessageTarget.SendMessage( SendMessageOnTextChangeMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+ }
+
+
+ private void InputSelected()
+ {
+ if (text.Length == 0)
+ {
+ HideDisplayText();
+ }
+ isSelected = true;
+ if (!listenForKeyboardText)
+ {
+ tk2dUIManager.Instance.OnInputUpdate += ListenForKeyboardTextUpdate;
+ }
+ listenForKeyboardText = true;
+ SetState();
+ SetCursorPosition();
+
+
+#if TOUCH_SCREEN_KEYBOARD
+ if (Application.platform != RuntimePlatform.WindowsEditor &&
+ Application.platform != RuntimePlatform.OSXEditor) {
+#if UNITY_ANDROID //due to a delete key bug in Unity Android
+ TouchScreenKeyboard.hideInput = false;
+#else
+ TouchScreenKeyboard.hideInput = true;
+#endif
+ keyboard = TouchScreenKeyboard.Open(text, TouchScreenKeyboardType.Default, false, false, false, false);
+ StartCoroutine(TouchScreenKeyboardLoop());
+ }
+#endif
+ }
+
+#if TOUCH_SCREEN_KEYBOARD
+ private IEnumerator TouchScreenKeyboardLoop()
+ {
+ while (keyboard != null && !keyboard.done && keyboard.active)
+ {
+ Text = keyboard.text;
+ yield return null;
+ }
+
+ if (keyboard != null)
+ {
+ Text = keyboard.text;
+ }
+
+ if (isSelected)
+ {
+ InputDeselected();
+ }
+ }
+#endif
+
+ private void InputDeselected()
+ {
+ if (text.Length == 0)
+ {
+ ShowDisplayText();
+ }
+ isSelected = false;
+ if (listenForKeyboardText)
+ {
+ tk2dUIManager.Instance.OnInputUpdate -= ListenForKeyboardTextUpdate;
+ }
+ listenForKeyboardText = false;
+ SetState();
+#if TOUCH_SCREEN_KEYBOARD
+ if (keyboard!=null && !keyboard.done)
+ {
+ keyboard.active = false;
+ }
+ keyboard = null;
+#endif
+ }
+
+ private void AnyPress()
+ {
+ if (isSelected && tk2dUIManager.Instance.PressedUIItem != selectionBtn)
+ {
+ InputDeselected();
+ }
+ }
+
+ private void SetState()
+ {
+ tk2dUIBaseItemControl.ChangeGameObjectActiveStateWithNullCheck(unSelectedStateGO, !isSelected);
+ tk2dUIBaseItemControl.ChangeGameObjectActiveStateWithNullCheck(selectedStateGO, isSelected);
+ tk2dUIBaseItemControl.ChangeGameObjectActiveState(cursor, isSelected);
+ }
+
+ private void SetCursorPosition()
+ {
+ float multiplier = 1;
+ float cursorOffset = 0.002f;
+ if (inputLabel.anchor == TextAnchor.MiddleLeft || inputLabel.anchor == TextAnchor.LowerLeft || inputLabel.anchor == TextAnchor.UpperLeft)
+ {
+ multiplier = 2;
+ }
+ else if (inputLabel.anchor == TextAnchor.MiddleRight || inputLabel.anchor == TextAnchor.LowerRight || inputLabel.anchor == TextAnchor.UpperRight)
+ {
+ multiplier = -2;
+ cursorOffset = 0.012f;
+ }
+
+ if (text.EndsWith(" "))
+ {
+ tk2dFontChar chr;
+ if (inputLabel.font.useDictionary)
+ {
+ chr = inputLabel.font.charDict[' '];
+ }
+ else
+ {
+ chr = inputLabel.font.chars[' '];
+ }
+
+ cursorOffset += chr.advance * inputLabel.scale.x/2;
+ }
+ cursor.transform.localPosition = new Vector3(inputLabel.transform.localPosition.x + (inputLabel.renderer.bounds.extents.x + cursorOffset) * multiplier, cursor.transform.localPosition.y, cursor.transform.localPosition.z);
+ }
+
+ private void ShowDisplayText()
+ {
+ if (!isDisplayTextShown)
+ {
+ isDisplayTextShown = true;
+ if (emptyDisplayLabel != null)
+ {
+ emptyDisplayLabel.text = emptyDisplayText;
+ emptyDisplayLabel.Commit();
+ tk2dUIBaseItemControl.ChangeGameObjectActiveState(emptyDisplayLabel.gameObject, true);
+ }
+ tk2dUIBaseItemControl.ChangeGameObjectActiveState(inputLabel.gameObject, false);
+ }
+ }
+
+ private void HideDisplayText()
+ {
+ if (isDisplayTextShown)
+ {
+ isDisplayTextShown = false;
+ tk2dUIBaseItemControl.ChangeGameObjectActiveStateWithNullCheck(emptyDisplayLabel.gameObject, false);
+ tk2dUIBaseItemControl.ChangeGameObjectActiveState(inputLabel.gameObject, true);
+ }
+ }
+
+ private void LayoutReshaped(Vector3 dMin, Vector3 dMax)
+ {
+ fieldLength += (dMax.x - dMin.x);
+ // No way to trigger re-format yet
+ string tmpText = this.text;
+ text = "";
+ Text = tmpText;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs.meta
new file mode 100644
index 000000000..7758d49f5
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITextInput.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 488a196572c4fa54ab8eb067439a798e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs
new file mode 100644
index 000000000..9b861aa75
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs
@@ -0,0 +1,118 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/tk2dUIToggleButton")]
+public class tk2dUIToggleButton : tk2dUIBaseItemControl
+{
+ ///
+ /// State that will be active if toggled off, deactivated if toggle on
+ ///
+ public GameObject offStateGO;
+
+ ///
+ /// State to be active if toggled on, deactivated if toggle off
+ ///
+ public GameObject onStateGO;
+
+ ///
+ /// If false toggles on click, if true toggles on button down
+ ///
+ public bool activateOnPress = false;
+
+ [SerializeField]
+ private bool isOn = true;
+
+ private bool isInToggleGroup = false;
+
+ ///
+ /// Event, if toggled
+ ///
+ public event System.Action OnToggle;
+
+ ///
+ /// Is toggle in On state
+ ///
+ public bool IsOn
+ {
+ get { return isOn; }
+ set
+ {
+ if (isOn != value)
+ {
+ isOn = value;
+ SetState();
+ if (OnToggle != null) { OnToggle(this); }
+ }
+
+ }
+ }
+
+ ///
+ /// If toggle is parent of toggle group
+ ///
+ public bool IsInToggleGroup
+ {
+ get { return isInToggleGroup; }
+ set { isInToggleGroup = value; }
+ }
+
+ public string SendMessageOnToggleMethodName = "";
+
+ void Start()
+ {
+ SetState();
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick += ButtonClick;
+ uiItem.OnDown += ButtonDown;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnClick -= ButtonClick;
+ uiItem.OnDown -= ButtonDown;
+ }
+ }
+
+ private void ButtonClick()
+ {
+ if (!activateOnPress)
+ {
+ ButtonToggle();
+ }
+ }
+
+ private void ButtonDown()
+ {
+ if (activateOnPress)
+ {
+ ButtonToggle();
+ }
+ }
+
+ private void ButtonToggle()
+ {
+ if (!isOn || !isInToggleGroup)
+ {
+ isOn = !isOn;
+ SetState();
+ if (OnToggle != null) { OnToggle(this); }
+
+ base.DoSendMessage( SendMessageOnToggleMethodName, this );
+ }
+ }
+
+ private void SetState()
+ {
+ ChangeGameObjectActiveStateWithNullCheck(offStateGO, !isOn);
+ ChangeGameObjectActiveStateWithNullCheck(onStateGO, isOn);
+ }
+
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs.meta
new file mode 100644
index 000000000..e39307dcc
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButton.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 97dfd85d1f3731f45a5ea74fa401d0a5
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButtonGroup.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButtonGroup.cs
new file mode 100644
index 000000000..d32f232d0
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleButtonGroup.cs
@@ -0,0 +1,167 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/tk2dUIToggleButtonGroup")]
+public class tk2dUIToggleButtonGroup : MonoBehaviour
+{
+ ///
+ /// Group of toggle buttons control but this manager. Only one can be selected at time
+ ///
+ [SerializeField]
+ private tk2dUIToggleButton[] toggleBtns;
+
+ public tk2dUIToggleButton[] ToggleBtns
+ {
+ get { return toggleBtns; }
+ }
+
+ ///
+ /// Target GameObject to SendMessage to. Use only if you want to use SendMessage, recommend using events instead if possble
+ ///
+ public GameObject sendMessageTarget = null;
+
+ ///
+ /// Which toggle button is to be on first (index)
+ ///
+ [SerializeField]
+ private int selectedIndex;
+
+ public int SelectedIndex
+ {
+ get { return selectedIndex; }
+ set
+ {
+ if (selectedIndex != value)
+ {
+ selectedIndex = value;
+ SetToggleButtonUsingSelectedIndex();
+ }
+ }
+ }
+
+ private tk2dUIToggleButton selectedToggleButton;
+
+ ///
+ /// Currently selected toggle button
+ ///
+ public tk2dUIToggleButton SelectedToggleButton
+ {
+ get { return selectedToggleButton; }
+ set
+ {
+ ButtonToggle(value);
+ }
+ }
+
+ ///
+ /// Event, on toggle button change
+ ///
+ public event System.Action OnChange;
+
+ public string SendMessageOnChangeMethodName = "";
+
+ protected virtual void Awake()
+ {
+ Setup();
+ }
+
+ protected void Setup()
+ {
+ foreach (tk2dUIToggleButton toggleBtn in toggleBtns)
+ {
+ if (toggleBtn != null)
+ {
+ toggleBtn.IsInToggleGroup = true;
+ toggleBtn.IsOn = false;
+ toggleBtn.OnToggle += ButtonToggle;
+ }
+ }
+ SetToggleButtonUsingSelectedIndex();
+ }
+
+ ///
+ /// Clears exists Group of toggle buttons, and adds new list of toggle buttons
+ ///
+ public void AddNewToggleButtons(tk2dUIToggleButton[] newToggleBtns)
+ {
+ ClearExistingToggleBtns();
+ toggleBtns = newToggleBtns;
+ Setup();
+ }
+
+ private void ClearExistingToggleBtns()
+ {
+ if (toggleBtns != null && toggleBtns.Length > 0)
+ {
+ foreach (tk2dUIToggleButton toggleBtn in toggleBtns)
+ {
+ toggleBtn.IsInToggleGroup = false;
+ toggleBtn.OnToggle -= ButtonToggle;
+ toggleBtn.IsOn = false;
+ }
+ }
+ }
+
+ private void SetToggleButtonUsingSelectedIndex()
+ {
+ tk2dUIToggleButton newToggleBtn = null;
+ if (selectedIndex >= 0 && selectedIndex < toggleBtns.Length)
+ {
+ newToggleBtn = toggleBtns[selectedIndex];
+ newToggleBtn.IsOn = true; //events will call ButtonToggle automatically
+ }
+ else
+ {
+ newToggleBtn = null;
+ selectedIndex = -1;
+ ButtonToggle(newToggleBtn);
+ }
+ }
+
+
+ private void ButtonToggle(tk2dUIToggleButton toggleButton)
+ {
+ if (toggleButton == null || toggleButton.IsOn)
+ {
+ foreach (tk2dUIToggleButton tempToggleBtn in toggleBtns)
+ {
+ if (tempToggleBtn != toggleButton)
+ {
+ tempToggleBtn.IsOn = false;
+ }
+ }
+
+ if (toggleButton != selectedToggleButton)
+ {
+ selectedToggleButton = toggleButton;
+ SetSelectedIndexFromSelectedToggleButton();
+
+ if (OnChange != null)
+ {
+ OnChange(this);
+ }
+
+ if (sendMessageTarget != null && SendMessageOnChangeMethodName.Length > 0)
+ {
+ sendMessageTarget.SendMessage( SendMessageOnChangeMethodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+ }
+ }
+
+ private void SetSelectedIndexFromSelectedToggleButton()
+ {
+ selectedIndex = -1;
+ tk2dUIToggleButton tempToggleBtn;
+ for (int n=0; n
+/// Toggle control that have both a toggle button and a description text
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIToggleControl")]
+public class tk2dUIToggleControl : tk2dUIToggleButton
+{
+ ///
+ /// Description of the toggle button
+ ///
+ public tk2dTextMesh descriptionTextMesh;
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleControl.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleControl.cs.meta
new file mode 100644
index 000000000..d66846580
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIToggleControl.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c841331f6cc22be458533fd2a5b470cd
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs
new file mode 100644
index 000000000..3d6a7e0c7
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs
@@ -0,0 +1,165 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Will scale uiItem up and down, on press events
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUITweenItem")]
+public class tk2dUITweenItem : tk2dUIBaseItemControl
+{
+ private Vector3 onUpScale; //keeps track of original scale
+
+ ///
+ /// What it should scsale to onDown event
+ ///
+ public Vector3 onDownScale = new Vector3(.9f, .9f, .9f);
+
+ ///
+ /// How long the tween (scaling) should last in seconds. If set to 0 no tween is used, happens instantly.
+ ///
+ public float tweenDuration = .1f;
+
+ ///
+ /// If button can be held down (will not be scale back to original until up/release)
+ /// Can not be toggled at run-time
+ ///
+ public bool canButtonBeHeldDown = true; //can not be toggled at runtime
+
+ ///
+ /// If using canButtonBeHeldDown, if the scale back to original should happen onRelease event instead of onUp event
+ ///
+ [SerializeField]
+ private bool useOnReleaseInsteadOfOnUp = false;
+
+ public bool UseOnReleaseInsteadOfOnUp
+ {
+ get { return useOnReleaseInsteadOfOnUp; }
+ }
+
+ private bool internalTweenInProgress = false;
+ private Vector3 tweenTargetScale = Vector3.one;
+ private Vector3 tweenStartingScale = Vector3.one;
+ private float tweenTimeElapsed = 0;
+
+ void Awake()
+ {
+ onUpScale = transform.localScale;
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown += ButtonDown;
+ if (canButtonBeHeldDown)
+ {
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease += ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp += ButtonUp;
+ }
+ }
+ }
+ internalTweenInProgress = false;
+ tweenTimeElapsed = 0;
+ transform.localScale = onUpScale;
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown -= ButtonDown;
+ if (canButtonBeHeldDown)
+ {
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease -= ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp -= ButtonUp;
+ }
+ }
+ }
+ }
+
+ private void ButtonDown()
+ {
+ if (tweenDuration <= 0)
+ {
+ transform.localScale = onDownScale;
+ }
+ else
+ {
+ transform.localScale = onUpScale;
+
+ tweenTargetScale = onDownScale;
+ tweenStartingScale = transform.localScale;
+ if (!internalTweenInProgress)
+ {
+ StartCoroutine(ScaleTween());
+ internalTweenInProgress = true;
+ }
+ }
+ }
+
+ private void ButtonUp()
+ {
+ if (tweenDuration <= 0)
+ {
+ transform.localScale = onUpScale;
+ }
+ else
+ {
+ tweenTargetScale = onUpScale;
+ tweenStartingScale = transform.localScale;
+ if (!internalTweenInProgress)
+ {
+ StartCoroutine(ScaleTween());
+ internalTweenInProgress = true;
+ }
+ }
+ }
+
+ private IEnumerator ScaleTween()
+ {
+ tweenTimeElapsed = 0;
+ while (tweenTimeElapsed < tweenDuration)
+ {
+ transform.localScale = Vector3.Lerp(tweenStartingScale,tweenTargetScale,tweenTimeElapsed / tweenDuration);
+ yield return null;
+ tweenTimeElapsed += tk2dUITime.deltaTime;
+ }
+ transform.localScale = tweenTargetScale;
+ internalTweenInProgress = false;
+
+ //if button is not held down bounce it back
+ if (!canButtonBeHeldDown)
+ {
+ if (tweenDuration <= 0)
+ {
+ transform.localScale = onUpScale;
+ }
+ else
+ {
+ tweenTargetScale = onUpScale;
+ tweenStartingScale = transform.localScale;
+ StartCoroutine(ScaleTween());
+ internalTweenInProgress = true;
+ }
+ }
+ }
+
+ ///
+ /// Internal do not use
+ ///
+ public void InternalSetUseOnReleaseInsteadOfOnUp(bool state)
+ {
+ useOnReleaseInsteadOfOnUp = state;
+ }
+
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs.meta
new file mode 100644
index 000000000..a131a31d8
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUITweenItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 098d0427ddca8e341a649d6fc12ca1ed
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs
new file mode 100644
index 000000000..d20ec2218
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs
@@ -0,0 +1,95 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// UpDown Button, changes state based on if it is up or down
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIUpDownButton")]
+public class tk2dUIUpDownButton : tk2dUIBaseItemControl
+{
+ ///
+ /// State that will be active if up and deactivated if down
+ ///
+ public GameObject upStateGO;
+
+ ///
+ /// State that will be active if down and deactivated if up
+ ///
+ public GameObject downStateGO;
+
+ ///
+ /// Use OnRelase instead of OnUp to toggle state
+ ///
+ [SerializeField]
+ private bool useOnReleaseInsteadOfOnUp = false;
+
+ public bool UseOnReleaseInsteadOfOnUp
+ {
+ get { return useOnReleaseInsteadOfOnUp; }
+ }
+
+ private bool isDown = false;
+
+ void Start()
+ {
+ SetState();
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown += ButtonDown;
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease += ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp += ButtonUp;
+ }
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown -= ButtonDown;
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease -= ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp -= ButtonUp;
+ }
+ }
+ }
+
+ private void ButtonUp()
+ {
+ isDown = false;
+ SetState();
+ }
+
+ private void ButtonDown()
+ {
+ isDown = true;
+ SetState();
+ }
+
+ private void SetState()
+ {
+ ChangeGameObjectActiveStateWithNullCheck(upStateGO, !isDown);
+ ChangeGameObjectActiveStateWithNullCheck(downStateGO, isDown);
+ }
+
+ ///
+ /// Internal do not use
+ ///
+ public void InternalSetUseOnReleaseInsteadOfOnUp(bool state)
+ {
+ useOnReleaseInsteadOfOnUp = state;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs.meta
new file mode 100644
index 000000000..3d0f63ade
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownButton.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4ac3ab2437c684d439506d1ac4a79d2e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs
new file mode 100644
index 000000000..d644028b1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs
@@ -0,0 +1,209 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// UpDown Button, changes state based on if it is up or down, plus hover
+///
+[AddComponentMenu("2D Toolkit/UI/tk2dUIUpDownHoverButton")]
+public class tk2dUIUpDownHoverButton : tk2dUIBaseItemControl
+{
+ ///
+ /// State that will be active if up and deactivated if down
+ ///
+ public GameObject upStateGO;
+
+ ///
+ /// State that will be active if down and deactivated if up
+ ///
+ public GameObject downStateGO;
+
+ ///
+ /// State that will be active is up and hovering over
+ ///
+ public GameObject hoverOverStateGO;
+
+ ///
+ /// Use OnRelase instead of OnUp to toggle state
+ ///
+ [SerializeField]
+ private bool useOnReleaseInsteadOfOnUp = false;
+
+ public bool UseOnReleaseInsteadOfOnUp
+ {
+ get { return useOnReleaseInsteadOfOnUp; }
+ }
+
+ private bool isDown = false;
+ private bool isHover = false;
+
+ public string SendMessageOnToggleOverMethodName = "";
+
+ ///
+ /// Is mouse currently over
+ ///
+ public bool IsOver
+ {
+ get { return isDown || isHover; }
+ set
+ {
+ if (value!=isDown||isHover)
+ {
+ if (value)
+ {
+ isHover = true;
+ SetState();
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ else
+ {
+ if (isDown && isHover)
+ {
+ isDown = false;
+ isHover = false;
+ SetState();
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ else if (isDown)
+ {
+ isDown = false;
+ SetState();
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ else
+ {
+ isHover = false;
+ SetState();
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ }
+ base.DoSendMessage( SendMessageOnToggleOverMethodName, this );
+ }
+ }
+ }
+
+ ///
+ /// Event on hover status change
+ ///
+ public event System.Action OnToggleOver;
+
+ void Start()
+ {
+ SetState();
+ }
+
+ void OnEnable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown += ButtonDown;
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease += ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp += ButtonUp;
+ }
+
+ uiItem.OnHoverOver += ButtonHoverOver;
+ uiItem.OnHoverOut += ButtonHoverOut;
+ }
+ }
+
+ void OnDisable()
+ {
+ if (uiItem)
+ {
+ uiItem.OnDown -= ButtonDown;
+ if (useOnReleaseInsteadOfOnUp)
+ {
+ uiItem.OnRelease -= ButtonUp;
+ }
+ else
+ {
+ uiItem.OnUp -= ButtonUp;
+ }
+
+ uiItem.OnHoverOver -= ButtonHoverOver;
+ uiItem.OnHoverOut -= ButtonHoverOut;
+ }
+ }
+
+ private void ButtonUp()
+ {
+ if (isDown)
+ {
+ isDown = false;
+ SetState();
+
+ if (!isHover)
+ {
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ }
+ }
+
+ private void ButtonDown()
+ {
+ if (!isDown)
+ {
+ isDown = true;
+ SetState();
+
+ if (!isHover)
+ {
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ }
+ }
+
+ private void ButtonHoverOver()
+ {
+ if (!isHover)
+ {
+ isHover = true;
+ SetState();
+
+ if (!isDown)
+ {
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ }
+ }
+
+ private void ButtonHoverOut()
+ {
+ if (isHover)
+ {
+ isHover = false;
+ SetState();
+
+ if (!isDown)
+ {
+ if (OnToggleOver != null) { OnToggleOver(this); }
+ }
+ }
+ }
+
+ public void SetState()
+ {
+ ChangeGameObjectActiveStateWithNullCheck(upStateGO, !isDown && !isHover);
+ if (downStateGO == hoverOverStateGO)
+ {
+ ChangeGameObjectActiveStateWithNullCheck(downStateGO, isDown || isHover);
+ }
+ else
+ {
+ ChangeGameObjectActiveStateWithNullCheck(downStateGO, isDown);
+ ChangeGameObjectActiveStateWithNullCheck(hoverOverStateGO, isHover);
+ }
+ }
+
+ ///
+ /// Internal do not use
+ ///
+ public void InternalSetUseOnReleaseInsteadOfOnUp(bool state)
+ {
+ useOnReleaseInsteadOfOnUp = state;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs.meta
new file mode 100644
index 000000000..362d96299
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Controls/tk2dUIUpDownHoverButton.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b8e88afb6c0595142be6b9f3e838f495
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core.meta
new file mode 100644
index 000000000..ac9e896f1
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e9ce7d2c60c21bb40b41fa27f5c22b3b
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs
new file mode 100644
index 000000000..01a0eeb0b
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs
@@ -0,0 +1,67 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Singleton AudioManager used by tk2dUISoundButton ex: tk2dUIAudioManager.Instance.Play(audioClip);
+///
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUIAudioManager")]
+public class tk2dUIAudioManager : MonoBehaviour
+{
+ private static tk2dUIAudioManager instance;
+
+ private AudioSource audioSrc;
+
+ public static tk2dUIAudioManager Instance
+ {
+ get
+ {
+ if (instance == null)
+ {
+ instance = FindObjectOfType(typeof(tk2dUIAudioManager)) as tk2dUIAudioManager;
+ if (instance == null)
+ {
+ instance = new GameObject("tk2dUIAudioManager").AddComponent();
+ }
+ }
+ return instance;
+ }
+ }
+
+ void Awake()
+ {
+ if (instance == null)
+ {
+ instance = this;
+ }
+ else
+ {
+ if (instance != this)
+ {
+ Destroy(this); // remove self, but don't destroy the gameobject its attached to. i.e. don't kill the host object.
+ return;
+ }
+ }
+ Setup();
+ }
+
+ private void Setup()
+ {
+ if (audioSrc == null)
+ {
+ audioSrc = gameObject.GetComponent();
+ }
+ if (audioSrc == null)
+ {
+ audioSrc = gameObject.AddComponent();
+ audioSrc.playOnAwake = false;
+ }
+ }
+
+ ///
+ /// Plays (One Shot) audio clip
+ ///
+ public void Play(AudioClip clip)
+ {
+ audioSrc.PlayOneShot(clip);
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs.meta
new file mode 100644
index 000000000..42c4e3d1a
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIAudioManager.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 465cd82eb427ff54489e83896440b0fa
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs
new file mode 100644
index 000000000..d3fbd69b0
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs
@@ -0,0 +1,42 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUICamera")]
+public class tk2dUICamera : MonoBehaviour {
+
+ // This is multiplied with the cameras layermask
+ [SerializeField]
+ private LayerMask raycastLayerMask = -1;
+
+ // This is used for backwards compatiblity only
+ public void AssignRaycastLayerMask( LayerMask mask ) {
+ raycastLayerMask = mask;
+ }
+
+ // The actual layermask, i.e. allowedMasks & layerMask
+ public LayerMask FilteredMask {
+ get {
+ return raycastLayerMask & camera.cullingMask;
+ }
+ }
+
+ public Camera HostCamera {
+ get {
+ return camera;
+ }
+ }
+
+ void OnEnable() {
+ if (camera == null) {
+ Debug.LogError("tk2dUICamera should only be attached to a camera.");
+ enabled = false;
+ return;
+ }
+
+ tk2dUIManager.RegisterCamera( this );
+ }
+
+ void OnDisable() {
+ tk2dUIManager.UnregisterCamera( this );
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs.meta
new file mode 100644
index 000000000..709e47fc4
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUICamera.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 17dfb34e55e3441ca8d12eda396ce770
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: -31116
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs
new file mode 100644
index 000000000..31e16b335
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs
@@ -0,0 +1,471 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// UI primary class. All colliders that need to response to touch/mouse events need to have this attached. This will then handle and dispatch events
+///
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUIItem")]
+public class tk2dUIItem : MonoBehaviour
+{
+ ///
+ /// Pressed
+ ///
+ public event System.Action OnDown;
+
+ ///
+ /// Unpressed, possibly on exit of collider area without releasing
+ ///
+ public event System.Action OnUp;
+
+ ///
+ /// Click - down and up while not leaving collider area
+ ///
+ public event System.Action OnClick;
+
+ ///
+ /// After on down, when touch/click is released (this could be anywhere)
+ ///
+ public event System.Action OnRelease;
+
+ ///
+ /// On mouse hover over (only if using mouse, hover is enabled(tk2dUIManager.areHoverEventsTracked) and if multi-touch is disabled(tk2dUIManager.useMultiTouch))
+ ///
+ public event System.Action OnHoverOver; //if mouse hover (only if using mouse and only if hover enabled in button)
+
+ ///
+ /// On mouse hover leaving collider (only if using mouse, hover is enabled(tk2dUIManager.areHoverEventsTracked) and if multi-touch is disabled(tk2dUIManager.useMultiTouch))
+ ///
+ public event System.Action OnHoverOut; //if mouse no longer hover (only if using mouse and only if hover enabled in button)
+
+ ///
+ /// Same as OnDown above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnDownUIItem;
+
+ ///
+ /// Same as OnUp above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnUpUIItem;
+
+ ///
+ /// Same as OnClick above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnClickUIItem;
+
+ ///
+ /// Same as OnRelease above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnReleaseUIItem;
+
+ ///
+ /// Same as OnHoverOver above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnHoverOverUIItem;
+
+ ///
+ /// Same as OnHoverOut above, except returns this tk2dUIItem
+ ///
+ public event System.Action OnHoverOutUIItem;
+
+ ///
+ /// Target GameObject to SendMessage to. Use only if you want to use SendMessage, recommend using events instead if possble
+ ///
+ public GameObject sendMessageTarget = null;
+
+ ///
+ /// Function name to SendMessage OnDown
+ ///
+ public string SendMessageOnDownMethodName = "";
+
+ ///
+ /// Function name to SendMessage OnUp
+ ///
+ public string SendMessageOnUpMethodName = "";
+
+ ///
+ /// Function name to SendMessage OnClick
+ ///
+ public string SendMessageOnClickMethodName = "";
+ ///
+ /// Function name to SendMessage OnRelease
+ ///
+ public string SendMessageOnReleaseMethodName = "";
+
+ ///
+ /// If this UIItem is a hierarchy child of another UIItem and you wish to pass events between them
+ ///
+ [SerializeField]
+ private bool isChildOfAnotherUIItem = false; //if it is a child of another MenuButton, if true will send events down to parents (only used in awake)
+
+ ///
+ /// If this UIItem is a hierarchy parent of another UIItem that is marked as isChildOfAnotherUIItem, and you wish to receive touch/click/hover events from child
+ ///
+ public bool registerPressFromChildren = false; //if you press a child, will this button also be marked as pressed
+
+ ///
+ /// If this UIItem should receive hover events (if hover enabled(tk2dUIManager.areHoverEventsTracked), mouse is being used and multi-touch is diabled(tk2dUIManager.useMultiTouch))
+ ///
+ public bool isHoverEnabled = false;
+
+ public Transform[] editorExtraBounds = new Transform[0]; // This is used by the editor to include additional meshes when calculating bounds. Eg. label area in dropdown
+ public Transform[] editorIgnoreBounds = new Transform[0]; // This is used by the editor to ignore certain meshes when calculating bounds. Eg. content in scrollable area
+ private bool isPressed = false; //need to be listening to OnUp or OnClicked for this to show the current state
+ private bool isHoverOver = false; //is currently hover over (only if hover enabld)
+ private tk2dUITouch touch; //touch struct of the active touch
+ private tk2dUIItem parentUIItem = null; //parent UIItem, only used if isChild is set
+
+ void Awake()
+ {
+ if (isChildOfAnotherUIItem)
+ {
+ UpdateParent();
+ }
+ }
+
+ void Start()
+ {
+ if (tk2dUIManager.Instance == null) {
+ Debug.LogError("Unable to find tk2dUIManager. Please create a tk2dUIManager in the scene before proceeding.");
+ }
+
+ if (isChildOfAnotherUIItem && parentUIItem==null)
+ {
+ UpdateParent();
+ }
+ }
+
+ ///
+ /// If currently pressed (down)
+ ///
+ public bool IsPressed
+ {
+ get { return isPressed; }
+ }
+
+ ///
+ /// If pressed active touch event
+ ///
+ public tk2dUITouch Touch
+ {
+ get { return touch; }
+ }
+
+ ///
+ /// If set as child of another UIItem, this is that parentUIItem
+ ///
+ public tk2dUIItem ParentUIItem
+ {
+ get { return parentUIItem; }
+ }
+
+ //if you change the parent, call this, if isChild is false, will act as if it is true
+ ///
+ /// If you change the parent (in hierarchy) call this. If isChildOfAnotherUIItem is false, will act as if it is true
+ ///
+ public void UpdateParent()
+ {
+ parentUIItem = GetParentUIItem();
+ }
+
+ ///
+ /// Manually setting specific UIItem parent
+ ///
+ public void ManuallySetParent(tk2dUIItem newParentUIItem)
+ {
+ parentUIItem = newParentUIItem;
+ }
+
+ ///
+ /// Will remove parent and act as if isChildOfAnotherUIItem is false
+ ///
+ public void RemoveParent()
+ {
+ parentUIItem = null;
+ }
+
+ ///
+ /// Touch press down (only call manually, if you need to simulate a touch)
+ ///
+ public bool Press(tk2dUITouch touch) //pressed down ontop of button
+ {
+ return Press(touch, null);
+ }
+
+ ///
+ /// Touch press down (only call manually, if you need to simulate a touch). SentFromChild is the UIItem child it was sent from. If sentFromChild is
+ /// null that means it wasn't sent from a child
+ ///
+ /// ///
+ /// return true if newly pressed
+ ///
+ public bool Press(tk2dUITouch touch, tk2dUIItem sentFromChild) //pressed down ontop of button
+ {
+ if (isPressed)
+ {
+ return false; //already pressed
+ }
+ if (!isPressed)
+ {
+ this.touch = touch;
+ //if orginal press (not sent from child), or resgieterPressFromChildren is enabled
+ if (registerPressFromChildren || sentFromChild == null)
+ {
+ if (enabled)
+ {
+ isPressed = true;
+
+ if (OnDown != null) { OnDown(); }
+ if (OnDownUIItem != null) { OnDownUIItem(this); }
+ DoSendMessage( SendMessageOnDownMethodName );
+ }
+ }
+
+ if (parentUIItem != null)
+ {
+ parentUIItem.Press(touch, this);
+ }
+ }
+ return true; //newly touched
+ }
+
+ ///
+ /// Fired every frame this touch is still down, regardless if button is down. Only call manually if you need to simulate a touch
+ ///
+ public void UpdateTouch(tk2dUITouch touch)
+ {
+ this.touch = touch;
+ if (parentUIItem != null)
+ {
+ parentUIItem.UpdateTouch(touch);
+ }
+ }
+
+ // A wrapper for sendmessage, either sends with no parameter, or this as parameter
+ private void DoSendMessage( string methodName ) {
+ if (sendMessageTarget != null && methodName.Length > 0) {
+ sendMessageTarget.SendMessage( methodName, this, SendMessageOptions.RequireReceiver );
+ }
+ }
+
+ ///
+ /// Touch is released, if called without Exit being called means that it was released on top of button without leaving it.
+ /// Only call manually if you need to simulate a touch.
+ ///
+ public void Release()
+ {
+ if (isPressed)
+ {
+ isPressed = false;
+
+ if (OnUp != null) { OnUp(); }
+ if (OnUpUIItem != null) { OnUpUIItem(this); }
+ DoSendMessage( SendMessageOnUpMethodName );
+
+ if (OnClick != null) { OnClick(); }
+ if (OnClickUIItem != null) { OnClickUIItem(this); }
+ DoSendMessage( SendMessageOnClickMethodName );
+ }
+
+ if (OnRelease != null) { OnRelease(); }
+ if (OnReleaseUIItem != null) { OnReleaseUIItem(this); }
+ DoSendMessage( SendMessageOnReleaseMethodName );
+
+ if (parentUIItem != null)
+ {
+ parentUIItem.Release();
+ }
+ }
+
+ ///
+ /// Touch/mouse currently over UIItem. If exitting this button, but still overtop of another Button, this might be a parent. Checks if parent and
+ /// does not exit.
+ /// Only call manually if you need to simulate touch.
+ ///
+ public void CurrentOverUIItem(tk2dUIItem overUIItem)
+ {
+ if (overUIItem != this)
+ {
+ if (isPressed)
+ {
+ //check if overButton is child
+ bool isUIItemChild = CheckIsUIItemChildOfMe(overUIItem);
+ if (!isUIItemChild)
+ {
+ Exit();
+ if (parentUIItem != null)
+ {
+ parentUIItem.CurrentOverUIItem(overUIItem);
+ }
+ }
+ }
+ else
+ {
+ if (parentUIItem != null)
+ {
+ parentUIItem.CurrentOverUIItem(overUIItem);
+ }
+ }
+ }
+ }
+
+ ///
+ /// Is uiItem a child of this current tk2dUIItem
+ /// Only call manually if you need to simulate touch.
+ ///
+ public bool CheckIsUIItemChildOfMe(tk2dUIItem uiItem)
+ {
+ tk2dUIItem nextUIItem = null;
+ bool result = false;
+
+ if (uiItem != null)
+ {
+ nextUIItem = uiItem.parentUIItem;
+ }
+
+ while (nextUIItem != null)
+ {
+ if (nextUIItem == this)
+ {
+ result = true;
+ break;
+ }
+ nextUIItem = nextUIItem.parentUIItem;
+ }
+
+ return result;
+ }
+
+ ///
+ /// Exit uiItem. Does not cascade (need to manually call on all children if needed)
+ /// Only call manually if you need to simulate touch.
+ ///
+ public void Exit()
+ {
+ if (isPressed)
+ {
+ isPressed = false;
+
+ if (OnUp != null) { OnUp(); }
+ if (OnUpUIItem != null) { OnUpUIItem(this); }
+ DoSendMessage( SendMessageOnUpMethodName );
+ }
+ }
+
+ ///
+ /// Hover over item. Return true if this was prevHover.
+ /// Only call manually if you need to simulate touch.
+ ///
+ public bool HoverOver(tk2dUIItem prevHover)
+ {
+ bool wasPrevHoverFound = false;
+ tk2dUIItem nextUIItem = null;
+ if (!isHoverOver)
+ {
+ if (OnHoverOver != null) { OnHoverOver(); }
+ if (OnHoverOverUIItem != null) { OnHoverOverUIItem(this); }
+ isHoverOver = true;
+ }
+
+ if (prevHover == this)
+ {
+ wasPrevHoverFound = true;
+ }
+
+ if (parentUIItem != null && parentUIItem.isHoverEnabled)
+ {
+ nextUIItem = parentUIItem;
+ }
+
+ if (nextUIItem == null)
+ {
+ return wasPrevHoverFound;
+ }
+ else
+ {
+ return nextUIItem.HoverOver(prevHover) || wasPrevHoverFound; //will return true once found
+ }
+ }
+
+ ///
+ /// Hover out item.
+ /// Only call manually if you need to simulate touch.
+ ///
+ public void HoverOut(tk2dUIItem currHoverButton)
+ {
+ if (isHoverOver)
+ {
+ if (OnHoverOut != null) { OnHoverOut(); }
+ if (OnHoverOutUIItem != null) { OnHoverOutUIItem(this); }
+ isHoverOver = false;
+ }
+
+ if (parentUIItem != null && parentUIItem.isHoverEnabled)
+ {
+ if (currHoverButton == null)
+ {
+ parentUIItem.HoverOut(currHoverButton);
+ }
+ else
+ {
+ if (!parentUIItem.CheckIsUIItemChildOfMe(currHoverButton) && currHoverButton != parentUIItem)
+ {
+ parentUIItem.HoverOut(currHoverButton);
+ }
+ }
+ }
+
+ }
+
+ //determine what the parent UIItem is, is called is isChildOfUIItem is set to true
+ private tk2dUIItem GetParentUIItem()
+ {
+ Transform next = transform.parent;
+ tk2dUIItem nextUIItem;
+ while (next != null)
+ {
+ nextUIItem = next.GetComponent();
+ if (nextUIItem != null)
+ {
+ return nextUIItem;
+ }
+ next = next.parent;
+ }
+ return null;
+ }
+
+ ///
+ /// Simluates a click event
+ /// Only call manually if you need to simulate touch.
+ ///
+ public void SimulateClick()
+ {
+ if (OnDown != null) { OnDown(); }
+ if (OnDownUIItem != null) { OnDownUIItem(this); }
+ DoSendMessage( SendMessageOnDownMethodName );
+
+ if (OnUp != null) { OnUp(); }
+ if (OnUpUIItem != null) { OnUpUIItem(this); }
+ DoSendMessage( SendMessageOnUpMethodName );
+
+ if (OnClick != null) { OnClick(); }
+ if (OnClickUIItem != null) { OnClickUIItem(this); }
+ DoSendMessage( SendMessageOnClickMethodName );
+
+ if (OnRelease != null) { OnRelease(); }
+ if (OnReleaseUIItem != null) { OnReleaseUIItem(this); }
+ DoSendMessage( SendMessageOnReleaseMethodName );
+ }
+
+ ///
+ /// Internal do not call
+ ///
+ public void InternalSetIsChildOfAnotherUIItem(bool state)
+ {
+ isChildOfAnotherUIItem = state;
+ }
+
+ public bool InternalGetIsChildOfAnotherUIItem()
+ {
+ return isChildOfAnotherUIItem;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs.meta
new file mode 100644
index 000000000..6925adaa2
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIItem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3d932ed487efc2f4c8b824406c968e59
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs
new file mode 100644
index 000000000..63cb930a4
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs
@@ -0,0 +1,149 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+[System.Serializable]
+public class tk2dUILayoutItem {
+ public tk2dBaseSprite sprite = null;
+ public tk2dUIMask UIMask = null;
+ public tk2dUILayout layout = null;
+ public GameObject gameObj = null;
+
+ public bool snapLeft = false;
+ public bool snapRight = false;
+ public bool snapTop = false;
+ public bool snapBottom = false;
+
+ // ContainerSizer
+ public bool fixedSize = false;
+ public float fillPercentage = -1;
+ public float sizeProportion = 1;
+ public static tk2dUILayoutItem FixedSizeLayoutItem() {
+ tk2dUILayoutItem item = new tk2dUILayoutItem();
+ item.fixedSize = true;
+ return item;
+ }
+
+ // Internal
+ public bool inLayoutList = false;
+ public int childDepth = 0;
+ public Vector3 oldPos = Vector3.zero;
+}
+
+///
+/// UI layout class.
+///
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUILayout")]
+public class tk2dUILayout : MonoBehaviour {
+ public Vector3 bMin = new Vector3(0, -1, 0);
+ public Vector3 bMax = new Vector3(1, 0, 0);
+
+ public List layoutItems = new List();
+
+ public int ItemCount {
+ get {return layoutItems.Count;}
+ }
+
+ public bool autoResizeCollider = false;
+
+ public event System.Action OnReshape;
+
+ void Reset() {
+ if (collider != null) {
+ BoxCollider box = collider as BoxCollider;
+ if (box != null) {
+ Bounds b = box.bounds;
+ Matrix4x4 m = transform.worldToLocalMatrix;
+ Vector3 oldWorldPos = transform.position;
+ Reshape(m.MultiplyPoint(b.min) - bMin, m.MultiplyPoint(b.max) - bMax, true);
+ Vector3 deltaLocalPos = m.MultiplyVector(transform.position - oldWorldPos);
+
+ Transform t = transform;
+ for (int i = 0; i < t.childCount; ++i) {
+ Transform c = t.GetChild(i);
+ Vector3 p = c.localPosition - deltaLocalPos;
+ c.localPosition = p;
+ }
+
+ box.center = box.center - deltaLocalPos;
+
+ autoResizeCollider = true;
+ }
+ }
+ }
+
+ public virtual void Reshape(Vector3 dMin, Vector3 dMax, bool updateChildren) {
+ foreach (var item in layoutItems) {
+ item.oldPos = item.gameObj.transform.position;
+ }
+
+ bMin += dMin;
+ bMax += dMax;
+ // Anchor top-left
+ Vector3 origin = new Vector3(bMin.x, bMax.y);
+ transform.position += transform.localToWorldMatrix.MultiplyVector(origin);
+ bMin -= origin;
+ bMax -= origin;
+
+ if (autoResizeCollider) {
+ var box = GetComponent();
+ if (box != null) {
+ box.center += (dMin + dMax) / 2.0f - origin;
+ box.size += (dMax - dMin);
+ }
+ }
+
+ foreach (var item in layoutItems) {
+ var offset = transform.worldToLocalMatrix.MultiplyVector(item.gameObj.transform.position - item.oldPos);
+ Vector3 qMin = -offset;
+ Vector3 qMax = -offset;
+ if (updateChildren) {
+ qMin.x += item.snapLeft ? dMin.x : (item.snapRight ? dMax.x : 0);
+ qMin.y += item.snapBottom ? dMin.y : (item.snapTop ? dMax.y : 0);
+ qMax.x += item.snapRight ? dMax.x : (item.snapLeft ? dMin.x : 0);
+ qMax.y += item.snapTop ? dMax.y : (item.snapBottom ? dMin.y : 0);
+ }
+ if (item.sprite != null || item.UIMask != null || item.layout != null) {
+ // Transform from my space into item's space
+ Matrix4x4 m = transform.localToWorldMatrix * item.gameObj.transform.worldToLocalMatrix;
+ qMin = m.MultiplyVector(qMin);
+ qMax = m.MultiplyVector(qMax);
+ }
+ if (item.sprite != null)
+ item.sprite.ReshapeBounds(qMin, qMax);
+ else if (item.UIMask != null)
+ item.UIMask.ReshapeBounds(qMin, qMax);
+ else if (item.layout != null)
+ item.layout.Reshape(qMin, qMax, true);
+ else {
+ Vector3 s = qMin;
+ if (item.snapLeft && item.snapRight)
+ s.x = 0.5f * (qMin.x + qMax.x);
+ if (item.snapTop && item.snapBottom)
+ s.y = 0.5f * (qMin.y + qMax.y);
+ item.gameObj.transform.position += s;
+ }
+ }
+
+ if (OnReshape != null)
+ OnReshape(dMin, dMax);
+ }
+
+ public void SetBounds(Vector3 pMin, Vector3 pMax) {
+ Matrix4x4 m = transform.worldToLocalMatrix;
+ Reshape(m.MultiplyPoint(pMin) - bMin, m.MultiplyPoint(pMax) - bMax, true);
+ }
+
+ public Vector3 GetMinBounds() {
+ Matrix4x4 m = transform.localToWorldMatrix;
+ return m.MultiplyPoint(bMin);
+ }
+
+ public Vector3 GetMaxBounds() {
+ Matrix4x4 m = transform.localToWorldMatrix;
+ return m.MultiplyPoint(bMax);
+ }
+
+ public void Refresh() {
+ Reshape(Vector3.zero, Vector3.zero, true);
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs.meta
new file mode 100644
index 000000000..517c53403
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayout.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a677072d2a0bc494abd400e1dd1a0918
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs
new file mode 100644
index 000000000..a9b801141
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs
@@ -0,0 +1,60 @@
+using UnityEngine;
+using System.Collections;
+
+public abstract class tk2dUILayoutContainer : tk2dUILayout {
+ protected Vector2 innerSize = Vector2.zero;
+ public Vector2 GetInnerSize() {
+ return innerSize;
+ }
+
+ protected abstract void DoChildLayout();
+
+ public event System.Action OnChangeContent;
+
+ public override void Reshape(Vector3 dMin, Vector3 dMax, bool updateChildren) {
+ bMin += dMin;
+ bMax += dMax;
+ // Anchor top-left
+ Vector3 origin = new Vector3(bMin.x, bMax.y);
+ transform.position += origin;
+ bMin -= origin;
+ bMax -= origin;
+
+ DoChildLayout();
+
+ if (OnChangeContent != null)
+ OnChangeContent();
+ }
+
+ public void AddLayout(tk2dUILayout layout, tk2dUILayoutItem item) {
+ item.gameObj = layout.gameObject;
+ item.layout = layout;
+ layoutItems.Add(item);
+
+ layout.gameObject.transform.parent = transform;
+
+ Refresh();
+ }
+
+ public void AddLayoutAtIndex(tk2dUILayout layout, tk2dUILayoutItem item, int index) {
+ item.gameObj = layout.gameObject;
+ item.layout = layout;
+ layoutItems.Insert(index, item);
+
+ layout.gameObject.transform.parent = transform;
+
+ Refresh();
+ }
+
+ public void RemoveLayout(tk2dUILayout layout) {
+ foreach (var item in layoutItems) {
+ if (item.layout == layout) {
+ layoutItems.Remove(item);
+ layout.gameObject.transform.parent = null;
+ break;
+ }
+ }
+
+ Refresh();
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs.meta
new file mode 100644
index 000000000..55bff2aec
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainer.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c9a728763e837e74cb46a0efb1bdfdf3
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs
new file mode 100644
index 000000000..c7bad1716
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs
@@ -0,0 +1,86 @@
+using UnityEngine;
+using System.Collections.Generic;
+
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUILayoutContainerSizer")]
+public class tk2dUILayoutContainerSizer : tk2dUILayoutContainer {
+ public bool horizontal = false; // otherwise vertical
+ public bool expand = true;
+ public Vector2 margin = Vector2.zero;
+ public float spacing = 0;
+
+ protected override void DoChildLayout() {
+ int n = layoutItems.Count;
+ if (n == 0) return;
+
+ float w = bMax.x - bMin.x - 2.0f * margin.x;
+ float h = bMax.y - bMin.y - 2.0f * margin.y;
+ float totalSpace = (horizontal ? w : h) - spacing * (float)(n - 1);
+ float percentageTotal = 1;
+ float space = totalSpace;
+ float proportionSum = 0;
+
+ float[] childSize = new float[n];
+ for (int i = 0; i < n; ++i) {
+ var item = layoutItems[i];
+ if (item.fixedSize) {
+ childSize[i] = horizontal ? (item.layout.bMax.x - item.layout.bMin.x) : (item.layout.bMax.y - item.layout.bMin.y);
+ space -= childSize[i];
+ } else if (item.fillPercentage > 0) {
+ float frc = percentageTotal * item.fillPercentage / 100.0f;
+ childSize[i] = totalSpace * frc;
+ space -= childSize[i];
+ percentageTotal -= frc;
+ } else {
+ proportionSum += item.sizeProportion;
+ }
+ }
+ for (int i = 0; i < n; ++i) {
+ var item = layoutItems[i];
+ if (!item.fixedSize && item.fillPercentage <= 0) {
+ childSize[i] = space * item.sizeProportion / proportionSum;
+ }
+ }
+
+ Vector3 pMin = Vector3.zero;
+ Vector3 pMax = Vector3.zero;
+ float p = 0;
+ Matrix4x4 m = transform.localToWorldMatrix;
+ if (horizontal) {
+ innerSize = new Vector2(2 * margin.x + spacing * (n - 1), bMax.y - bMin.y);
+ } else {
+ innerSize = new Vector2(bMax.x - bMin.x, 2 * margin.y + spacing * (n - 1));
+ }
+ for (int i = 0; i < n; ++i) {
+ var item = layoutItems[i];
+ Matrix4x4 itemToLocal = item.gameObj.transform.localToWorldMatrix * transform.worldToLocalMatrix;
+
+ if (horizontal) {
+ if (expand) {
+ pMin.y = bMin.y + margin.y;
+ pMax.y = bMax.y - margin.y;
+ }
+ else {
+ pMin.y = itemToLocal.MultiplyPoint(item.layout.bMin).y;
+ pMax.y = itemToLocal.MultiplyPoint(item.layout.bMax).y;
+ }
+ pMin.x = bMin.x + margin.x + p;
+ pMax.x = pMin.x + childSize[i];
+ } else {
+ if (expand) {
+ pMin.x = bMin.x + margin.x;
+ pMax.x = bMax.x - margin.x;
+ }
+ else {
+ pMin.x = itemToLocal.MultiplyPoint(item.layout.bMin).x;
+ pMax.x = itemToLocal.MultiplyPoint(item.layout.bMax).x;
+ }
+ pMax.y = bMax.y - margin.y - p;
+ pMin.y = pMax.y - childSize[i];
+ }
+ item.layout.SetBounds(m.MultiplyPoint(pMin), m.MultiplyPoint(pMax));
+ p += childSize[i] + spacing;
+ if (horizontal) innerSize.x += childSize[i];
+ else innerSize.y += childSize[i];
+ }
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs.meta
new file mode 100644
index 000000000..164c84c9c
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUILayoutContainerSizer.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8deddd35e4c74b44a8d12b692bb3ba21
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs
new file mode 100644
index 000000000..e14efacfd
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs
@@ -0,0 +1,668 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+///
+/// UI logic. Manages all UI, raycasting, touch/mouse events passing and uiItem event notifications.
+/// For any tk2dUIItem to work there needs to be a tk2dUIManager in the scene
+///
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUIManager")]
+public class tk2dUIManager : MonoBehaviour
+{
+ public static double version = 1.0;
+ public static int releaseId = 0; // < -10000 = alpha, other negative = beta release, 0 = final, positive = final patch
+
+ ///
+ /// Used to reference tk2dUIManager without a direct reference via singleton structure (will not auto-create and only one can exist at a time)
+ ///
+ private static tk2dUIManager instance;
+ public static tk2dUIManager Instance
+ {
+ get
+ {
+ if (instance == null)
+ {
+ instance = FindObjectOfType(typeof(tk2dUIManager)) as tk2dUIManager;
+ if (instance == null) {
+ GameObject go = new GameObject("tk2dUIManager");
+ instance = go.AddComponent();
+ }
+ }
+ return instance;
+ }
+ }
+
+ public static tk2dUIManager Instance__NoCreate {
+ get {
+ return instance;
+ }
+ }
+
+ ///
+ /// UICamera which raycasts for mouse/touch inputs are cast from
+ ///
+ [SerializeField]
+#pragma warning disable 649
+ private Camera uiCamera;
+#pragma warning restore 649
+
+ public Camera UICamera
+ {
+ get { return uiCamera; }
+ set { uiCamera = value; }
+ }
+
+ public Camera GetUICameraForControl( GameObject go ) {
+ int layer = 1 << go.layer;
+ foreach (tk2dUICamera camera in allCameras) {
+ if ((camera.FilteredMask & layer) != 0) {
+ return camera.HostCamera;
+ }
+ }
+ Debug.LogError("Unable to find UI camera for " + go.name);
+ return null;
+ }
+
+ static List allCameras = new List();
+ List sortedCameras = new List();
+
+ public static void RegisterCamera(tk2dUICamera cam) {
+ allCameras.Add(cam);
+ }
+
+ public static void UnregisterCamera(tk2dUICamera cam) {
+ allCameras.Remove(cam);
+ }
+
+ ///
+ /// Which layer the raycast will be done using. Will ignore others
+ ///
+ public LayerMask raycastLayerMask = -1;
+
+ private bool inputEnabled = true;
+
+ ///
+ /// Used to disable user input
+ ///
+ public bool InputEnabled
+ {
+ get { return inputEnabled; }
+ set
+ {
+ if (inputEnabled && !value) //disable current presses/hovers
+ {
+ SortCameras();
+
+ inputEnabled = value;
+ if (useMultiTouch)
+ {
+ CheckMultiTouchInputs();
+ }
+ else
+ {
+ CheckInputs();
+ }
+ }
+ else
+ {
+ inputEnabled = value;
+ }
+
+ }
+ }
+
+ ///
+ /// If hover events are to be tracked. If you don't not need hover events disable for increased performance (less raycasting).
+ /// Only works when using mouse and multi-touch is disabled (tk2dUIManager.useMultiTouch)
+ ///
+ public bool areHoverEventsTracked = true; //if disable no hover events will be tracked (less overhead), only effects if using mouse
+
+ private tk2dUIItem pressedUIItem = null;
+
+ ///
+ /// Most recent pressedUIItem (if one is pressed). If multi-touch gets the most recent
+ ///
+ public tk2dUIItem PressedUIItem
+ {
+ get
+ {
+ //if multi-touch return the last item (most recent touch)
+ if (useMultiTouch)
+ {
+ if (pressedUIItems.Length > 0)
+ {
+ return pressedUIItems[pressedUIItems.Length-1];
+ }
+ else
+ {
+ return null;
+ }
+ }
+ else
+ {
+ return pressedUIItem;
+ }
+ }
+ }
+
+ ///
+ /// All currently pressed down UIItems if using multi-touch
+ ///
+ public tk2dUIItem[] PressedUIItems
+ {
+ get { return pressedUIItems; }
+ }
+
+ private tk2dUIItem overUIItem = null; //current hover over uiItem
+ private tk2dUITouch firstPressedUIItemTouch; //used to determine deltas
+
+ private bool checkForHovers = true; //if internal we are checking for hovers
+
+ ///
+ /// Use multi-touch. Only enable if you need multi-touch support. When multi-touch is enabled, hover events are disabled.
+ /// Multi-touch disable will provide better performance and accuracy.
+ ///
+ [SerializeField]
+ private bool useMultiTouch = false;
+
+ public bool UseMultiTouch
+ {
+ get { return useMultiTouch; }
+ set
+ {
+ if (useMultiTouch != value && inputEnabled) //changed
+ {
+ InputEnabled = false; //clears existing
+ useMultiTouch = value;
+ InputEnabled = true;
+ }
+ else
+ {
+ useMultiTouch = value;
+ }
+ }
+ }
+
+ //multi-touch specifics
+ private const int MAX_MULTI_TOUCH_COUNT = 5; //number of touches at the same time
+ private tk2dUITouch[] allTouches = new tk2dUITouch[MAX_MULTI_TOUCH_COUNT]; //all multi-touches
+ private List prevPressedUIItemList = new List(); //previous pressed and still pressed UIItems
+ private tk2dUIItem[] pressedUIItems = new tk2dUIItem[MAX_MULTI_TOUCH_COUNT]; //pressed UIItem on the this frame
+
+ private int touchCounter = 0; //touchs counter
+ private Vector2 mouseDownFirstPos = Vector2.zero; //used to determine mouse position deltas while in multi-touch
+ //end multi-touch specifics
+
+ private const string MOUSE_WHEEL_AXES_NAME = "Mouse ScrollWheel"; //Input name of mouse scroll wheel
+
+ //for update loop
+ private tk2dUITouch primaryTouch = new tk2dUITouch(); //main touch (generally began, or actively press)
+ private tk2dUITouch secondaryTouch = new tk2dUITouch(); //secondary touches (generally other fingers)
+ private tk2dUITouch resultTouch = new tk2dUITouch(); //which touch is selected between primary and secondary
+ private tk2dUIItem hitUIItem; //current uiItem hit
+ private RaycastHit hit;
+ private Ray ray;
+
+ //for update loop (multi-touch)
+ private tk2dUITouch currTouch;
+ private tk2dUIItem currPressedItem;
+ private tk2dUIItem prevPressedItem;
+
+ ///
+ /// Only any touch began or mouse click
+ ///
+ public event System.Action OnAnyPress;
+ ///
+ /// Fired at the end of every update
+ ///
+ public event System.Action OnInputUpdate;
+
+ ///
+ /// On mouse scroll wheel change (return direction of mouse scroll wheel change)
+ ///
+ public event System.Action OnScrollWheelChange;
+
+ void SortCameras() {
+ sortedCameras.Clear();
+ foreach (tk2dUICamera c in allCameras) {
+ if (c != null) {
+ sortedCameras.Add( c );
+ }
+ }
+
+ // Largest depth gets priority
+ sortedCameras.Sort( (a, b) => b.camera.depth.CompareTo( a.camera.depth ) );
+ }
+
+ void Awake()
+ {
+ if (instance == null)
+ {
+ instance = this;
+ if (Application.isPlaying) {
+ DontDestroyOnLoad( gameObject );
+ }
+ }
+ else
+ {
+ //can only be one tk2dUIManager at one-time, if another one is found Destroy it
+ if (instance != this)
+ {
+ Debug.Log("Discarding unnecessary tk2dUIManager instance.");
+ return;
+ }
+ }
+
+ tk2dUITime.Init();
+ Setup();
+ }
+
+ void Start() {
+ if (uiCamera != null && uiCamera.GetComponent() == null) {
+ Debug.Log("It is no longer necessary to hook up a camera to the tk2dUIManager. You can simply attach a tk2dUICamera script to the cameras that interact with UI.");
+
+ // Handle registration properly
+ tk2dUICamera cam = uiCamera.gameObject.AddComponent();
+ cam.AssignRaycastLayerMask( raycastLayerMask );
+
+ uiCamera = null;
+ }
+
+ if (allCameras.Count == 0) {
+ Debug.LogError("Unable to find any tk2dUICameras, and no cameras are connected to the tk2dUIManager. You will not be able to interact with the UI.");
+ }
+ }
+
+ private void Setup()
+ {
+ if (!areHoverEventsTracked)
+ {
+ checkForHovers = false;
+ }
+ }
+
+ void Update()
+ {
+ tk2dUITime.Update();
+
+ if (inputEnabled)
+ {
+ SortCameras();
+
+ if (useMultiTouch)
+ {
+ CheckMultiTouchInputs();
+ }
+ else
+ {
+ CheckInputs();
+ }
+
+ if (OnInputUpdate != null) { OnInputUpdate(); }
+
+ if (OnScrollWheelChange != null)
+ {
+ float mouseWheel = Input.GetAxis(MOUSE_WHEEL_AXES_NAME);
+ if (mouseWheel != 0)
+ {
+ OnScrollWheelChange(mouseWheel);
+ }
+ }
+ }
+ }
+
+ //checks for inputs (non-multi-touch)
+ private void CheckInputs()
+ {
+ bool isPrimaryTouchFound = false;
+ bool isSecondaryTouchFound = false;
+ bool isAnyPressBeganRecorded = false;
+ primaryTouch = new tk2dUITouch();
+ secondaryTouch = new tk2dUITouch();
+ resultTouch = new tk2dUITouch();
+ hitUIItem = null;
+
+ if (inputEnabled)
+ {
+ if (Input.touchCount > 0)
+ {
+ foreach (Touch touch in Input.touches)
+ {
+ if (touch.phase == TouchPhase.Began)
+ {
+ primaryTouch = new tk2dUITouch(touch);
+ isPrimaryTouchFound = true;
+ isAnyPressBeganRecorded = true;
+ }
+ else if (pressedUIItem != null && touch.fingerId == firstPressedUIItemTouch.fingerId)
+ {
+ secondaryTouch = new tk2dUITouch(touch);
+ isSecondaryTouchFound = true;
+ }
+ }
+
+ checkForHovers = false;
+
+ }
+ else
+ {
+ if (Input.GetMouseButtonDown(0))
+ {
+ primaryTouch = new tk2dUITouch(TouchPhase.Began, tk2dUITouch.MOUSE_POINTER_FINGER_ID, Input.mousePosition, Vector2.zero, 0);
+ isPrimaryTouchFound = true;
+ isAnyPressBeganRecorded = true;
+ }
+ else if (Input.GetMouseButton(0) || Input.GetMouseButtonUp(0))
+ {
+ Vector2 deltaPosition = Vector2.zero;
+ TouchPhase mousePhase = TouchPhase.Moved;
+ if (pressedUIItem != null)
+ {
+ deltaPosition = firstPressedUIItemTouch.position - new Vector2(Input.mousePosition.x, Input.mousePosition.y);
+ }
+
+ if (Input.GetMouseButtonUp(0))
+ {
+ mousePhase = TouchPhase.Ended;
+ }
+ else if (deltaPosition == Vector2.zero)
+ {
+ mousePhase = TouchPhase.Stationary;
+ }
+ secondaryTouch = new tk2dUITouch(mousePhase, tk2dUITouch.MOUSE_POINTER_FINGER_ID, Input.mousePosition, deltaPosition, tk2dUITime.deltaTime);
+ isSecondaryTouchFound = true;
+ }
+ }
+ }
+
+ if (isPrimaryTouchFound)
+ {
+ resultTouch = primaryTouch;
+ }
+ else if (isSecondaryTouchFound)
+ {
+ resultTouch = secondaryTouch;
+ }
+
+ if (isPrimaryTouchFound || isSecondaryTouchFound) //focus touch found
+ {
+ hitUIItem = RaycastForUIItem(resultTouch.position);
+
+ if (resultTouch.phase == TouchPhase.Began)
+ {
+ if (pressedUIItem != null)
+ {
+ pressedUIItem.CurrentOverUIItem(hitUIItem);
+ if (pressedUIItem != hitUIItem)
+ {
+ pressedUIItem.Release();
+ pressedUIItem = null;
+ }
+ else
+ {
+ firstPressedUIItemTouch = resultTouch; //just incase touch changed
+ }
+ }
+
+ if (hitUIItem != null)
+ {
+ hitUIItem.Press(resultTouch);
+ }
+ pressedUIItem = hitUIItem;
+ firstPressedUIItemTouch = resultTouch;
+ }
+ else if (resultTouch.phase == TouchPhase.Ended)
+ {
+ if (pressedUIItem != null)
+ {
+ pressedUIItem.CurrentOverUIItem(hitUIItem);
+ pressedUIItem.UpdateTouch(resultTouch);
+ pressedUIItem.Release();
+ pressedUIItem = null;
+ }
+ }
+ else
+ {
+ if (pressedUIItem != null)
+ {
+ pressedUIItem.CurrentOverUIItem(hitUIItem);
+ pressedUIItem.UpdateTouch(resultTouch);
+ }
+ }
+ }
+ else //no touches found
+ {
+ if (pressedUIItem != null)
+ {
+ pressedUIItem.CurrentOverUIItem(null);
+ pressedUIItem.Release();
+ pressedUIItem = null;
+ }
+ }
+
+ //only if hover events are enabled and only if no touch events have ever been recorded
+ if (checkForHovers)
+ {
+ if (inputEnabled) //if input enabled and mouse button is not currently down
+ {
+ if (!isPrimaryTouchFound && !isSecondaryTouchFound && hitUIItem == null && !Input.GetMouseButton(0)) //if raycast for a button has not yet been done
+ {
+ hitUIItem = RaycastForUIItem( Input.mousePosition );
+ }
+ else if (Input.GetMouseButton(0)) //if mouse button is down clear it
+ {
+ hitUIItem = null;
+ }
+ }
+
+ if (hitUIItem != null)
+ {
+ if (hitUIItem.isHoverEnabled)
+ {
+ bool wasPrevOverFound = hitUIItem.HoverOver(overUIItem);
+
+ if (!wasPrevOverFound && overUIItem != null)
+ {
+ overUIItem.HoverOut(hitUIItem);
+ }
+ overUIItem = hitUIItem;
+ }
+ else
+ {
+ if (overUIItem != null)
+ {
+ overUIItem.HoverOut(null);
+ }
+ }
+ }
+ else
+ {
+ if (overUIItem != null)
+ {
+ overUIItem.HoverOut(null);
+ }
+ }
+ }
+
+ if (isAnyPressBeganRecorded)
+ {
+ if (OnAnyPress != null) { OnAnyPress(); }
+ }
+ }
+
+ //checks for inputs (multi-touch)
+ private void CheckMultiTouchInputs()
+ {
+ bool isAnyPressBeganRecorded = false;
+ int prevFingerID = -1;
+ bool wasPrevTouchFound = false;
+ bool isNewlyPressed = false;
+
+ touchCounter = 0;
+ if (inputEnabled)
+ {
+ if (Input.touchCount > 0)
+ {
+ foreach (Touch touch in Input.touches)
+ {
+ if (touchCounter < MAX_MULTI_TOUCH_COUNT)
+ {
+ allTouches[touchCounter] = new tk2dUITouch(touch);
+ touchCounter++;
+ }
+ else
+ {
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (Input.GetMouseButtonDown(0))
+ {
+ allTouches[touchCounter] = new tk2dUITouch(TouchPhase.Began, tk2dUITouch.MOUSE_POINTER_FINGER_ID, Input.mousePosition, Vector2.zero, 0);
+ mouseDownFirstPos = Input.mousePosition;
+ touchCounter++;
+ }
+ else if (Input.GetMouseButton(0) || Input.GetMouseButtonUp(0))
+ {
+ Vector2 deltaPosition = mouseDownFirstPos - new Vector2(Input.mousePosition.x, Input.mousePosition.y);
+ TouchPhase mousePhase = TouchPhase.Moved;
+
+ if (Input.GetMouseButtonUp(0))
+ {
+ mousePhase = TouchPhase.Ended;
+ }
+ else if (deltaPosition == Vector2.zero)
+ {
+ mousePhase = TouchPhase.Stationary;
+ }
+ allTouches[touchCounter] = new tk2dUITouch(mousePhase, tk2dUITouch.MOUSE_POINTER_FINGER_ID, Input.mousePosition, deltaPosition, tk2dUITime.deltaTime);
+ touchCounter++;
+ }
+ }
+ }
+
+ for (int p = 0; p < touchCounter; p++)
+ {
+ pressedUIItems[p] = RaycastForUIItem(allTouches[p].position);
+ }
+
+ //deals with all the previous presses
+ for (int f=0; f();
+ }
+ }
+ return null;
+ }
+
+ public void OverrideClearAllChildrenPresses(tk2dUIItem item)
+ {
+ if (useMultiTouch)
+ {
+ tk2dUIItem tempUIItem;
+ for (int n = 0; n < pressedUIItems.Length; n++)
+ {
+ tempUIItem = pressedUIItems[n];
+ if (tempUIItem!=null)
+ {
+ if (item.CheckIsUIItemChildOfMe(tempUIItem))
+ {
+ tempUIItem.CurrentOverUIItem(item);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (pressedUIItem != null)
+ {
+ if (item.CheckIsUIItemChildOfMe(pressedUIItem))
+ {
+ pressedUIItem.CurrentOverUIItem(item);
+ }
+ }
+ }
+ }
+}
+
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs.meta
new file mode 100644
index 000000000..4bcc8b51e
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIManager.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 71fd0c19c6c3ff84692e78186167fd2c
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 100
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs
new file mode 100644
index 000000000..77992126c
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs
@@ -0,0 +1,163 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUIMask")]
+[RequireComponent(typeof(MeshRenderer))]
+[RequireComponent(typeof(MeshFilter))]
+[ExecuteInEditMode]
+public class tk2dUIMask : MonoBehaviour {
+
+ public tk2dBaseSprite.Anchor anchor = tk2dBaseSprite.Anchor.MiddleCenter;
+ public Vector2 size = new Vector2(1, 1);
+ public float depth = 1.0f;
+ public bool createBoxCollider = true;
+
+ MeshFilter _thisMeshFilter = null;
+ MeshFilter ThisMeshFilter {
+ get {
+ if (_thisMeshFilter == null) {
+ _thisMeshFilter = GetComponent();
+ }
+ return _thisMeshFilter;
+ }
+ }
+
+ BoxCollider _thisBoxCollider = null;
+ BoxCollider ThisBoxCollider {
+ get {
+ if (_thisBoxCollider == null) {
+ _thisBoxCollider = GetComponent();
+ }
+ return _thisBoxCollider;
+ }
+ }
+
+ // Use this for initialization
+ void Awake() {
+ Build();
+ }
+
+ void OnDestroy() {
+ if (ThisMeshFilter.sharedMesh != null) {
+#if UNITY_EDITOR
+ Object.DestroyImmediate(ThisMeshFilter.sharedMesh);
+#else
+ Object.Destroy(ThisMeshFilter.sharedMesh);
+#endif
+ }
+ }
+
+ static readonly Vector2[] uv = new Vector2[] {
+ new Vector2(0, 0),
+ new Vector2(1, 0),
+ new Vector2(0, 1),
+ new Vector2(1, 1)
+ };
+ static readonly int[] indices = new int[6] {
+ 0, 3, 1, 2, 3, 0
+ };
+
+
+ Mesh FillMesh(Mesh mesh) {
+ Vector3 anchorOffset = Vector3.zero;
+ switch (anchor) {
+ case tk2dBaseSprite.Anchor.UpperLeft: anchorOffset = new Vector3(0, -size.y, 0); break;
+ case tk2dBaseSprite.Anchor.UpperCenter: anchorOffset = new Vector3(-size.x / 2, -size.y, 0); break;
+ case tk2dBaseSprite.Anchor.UpperRight: anchorOffset = new Vector3(-size.x, -size.y, 0); break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: anchorOffset = new Vector3(0, -size.y / 2, 0); break;
+ case tk2dBaseSprite.Anchor.MiddleCenter: anchorOffset = new Vector3(-size.x / 2, -size.y / 2, 0); break;
+ case tk2dBaseSprite.Anchor.MiddleRight: anchorOffset = new Vector3(-size.x, -size.y / 2, 0); break;
+ case tk2dBaseSprite.Anchor.LowerLeft: anchorOffset = new Vector3(0, 0, 0); break;
+ case tk2dBaseSprite.Anchor.LowerCenter: anchorOffset = new Vector3(-size.x / 2, 0, 0); break;
+ case tk2dBaseSprite.Anchor.LowerRight: anchorOffset = new Vector3(-size.x, 0, 0); break;
+ }
+
+ Vector3[] positions = new Vector3[4] {
+ anchorOffset + new Vector3( 0, 0, -depth),
+ anchorOffset + new Vector3( size.x, 0, -depth),
+ anchorOffset + new Vector3( 0, size.y, -depth),
+ anchorOffset + new Vector3( size.x, size.y, -depth)
+ };
+
+ mesh.vertices = positions;
+ mesh.uv = uv;
+ mesh.triangles = indices;
+
+ // Recalculate bounds, and reset bounds center, i.e. determining draw order for
+ // transparent sprites
+ Bounds bounds = new Bounds();
+ bounds.SetMinMax(anchorOffset, anchorOffset + new Vector3(size.x, size.y, 0));
+ mesh.bounds = bounds;
+
+ return mesh;
+ }
+
+ void OnDrawGizmosSelected() {
+ Mesh mesh = ThisMeshFilter.sharedMesh;
+ if (mesh != null) {
+ Gizmos.matrix = transform.localToWorldMatrix;
+ Bounds bounds = mesh.bounds;
+ Gizmos.color = new Color32(56, 146, 227, 96);
+ float d = -depth * 1.001f;
+ Vector3 center = new Vector3(bounds.center.x, bounds.center.y, d * 0.5f);
+ Vector3 size = new Vector3(bounds.extents.x * 2, bounds.extents.y * 2, Mathf.Abs(d));
+ Gizmos.DrawCube(center, size);
+
+ Gizmos.color = new Color32(22, 145, 255, 255);
+ Gizmos.DrawWireCube(center, size);
+ }
+ }
+
+ public void Build() {
+ if (ThisMeshFilter.sharedMesh == null) {
+ Mesh mesh = new Mesh();
+ mesh.hideFlags = HideFlags.DontSave;
+ ThisMeshFilter.mesh = FillMesh(mesh);
+ }
+ else {
+ FillMesh(ThisMeshFilter.sharedMesh);
+ }
+
+ if (createBoxCollider) {
+ if (ThisBoxCollider == null) {
+ _thisBoxCollider = gameObject.AddComponent();
+ }
+ Bounds bounds = ThisMeshFilter.sharedMesh.bounds;
+ ThisBoxCollider.center = new Vector3( bounds.center.x, bounds.center.y, -depth );
+ ThisBoxCollider.size = new Vector3( bounds.size.x, bounds.size.y, 0.0002f );
+ }
+ else if (ThisBoxCollider != null) {
+#if UNITY_EDITOR
+ Object.DestroyImmediate(ThisBoxCollider);
+#else
+ Object.Destroy(ThisBoxCollider);
+#endif
+ }
+ }
+
+ public void ReshapeBounds(Vector3 dMin, Vector3 dMax) {
+ Vector3 oldSize = new Vector3(size.x, size.y);
+ Vector3 oldMin = Vector3.zero;
+ switch (anchor) {
+ case tk2dBaseSprite.Anchor.LowerLeft: oldMin.Set(0,0,0); break;
+ case tk2dBaseSprite.Anchor.LowerCenter: oldMin.Set(0.5f,0,0); break;
+ case tk2dBaseSprite.Anchor.LowerRight: oldMin.Set(1,0,0); break;
+ case tk2dBaseSprite.Anchor.MiddleLeft: oldMin.Set(0,0.5f,0); break;
+ case tk2dBaseSprite.Anchor.MiddleCenter: oldMin.Set(0.5f,0.5f,0); break;
+ case tk2dBaseSprite.Anchor.MiddleRight: oldMin.Set(1,0.5f,0); break;
+ case tk2dBaseSprite.Anchor.UpperLeft: oldMin.Set(0,1,0); break;
+ case tk2dBaseSprite.Anchor.UpperCenter: oldMin.Set(0.5f,1,0); break;
+ case tk2dBaseSprite.Anchor.UpperRight: oldMin.Set(1,1,0); break;
+ }
+ oldMin = Vector3.Scale(oldMin, oldSize) * -1;
+ Vector3 newSize = oldSize + dMax - dMin;
+ Vector3 scaledMin = new Vector3(Mathf.Approximately(oldSize.x, 0) ? 0 : (oldMin.x * newSize.x / oldSize.x),
+ Mathf.Approximately(oldSize.y, 0) ? 0 : (oldMin.y * newSize.y / oldSize.y));
+ Vector3 offset = oldMin + dMin - scaledMin;
+ offset.z = 0;
+ transform.position = transform.TransformPoint(offset);
+ size = new Vector2(newSize.x, newSize.y);
+
+ Build();
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs.meta
new file mode 100644
index 000000000..fd453e015
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUIMask.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 602f4dac037b841b7baf63355b4ce069
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs
new file mode 100644
index 000000000..397210984
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs
@@ -0,0 +1,10 @@
+using UnityEngine;
+using System.Collections;
+
+[AddComponentMenu("2D Toolkit/UI/Core/tk2dUISpriteAnimator")]
+public class tk2dUISpriteAnimator : tk2dSpriteAnimator {
+ public override void LateUpdate()
+ {
+ UpdateAnimation(tk2dUITime.deltaTime);
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs.meta
new file mode 100644
index 000000000..70a20c26f
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUISpriteAnimator.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ea9a5e7544142ad4494fed7a2c76f66e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs
new file mode 100644
index 000000000..b9c5d59fa
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs
@@ -0,0 +1,44 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Time proxy class, independent to Time.timeScale
+///
+public static class tk2dUITime {
+
+ ///
+ /// Use this in UI classes / when you need deltaTime unaffected by Time.timeScale
+ ///
+ public static float deltaTime {
+ get {
+ return _deltaTime;
+ }
+ }
+
+ static double lastRealTime = 0;
+ static float _deltaTime = 1.0f / 60.0f;
+
+ ///
+ /// Do not call. This is updated by tk2dUIManager
+ ///
+ public static void Init()
+ {
+ lastRealTime = Time.realtimeSinceStartup;
+ _deltaTime = Time.maximumDeltaTime;
+ }
+
+ ///
+ /// Do not call. This is updated by tk2dUIManager
+ ///
+ public static void Update()
+ {
+ float currentTime = Time.realtimeSinceStartup;
+ if (Time.timeScale < 0.001f) {
+ _deltaTime = Mathf.Min( 2.0f / 30.0f, (float)(currentTime - lastRealTime) );
+ }
+ else {
+ _deltaTime = Time.deltaTime / Time.timeScale;
+ }
+ lastRealTime = currentTime;
+ }
+}
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs.meta
new file mode 100644
index 000000000..38dfa13c5
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITime.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3695a6b89723f4e4fbff47b8e16683eb
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs
new file mode 100644
index 000000000..2ac86f5b6
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs
@@ -0,0 +1,39 @@
+using UnityEngine;
+using System.Collections;
+
+///
+/// Exact copy of Touch struct, except this one can be set
+///
+public struct tk2dUITouch
+{
+ public const int MOUSE_POINTER_FINGER_ID = 9999; //id given to mouse pointer
+
+ public TouchPhase phase { get; private set; }
+ public int fingerId { get; private set; }
+ public Vector2 position { get; private set; }
+ public Vector2 deltaPosition { get; private set; }
+ public float deltaTime { get; private set; }
+
+ public tk2dUITouch(TouchPhase phase, int fingerID, Vector2 position, Vector2 deltaPosition, float deltaTime) : this()
+ {
+ this.phase = phase;
+ this.fingerId = fingerId;
+ this.position = position;
+ this.deltaPosition = deltaPosition;
+ this.deltaTime = deltaTime;
+ }
+
+ public tk2dUITouch(Touch touch) : this()
+ {
+ this.phase = touch.phase;
+ this.fingerId = touch.fingerId;
+ this.position = touch.position;
+ this.deltaPosition = deltaPosition;
+ this.deltaTime = deltaTime;
+ }
+
+ public override string ToString()
+ {
+ return phase.ToString() + "," + fingerId + "," + position + "," + deltaPosition + "," + deltaTime;
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs.meta b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs.meta
new file mode 100644
index 000000000..fc6df37e9
--- /dev/null
+++ b/Chromacore/Assets/Plugins/tk2dUI/Code/Core/tk2dUITouch.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0d93f86403159e94d80f9a1487064ddc
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Sound Assets.meta b/Chromacore/Assets/Sound Assets.meta
new file mode 100644
index 000000000..822ac1d40
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: f415231de0858e64b84417904c0abdf1
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3 b/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3
new file mode 100644
index 000000000..d822a358e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3.meta b/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3.meta
new file mode 100644
index 000000000..502600353
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Chromacore_backgroundTrack.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2164687a53352234c9265bb22f0d0941
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3 b/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3
new file mode 100644
index 000000000..d0677b591
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3.meta b/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3.meta
new file mode 100644
index 000000000..bdfc3c463
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Chromacore_baseTrack.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 44bf95b8f90261d4495a5ee4016e1282
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3 b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3
new file mode 100644
index 000000000..c94345f4a
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3.meta b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3.meta
new file mode 100644
index 000000000..76728041e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1d56927fa8888384786e2a3aa779ca0b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3 b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3
new file mode 100644
index 000000000..68a337185
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3.meta b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3.meta
new file mode 100644
index 000000000..d98703078
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Chromacore_itemPickup_2.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bf74037c98e60f043a1296621edee692
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Obstacles.meta b/Chromacore/Assets/Sound Assets/Obstacles.meta
new file mode 100644
index 000000000..900c001f7
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Obstacles.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 53eab2da5c45b1d41a0908e1133141c7
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav
new file mode 100644
index 000000000..e17477658
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav differ
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav.meta b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav.meta
new file mode 100644
index 000000000..f1518ffcd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-054-muffled-impact-slight-echo-debris.wav.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9b1ffa639922c334c8243938f8546abb
+AudioImporter:
+ serializedVersion: 4
+ format: -1
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav
new file mode 100644
index 000000000..83a7857a4
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav differ
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav.meta b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav.meta
new file mode 100644
index 000000000..a4c8a56d0
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-057-quick-explosion-with-slight-kickback-echo.wav.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1bbfb344cc84cff4783553ea890c564c
+AudioImporter:
+ serializedVersion: 4
+ format: -1
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav
new file mode 100644
index 000000000..10ca8bba0
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav differ
diff --git a/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav.meta b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav.meta
new file mode 100644
index 000000000..6fb95092e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Obstacles/imphenzia-soundtrack-explosion-067-pitched-fast-two-staged-blast-with-slight-crackle.wav.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 08a9229ccee1da2479a6c1204292bdcb
+AudioImporter:
+ serializedVersion: 4
+ format: -1
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks.meta
new file mode 100644
index 000000000..f87a5a0db
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 65e708716df792846b8d38dc44187abf
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3
new file mode 100644
index 000000000..8392d2737
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3.meta
new file mode 100644
index 000000000..486aff3fd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-17-434.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6ffe1c68b96616c4dae4746ae0593cf0
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3
new file mode 100644
index 000000000..bc4c0ed59
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3.meta
new file mode 100644
index 000000000..383658d6c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-19-625.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2dc8e93d921d8e24c935afaf3cf27bde
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3
new file mode 100644
index 000000000..432489b0f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3.meta
new file mode 100644
index 000000000..724e947b2
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-20-434.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 446f675f14ab3e44ab6b75de6fcc16d8
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3
new file mode 100644
index 000000000..802f5bc0b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3.meta
new file mode 100644
index 000000000..856e672bb
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-21-806.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: eb8b62de3129f2f4c90eb23f77bf5843
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3
new file mode 100644
index 000000000..9ab889a03
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3.meta
new file mode 100644
index 000000000..076b3f0cd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-23-991.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 33c8fc5374f919b4c8b3cf7bc2be0c8e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3
new file mode 100644
index 000000000..9632ca8d5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3.meta
new file mode 100644
index 000000000..984c807bd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-24-806.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b674ee68bac874a47be86090b1bdcec3
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3
new file mode 100644
index 000000000..90b2b8b36
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3.meta
new file mode 100644
index 000000000..2aaf83e58
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-26-166.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0010b07035fa33542b5acb41552110b4
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3
new file mode 100644
index 000000000..d87343c7e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3.meta
new file mode 100644
index 000000000..dc73d28b0
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-28-356.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4c9469d3139294c4880993391e23ecd1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3
new file mode 100644
index 000000000..bfe58ba3d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3.meta
new file mode 100644
index 000000000..d7fbd6e63
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-29-156.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f40fa1df1a673fb4bad6e0720917a937
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3
new file mode 100644
index 000000000..f49c9431b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3.meta
new file mode 100644
index 000000000..a54b4b398
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-30-531.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b87e9f1af941bfa4ca92b7f82e5e7dbb
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3
new file mode 100644
index 000000000..e63b41e71
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3.meta
new file mode 100644
index 000000000..ecd21f7ad
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-32-716.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e568c0bb296f5ca4fbc0bfc69416b515
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3
new file mode 100644
index 000000000..08b74f1f2
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3.meta
new file mode 100644
index 000000000..76ad52096
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-33-525.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 202199a37f140f2469a7a549fbf2a5be
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3
new file mode 100644
index 000000000..d58c9ec89
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3.meta
new file mode 100644
index 000000000..188ad677c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-306.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e2088fd7c9b1c8d46a772dccb16b9d64
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3
new file mode 100644
index 000000000..f88b8e699
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3.meta
new file mode 100644
index 000000000..f7feb25a1
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-35-716.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 70d7fd529e32c4d4f90ad78b753b7d1f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3
new file mode 100644
index 000000000..7b09d6855
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3.meta
new file mode 100644
index 000000000..e8c3cc646
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-36-806.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3c46505f72c54fd4d9024f867480cf2b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3
new file mode 100644
index 000000000..468d8025d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3.meta
new file mode 100644
index 000000000..cb1c05ec9
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-491.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e6007e96cc3d8fd48af0ecb4d07083e2
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3
new file mode 100644
index 000000000..b69cba239
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3.meta
new file mode 100644
index 000000000..7f6f64f6f
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-37-906.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be8bdceef077c38469c6559b819b1fe6
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3
new file mode 100644
index 000000000..61aa093a0
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3.meta
new file mode 100644
index 000000000..d074d0836
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-38-991.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2113271fb8c817c479cfd9f67bde753e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3
new file mode 100644
index 000000000..b7a70e95d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3.meta
new file mode 100644
index 000000000..c21d8f515
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-39-681.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5a04c6ed42083f8438c317fdc709fc94
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3
new file mode 100644
index 000000000..aa1ca62f5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3.meta
new file mode 100644
index 000000000..9f88c8352
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-40-081.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fed7b8c4d1b5859479f1e2e41395d082
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3
new file mode 100644
index 000000000..90a5bfe26
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3.meta
new file mode 100644
index 000000000..e06c495d2
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-178.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1995862629291ac46b56597d01d56663
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3
new file mode 100644
index 000000000..411581ff5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3.meta
new file mode 100644
index 000000000..93beb0697
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-41-859.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f9458a5b27e3e0c4e8fcd21fe9443c1f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3
new file mode 100644
index 000000000..d4f3b9628
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3.meta
new file mode 100644
index 000000000..ea3652f9c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-42-269.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 51378a517c27cda449c3cd9cfb4ec879
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3
new file mode 100644
index 000000000..1efff9eda
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3.meta
new file mode 100644
index 000000000..19f6f69d8
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-43-369.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9350b05274c47784fa46f9a85e35c91e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3
new file mode 100644
index 000000000..a0269ee6a
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3.meta
new file mode 100644
index 000000000..cb85821d2
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-044.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2198624ca9a24b44a84e979f633d34aa
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3
new file mode 100644
index 000000000..9b57defe0
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3.meta
new file mode 100644
index 000000000..164aee026
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-44-444.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3e349ac74cd0814458cdbb893bfbcee5
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3
new file mode 100644
index 000000000..56d15fa5f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3.meta
new file mode 100644
index 000000000..b9f3e74f7
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-45-534.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ce9bfe2df336da4c8e300943d439b9d
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3
new file mode 100644
index 000000000..bbe09dbfa
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3.meta
new file mode 100644
index 000000000..25e008b64
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-219.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d21ae47bf12c59c44843c3d8e9fba519
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3
new file mode 100644
index 000000000..e44164ed9
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3.meta
new file mode 100644
index 000000000..88afe0fde
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-46-619.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 073532201ee0e5d42952438034451671
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3
new file mode 100644
index 000000000..23f7f0a59
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3.meta
new file mode 100644
index 000000000..e5ae87171
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-47-709.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1953e11a51726bf418d3a1f0e13c21f3
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3
new file mode 100644
index 000000000..a9b63122e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3.meta
new file mode 100644
index 000000000..c9e03212a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-394.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d7f908b52cc21324795d073ed65da241
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3
new file mode 100644
index 000000000..3a16a0c7b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3.meta
new file mode 100644
index 000000000..b868efd0d
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-48-794.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6f51d4256eac9bd489137f1709d76b64
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3
new file mode 100644
index 000000000..e7adc109b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3.meta
new file mode 100644
index 000000000..07aafb2e8
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-49-884.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 44627d7bf8e2fe144abf722c22702723
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3
new file mode 100644
index 000000000..143c4f08a
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3.meta
new file mode 100644
index 000000000..468ae89e2
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-556.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a9ee83ad0e3c1a74abb905e5e4f349ae
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3
new file mode 100644
index 000000000..1a691c8fa
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3.meta
new file mode 100644
index 000000000..5c38a4ddc
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-50-978.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 36dd7dca69df3ba4fa51094b35409af6
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3
new file mode 100644
index 000000000..360a3f9d3
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3.meta
new file mode 100644
index 000000000..f31a05922
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-51-794.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 01605d7c927091b479fecc37d972ab55
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3
new file mode 100644
index 000000000..8d21c1a71
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3.meta
new file mode 100644
index 000000000..0c82a4191
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-52-337.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b2da9d84caf8b62488b7fedf2fc72d89
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3
new file mode 100644
index 000000000..32d7c015f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3.meta
new file mode 100644
index 000000000..47aed3d0a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/0-58-894.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b721f2cbc3795c24ab2922a279b8e797
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3
new file mode 100644
index 000000000..d293f26bd
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3.meta
new file mode 100644
index 000000000..0ba6503c4
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-01-078.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ab9b22102ec14a7459c94d701ea4a100
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3
new file mode 100644
index 000000000..0e3374922
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3.meta
new file mode 100644
index 000000000..41f2f0753
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-03-226.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 92f31d5c915d4204c9776ac05b7447a9
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3
new file mode 100644
index 000000000..ec245f979
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3.meta
new file mode 100644
index 000000000..9f18a6121
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-05-562.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7e03426256d5ae14d93674ef2e14b59e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3
new file mode 100644
index 000000000..923ee8faa
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3.meta
new file mode 100644
index 000000000..0adca8c40
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-07-562.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 03616e86d19da0c41a906d880f4f851e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3
new file mode 100644
index 000000000..e4b3368ec
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3.meta
new file mode 100644
index 000000000..878c7256c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-09-769.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0f2441f72efaf694f8cec0eabb5cc5f1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3
new file mode 100644
index 000000000..4be259414
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3.meta
new file mode 100644
index 000000000..eb68492f3
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-11-975.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: df09eb34764ce1648afe80fbb810a805
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3
new file mode 100644
index 000000000..4e6eb8089
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3.meta
new file mode 100644
index 000000000..960c17a5e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-14-219.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 17768cfda9c62b74189d1d9bca856e6b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3
new file mode 100644
index 000000000..f00ae1885
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3.meta
new file mode 100644
index 000000000..d2e4d5d36
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-18-259.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c46339ea7ea65a84cacbd52a92d44714
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3
new file mode 100644
index 000000000..8129ff7f9
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3.meta
new file mode 100644
index 000000000..d7bb6f783
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-19-628.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2dfec83b31fe7444f9c7d2c5fe7a651b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3
new file mode 100644
index 000000000..829bbdd8f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3.meta
new file mode 100644
index 000000000..765ad8e1a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-22-909.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be7977242f11ce8499087836b06f43ff
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3
new file mode 100644
index 000000000..963743b91
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3.meta
new file mode 100644
index 000000000..a97e53d8d
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-25-094.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 838ae6fa4e20ad34b81ee73eccdf8939
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3
new file mode 100644
index 000000000..f7a811d4d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3.meta
new file mode 100644
index 000000000..433214a69
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-27-278.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c3ed927d0f1bba74b9bcea6030da7c54
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3
new file mode 100644
index 000000000..881283d5d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3.meta
new file mode 100644
index 000000000..7baa02049
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-29-459.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 735fe7afe8b401f4599a9750d3a51170
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3
new file mode 100644
index 000000000..9598aa257
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3.meta
new file mode 100644
index 000000000..da0cd8fbd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-38-166.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 93f52f3d88c740c4b8272143862e7649
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3
new file mode 100644
index 000000000..2027c601f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3.meta
new file mode 100644
index 000000000..f99c0ac44
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-40-344.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 407d93f9ea01c4442b616c1becb527a1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3
new file mode 100644
index 000000000..fc2300b78
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3.meta
new file mode 100644
index 000000000..937e07098
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-42-544.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ecb1cfafbc2e8c94cae196f8048f96b8
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3
new file mode 100644
index 000000000..1b0d11b40
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3.meta
new file mode 100644
index 000000000..8ad3cd454
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-44-725.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 75659e5f3c7f9304aba3bb272f80306d
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3
new file mode 100644
index 000000000..989ba981d
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3.meta
new file mode 100644
index 000000000..eabeb591e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-46-906.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 37f20e23f4526fe4e8a46edcd5e8db7e
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3
new file mode 100644
index 000000000..d3dc438e9
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3.meta
new file mode 100644
index 000000000..7075fd8cc
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-49-084.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9ff00156172725c4c83d9c74d327fb1f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3
new file mode 100644
index 000000000..2dd6b5cc1
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3.meta
new file mode 100644
index 000000000..05c01a28f
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-51-266.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 476a39ee22ff9634e8e2521bfc0b5737
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3
new file mode 100644
index 000000000..71ed06a02
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3.meta
new file mode 100644
index 000000000..d36fb61c8
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-52-450.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6077c73aaaa0d514aae4251f05de7267
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3
new file mode 100644
index 000000000..cd853dc77
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3.meta
new file mode 100644
index 000000000..cfec6154a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-55-634.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 273955f0dc77fc446ab67a6c9447e5af
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3
new file mode 100644
index 000000000..501919046
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3.meta
new file mode 100644
index 000000000..6c83f4acf
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/1-57-806.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 26ebeee276469d84881d080e9ed2ed40
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3
new file mode 100644
index 000000000..ef8aa1d1f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3.meta
new file mode 100644
index 000000000..d25e12efd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-175.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1899cad2ce442d64da876897ede88376
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3
new file mode 100644
index 000000000..106677e76
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3.meta
new file mode 100644
index 000000000..0229c2a75
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-02-591.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2ddf5011a79538443b28286251554300
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3
new file mode 100644
index 000000000..f724fa389
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3.meta
new file mode 100644
index 000000000..67ffcefc9
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-03-266.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d474131a07dbe53438b5fd2d68f24baa
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3
new file mode 100644
index 000000000..e9dae83b8
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3.meta
new file mode 100644
index 000000000..72c378217
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-359.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d81d6200c1892914fa4535264910b358
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3
new file mode 100644
index 000000000..0c44c9d78
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3.meta
new file mode 100644
index 000000000..1da32dbb4
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-04-775.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 40de6f19134d2c9428e02902672b12d8
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3
new file mode 100644
index 000000000..8e95851f9
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3.meta
new file mode 100644
index 000000000..b5807f8d5
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-05-450.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 577a9e9f2dc1d8d4d9c06528131d553d
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3
new file mode 100644
index 000000000..f33674106
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3.meta
new file mode 100644
index 000000000..829b6189a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-541.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: be706f9617954174ca841a6d577c38e1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3
new file mode 100644
index 000000000..6b952f40b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3.meta
new file mode 100644
index 000000000..f82a82878
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-06-959.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0770e5dcc1d470846a29feb028409a7a
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3
new file mode 100644
index 000000000..56ba23c9e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3.meta
new file mode 100644
index 000000000..be5372239
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-07-634.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a44cd38c96f96544f8e14b8c3e8de7f6
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3
new file mode 100644
index 000000000..99c24358c
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3.meta
new file mode 100644
index 000000000..0ab5a5bf2
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-08-725.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ed09662d21a4df74fadf967431d94981
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3
new file mode 100644
index 000000000..5d632834c
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3.meta
new file mode 100644
index 000000000..a39eee714
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-137.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 615e8d33c60f18441b10eb2fcd5ae3d5
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3
new file mode 100644
index 000000000..12f7ef440
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3.meta
new file mode 100644
index 000000000..067885a29
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-09-812.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 511289f4805865343bbf119df47ccc87
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3
new file mode 100644
index 000000000..522c16794
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3.meta
new file mode 100644
index 000000000..197bb94f8
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-10-909.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a25a71da3773e2d408afce34f3a4c41c
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3
new file mode 100644
index 000000000..8629ea74f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3.meta
new file mode 100644
index 000000000..b99e0cbce
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-325.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4df8765dacb7a404496538bf650fcec1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3
new file mode 100644
index 000000000..237aa0ecf
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3.meta
new file mode 100644
index 000000000..877f3de9b
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-11-994.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 30cf27c130b919e4eb5ce10b0e4d7f02
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3
new file mode 100644
index 000000000..92d134c72
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3.meta
new file mode 100644
index 000000000..dff38f347
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-091.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 034b1a14461a7bc4aa563ad1ebfba88c
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3
new file mode 100644
index 000000000..f6ba7922b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3.meta
new file mode 100644
index 000000000..1f5751bdb
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-13-500.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f7291226e208de84787240583fa11d7b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3
new file mode 100644
index 000000000..3903e671f
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3.meta
new file mode 100644
index 000000000..f94b738ba
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-14-172.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 672e01b50091f334f98b4293b847484f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3
new file mode 100644
index 000000000..4a5d6a1b5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3.meta
new file mode 100644
index 000000000..c0b13a29b
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-269.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9c775fa6eb1f1c44d989b824f62fef43
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3
new file mode 100644
index 000000000..a3c32b4fe
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3.meta
new file mode 100644
index 000000000..ab0d2227c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-15-681.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1149e4500ce62a14bb98e0bcdb3c0938
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3
new file mode 100644
index 000000000..581010232
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3.meta
new file mode 100644
index 000000000..9dbb7c2bc
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-16-356.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ada674673b3b97b44b0b2949a176ef3f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3
new file mode 100644
index 000000000..523436455
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3.meta
new file mode 100644
index 000000000..870300ac4
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-447.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 24fc4feab499e08439cfe87f0a25a188
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3
new file mode 100644
index 000000000..04c6a8a58
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3.meta
new file mode 100644
index 000000000..9ad7e67ef
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-17-866.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9f08a2254c74da24eb20b21b5deb63df
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3
new file mode 100644
index 000000000..2cf9c9e02
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3.meta
new file mode 100644
index 000000000..eed5ebee5
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-18-541.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a03a84f0e431d794c8f62dbad3e229a9
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3
new file mode 100644
index 000000000..9d7f50bb5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3.meta
new file mode 100644
index 000000000..74549065d
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-19-628.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 94f41b510d0bd01428daebbdf2dd633c
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3
new file mode 100644
index 000000000..062ecc2f4
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3.meta
new file mode 100644
index 000000000..b21afcaaf
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-047.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: afa01a8f59447f940bf6f954ad04b489
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3
new file mode 100644
index 000000000..146b1771e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3.meta
new file mode 100644
index 000000000..d7570d16a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-20-722.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dc444aef053a5da4b8f55947947cd428
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3
new file mode 100644
index 000000000..f067dcd9e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3.meta
new file mode 100644
index 000000000..8ffe90c8e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-21-812.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ed9987ee72392634c8b53db013c4fdcf
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3
new file mode 100644
index 000000000..5f40bfdb8
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3.meta
new file mode 100644
index 000000000..5552fd7ee
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-22-234.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fcd8804a1b024664dbcb029b1121e5c8
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3
new file mode 100644
index 000000000..a0fcc8fce
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3.meta
new file mode 100644
index 000000000..a50c4925b
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-24-000.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4f95f2344b4faa541924f11948e1b595
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3
new file mode 100644
index 000000000..fa1666184
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3.meta
new file mode 100644
index 000000000..fc3e84ba5
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-26-184.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f359da8d6715cfa498e75a809563ba86
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3
new file mode 100644
index 000000000..f07fab79c
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3.meta
new file mode 100644
index 000000000..34ea22744
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-28-369.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ff30958bf22767f4ca68dd2aebdf156b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3
new file mode 100644
index 000000000..e0c365398
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3.meta
new file mode 100644
index 000000000..0e95ac481
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-30-397.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 85f1c2e1a0a0a414ba540dd51a14e58d
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3
new file mode 100644
index 000000000..821d45140
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3.meta
new file mode 100644
index 000000000..dcb91187c
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-32-678.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7cc255bdc1c34484aa580c516f2013c4
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3
new file mode 100644
index 000000000..0f36b9862
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3.meta
new file mode 100644
index 000000000..3962a14fd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-34-859.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a3f576025ed57704599be4b3a19db962
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3
new file mode 100644
index 000000000..9ace9ddf4
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3.meta
new file mode 100644
index 000000000..93950e9bd
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-36-944.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e0c55e17b54c2fd4d972ecc32757e15f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3
new file mode 100644
index 000000000..6495c078c
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3.meta
new file mode 100644
index 000000000..9b5b90887
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-39-081.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a3517d8b53dc08f4686a42211e026dc6
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3
new file mode 100644
index 000000000..46a4e2190
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3.meta
new file mode 100644
index 000000000..b3603f7bc
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-41-397.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cf7b831d95384e748ac0a7c50a20ead8
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3
new file mode 100644
index 000000000..52cddd2f2
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3.meta
new file mode 100644
index 000000000..078f0c32a
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-43-672.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 19656c08f4c49fe44a8d5831d0c9289f
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3
new file mode 100644
index 000000000..0522d83a8
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3.meta
new file mode 100644
index 000000000..a2b74eae5
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-45-762.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 635830191f0798543bff543f7c338b28
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3
new file mode 100644
index 000000000..4d4f2b5f9
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3.meta
new file mode 100644
index 000000000..d3ce11902
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-48-056.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3fa000cab67866b4fb3466ebcc3ebc0b
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3
new file mode 100644
index 000000000..f39302118
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3.meta
new file mode 100644
index 000000000..6cca3aff8
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-50-256.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4cc604e838d37d141aa4ba6433d2b46a
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3
new file mode 100644
index 000000000..9fb908a5b
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3.meta
new file mode 100644
index 000000000..cba081e80
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-52-406.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 04974e5346329cb4282fdea0376d6cbc
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3
new file mode 100644
index 000000000..8f1db5568
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3.meta
new file mode 100644
index 000000000..272b121e9
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-54-647.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 59b4949716844e24390a0e0c1d690b76
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3
new file mode 100644
index 000000000..f13c61cc5
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3.meta
new file mode 100644
index 000000000..758d7e447
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-56-797.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d84ac5166bc433d449615317aa5ae40d
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3
new file mode 100644
index 000000000..5c83951ca
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3.meta
new file mode 100644
index 000000000..3cd48fbd5
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/2-59-000.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9d86104c37e0f81488a7d29d6ee78038
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3
new file mode 100644
index 000000000..a647e3c3e
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3.meta
new file mode 100644
index 000000000..f0942a34e
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-07-681.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dc05fe95ed2d8674f82960b2b5a754b1
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3
new file mode 100644
index 000000000..4ca8e91dc
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3.meta
new file mode 100644
index 000000000..9e1be3e42
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-11-172.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 94a65ec24bf3ec3498ea952f06383a48
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3
new file mode 100644
index 000000000..d93aa6a24
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3.meta
new file mode 100644
index 000000000..80270598f
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-15-981.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a416e1004297ceb4d8daae04273749d4
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3
new file mode 100644
index 000000000..fa460d89a
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3.meta
new file mode 100644
index 000000000..97bcfa389
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-20-000.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 1a79b437495259e44b0eae40ac7cb197
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3 b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3
new file mode 100644
index 000000000..1bdcacaac
Binary files /dev/null and b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3 differ
diff --git a/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3.meta b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3.meta
new file mode 100644
index 000000000..5a2077291
--- /dev/null
+++ b/Chromacore/Assets/Sound Assets/Pick up Tracks/3-24-300.mp3.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4c6cccf8ef4ebb74fb36faa79f3432be
+AudioImporter:
+ serializedVersion: 4
+ format: 0
+ quality: -1
+ stream: 1
+ 3D: 1
+ forceToMono: 0
+ useHardware: 0
+ loopable: 0
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations.meta b/Chromacore/Assets/Sprite Animations.meta
new file mode 100644
index 000000000..bb869b93f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 706c61e7958a0984c94c09bad0647e0e
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death.meta b/Chromacore/Assets/Sprite Animations/Death.meta
new file mode 100644
index 000000000..8c395f0de
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 41095c9fb78e90c43a1b3f6a940a37e3
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data.meta b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data.meta
new file mode 100644
index 000000000..210f8ee54
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 7e7da5222a1915240bb34618d9bbd2f3
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab
new file mode 100644
index 000000000..e0ecb5b2c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab.meta b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab.meta
new file mode 100644
index 000000000..41c726b16
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/Teli_Death.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2ce37489142af8b4cbeabac9b715a119
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat
new file mode 100644
index 000000000..f4fbce544
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..8b5851850
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 0fec893f6cf73c4419b159f40ab3cea4
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png
new file mode 100644
index 000000000..cdc01512c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png.meta
new file mode 100644
index 000000000..db23c17bc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/Teli_Death Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 3bc8fa30f59b12d4db170f1e062be147
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab b/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab
new file mode 100644
index 000000000..9dd3875f1
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab.meta b/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab.meta
new file mode 100644
index 000000000..bfe162d74
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/Teli_Death.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7a35eb63ab55fdb49ba5e3aaa5301dcf
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__000.png b/Chromacore/Assets/Sprite Animations/Death/death1__000.png
new file mode 100644
index 000000000..9167346e6
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__000.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__000.png.meta
new file mode 100644
index 000000000..747bf3edd
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8fcb0d54fb472c74daa08ab283f812ab
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__001.png b/Chromacore/Assets/Sprite Animations/Death/death1__001.png
new file mode 100644
index 000000000..37a91551a
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__001.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__001.png.meta
new file mode 100644
index 000000000..2195903d2
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ae5c01fafdf887643a4db61ecf6f0068
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__002.png b/Chromacore/Assets/Sprite Animations/Death/death1__002.png
new file mode 100644
index 000000000..a4610b309
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__002.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__002.png.meta
new file mode 100644
index 000000000..d82eceffb
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: edfda5a084040e34fbb89ef108c36e05
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__003.png b/Chromacore/Assets/Sprite Animations/Death/death1__003.png
new file mode 100644
index 000000000..5fdcdc705
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__003.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__003.png.meta
new file mode 100644
index 000000000..85c61c2cf
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: f03c2a278f1f02844a103803681ad745
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__004.png b/Chromacore/Assets/Sprite Animations/Death/death1__004.png
new file mode 100644
index 000000000..2dc23e83f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__004.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__004.png.meta
new file mode 100644
index 000000000..c94fc200c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: f8c42d37d1a40b4499e0c2d876138b55
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__005.png b/Chromacore/Assets/Sprite Animations/Death/death1__005.png
new file mode 100644
index 000000000..ccf6f781c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__005.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__005.png.meta
new file mode 100644
index 000000000..39322f82b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 251ac1cb351470c45bf7d1c11ba08389
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__006.png b/Chromacore/Assets/Sprite Animations/Death/death1__006.png
new file mode 100644
index 000000000..c8bac81a3
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__006.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__006.png.meta
new file mode 100644
index 000000000..ed11c0845
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 855bade768a77634f9cb0b79220213c8
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__007.png b/Chromacore/Assets/Sprite Animations/Death/death1__007.png
new file mode 100644
index 000000000..bbbf8702f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__007.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__007.png.meta
new file mode 100644
index 000000000..55c77cdc8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ddb7defe444fd2d4ba790b9d0855945d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__008.png b/Chromacore/Assets/Sprite Animations/Death/death1__008.png
new file mode 100644
index 000000000..0dbf58901
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__008.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__008.png.meta
new file mode 100644
index 000000000..5a4af823f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 384daf1756792ed4c889eecd1b44234c
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__009.png b/Chromacore/Assets/Sprite Animations/Death/death1__009.png
new file mode 100644
index 000000000..069ecae65
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__009.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__009.png.meta
new file mode 100644
index 000000000..2900b1486
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: a5859c7af3dcd0e4f960a8f6fb4033cf
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__010.png b/Chromacore/Assets/Sprite Animations/Death/death1__010.png
new file mode 100644
index 000000000..5a8a1a352
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__010.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__010.png.meta
new file mode 100644
index 000000000..e46d10230
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: f3e401bc8d9683744b3f24eafd172294
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__011.png b/Chromacore/Assets/Sprite Animations/Death/death1__011.png
new file mode 100644
index 000000000..6023fb92c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__011.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__011.png.meta
new file mode 100644
index 000000000..a0c59f1f1
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8ea3635266ada314ca9ee412eb2cd6be
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__012.png b/Chromacore/Assets/Sprite Animations/Death/death1__012.png
new file mode 100644
index 000000000..0cdce1b65
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__012.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__012.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__012.png.meta
new file mode 100644
index 000000000..9f5dc3060
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__012.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 125376e59a37c1b4f97a198140a0ea5b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__013.png b/Chromacore/Assets/Sprite Animations/Death/death1__013.png
new file mode 100644
index 000000000..092867f64
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__013.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__013.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__013.png.meta
new file mode 100644
index 000000000..27e1a55cc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__013.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8792fd22fc79f69409b788df27cc388a
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__014.png b/Chromacore/Assets/Sprite Animations/Death/death1__014.png
new file mode 100644
index 000000000..205d13946
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__014.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__014.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__014.png.meta
new file mode 100644
index 000000000..5ea919764
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__014.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: a35ba100ff9b50c4987b4ec3908e8db9
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__015.png b/Chromacore/Assets/Sprite Animations/Death/death1__015.png
new file mode 100644
index 000000000..252b19a12
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__015.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__015.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__015.png.meta
new file mode 100644
index 000000000..1d91ce5bb
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__015.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 67bd1b88048e32b448169497df23fda4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__016.png b/Chromacore/Assets/Sprite Animations/Death/death1__016.png
new file mode 100644
index 000000000..d53cdc61d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__016.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__016.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__016.png.meta
new file mode 100644
index 000000000..d96d7ac0d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__016.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 79ad264928430744f92d262639a00095
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__017.png b/Chromacore/Assets/Sprite Animations/Death/death1__017.png
new file mode 100644
index 000000000..4cfa32c4e
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__017.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__017.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__017.png.meta
new file mode 100644
index 000000000..84c0e524d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__017.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 9d16fac56a88ee64197d58ae8856d1c4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__018.png b/Chromacore/Assets/Sprite Animations/Death/death1__018.png
new file mode 100644
index 000000000..b29a0bcde
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__018.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__018.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__018.png.meta
new file mode 100644
index 000000000..967073708
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__018.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 577c632d98e2c0449a29f152e35f64a6
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__019.png b/Chromacore/Assets/Sprite Animations/Death/death1__019.png
new file mode 100644
index 000000000..9fbc2a6f7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Death/death1__019.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Death/death1__019.png.meta b/Chromacore/Assets/Sprite Animations/Death/death1__019.png.meta
new file mode 100644
index 000000000..9240989c0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Death/death1__019.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 32bf586b338fdaa4298f606dc060e56b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!.meta
new file mode 100644
index 000000000..f1befef9d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 448dda5c671a3824dafb1ef3dc55953d
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data.meta
new file mode 100644
index 000000000..12b2014c4
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 979bf07e3a58f3e469b6b8556c192879
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab
new file mode 100644
index 000000000..146807fb8
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab.meta
new file mode 100644
index 000000000..707b56d7c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/Teli_Punch.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: bfa58f44ca500c245b341b4549f6ffd0
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat
new file mode 100644
index 000000000..6737924c9
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..2189db3a8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: f2b9c3fd6efd3254bb6d52548f289bd3
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png
new file mode 100644
index 000000000..989ffdc34
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png.meta
new file mode 100644
index 000000000..0c88635a2
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0999d6cc339e00a43b7941d2d74aaa2a
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab
new file mode 100644
index 000000000..6bc23d03b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab.meta
new file mode 100644
index 000000000..0eb717368
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/Teli_Punch.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: d6750f105a3afdc43955e22b4391ac68
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png
new file mode 100644
index 000000000..03c369a91
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png.meta
new file mode 100644
index 000000000..f96807309
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ac254554c329a4d408d8b524e2384ecf
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png
new file mode 100644
index 000000000..ad3aaa621
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png.meta
new file mode 100644
index 000000000..892db0441
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d80f9f7aed4690f46b80a4b941c851b4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png
new file mode 100644
index 000000000..c7f3d115d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png.meta
new file mode 100644
index 000000000..aae7002c3
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 3b6573a805efa214089b0fc0339e36f6
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png
new file mode 100644
index 000000000..2507ac0b7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png.meta
new file mode 100644
index 000000000..e39a8889f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 721359c82de817f4091d663cf9b71b07
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png
new file mode 100644
index 000000000..5d5fa79a5
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png.meta
new file mode 100644
index 000000000..e978ab014
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: cd3ee63ae85e4ce4d994708add1c5c72
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png
new file mode 100644
index 000000000..c9538e3ac
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png.meta
new file mode 100644
index 000000000..de28b20ae
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 3742e5fc362eea0408cbee7402a7db06
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png
new file mode 100644
index 000000000..b0b03f3b6
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png.meta
new file mode 100644
index 000000000..03eb13b4c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 4c178d184aecf5846919dd18d8fc07cd
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png
new file mode 100644
index 000000000..d458d7dc7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png.meta
new file mode 100644
index 000000000..2e970c5ae
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 49de1a3f76b98a24097b273f0e6fc58b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png
new file mode 100644
index 000000000..e49337789
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png.meta
new file mode 100644
index 000000000..bcf95d1a0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: edd37bc68cbff2c4f807bc4472d3cfb2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png
new file mode 100644
index 000000000..c3bcc0b97
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png.meta
new file mode 100644
index 000000000..07606663f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: fccc431239f155e4799737b269bb7197
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png
new file mode 100644
index 000000000..079622484
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png.meta
new file mode 100644
index 000000000..bd9f7e67a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: a5b16ffd0a752fd46a4631ba1226cc51
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png
new file mode 100644
index 000000000..5de16e877
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png.meta b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png.meta
new file mode 100644
index 000000000..af254a6d8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Falcon Punch!/punch__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 54a6ba7e3e0024841835e37d0e61b856
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim.meta b/Chromacore/Assets/Sprite Animations/Fall_anim.meta
new file mode 100644
index 000000000..eab64cf80
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 6bdef9127e1cb674e9df1ce47c6625d2
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data.meta
new file mode 100644
index 000000000..19948c221
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 6a57f2105bde3394abc826f4cb8f04d5
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab
new file mode 100644
index 000000000..2b562a9a5
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab.meta
new file mode 100644
index 000000000..d0b4b130d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/Teli_Fall.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 27b9370e4adb8b141a57f3c371a1364e
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat
new file mode 100644
index 000000000..733de76f8
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..ee34fd88a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 6ffe3d16c7935634cb7051246d0af23f
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png
new file mode 100644
index 000000000..69bcc0319
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png.meta
new file mode 100644
index 000000000..de4f86770
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 62dc47b53adac0c4294bc02d9e01f543
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab
new file mode 100644
index 000000000..6a181dcc9
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab.meta
new file mode 100644
index 000000000..a02ce693b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/Teli_Fall.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3cd16a0ec8b3a4945a864233623eed06
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png
new file mode 100644
index 000000000..40e7e4360
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png.meta
new file mode 100644
index 000000000..aa9ee09f8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 89ceb42fe5e440b468e00a736f0e5ab2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png
new file mode 100644
index 000000000..8d4535615
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png.meta
new file mode 100644
index 000000000..46d0b3bce
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 6cecde4ec9e1875459bedbd317c85aa4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png
new file mode 100644
index 000000000..2d330e61f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png.meta
new file mode 100644
index 000000000..3ee2fb8fc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 542d81b93b95eea4e9cf64f8ad8561e2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png
new file mode 100644
index 000000000..4c0de8dd9
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png.meta
new file mode 100644
index 000000000..00c5a5dbb
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 21243dcb7c08c5346b95632fc8b861a2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png
new file mode 100644
index 000000000..2a3d10319
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png.meta
new file mode 100644
index 000000000..7b1a370d7
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 833f06a0f522b17449e9db65008ddbf0
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png
new file mode 100644
index 000000000..57cf0d828
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png.meta
new file mode 100644
index 000000000..a01e69f58
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 407b5c16eb2d167449a89e7257becd70
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png
new file mode 100644
index 000000000..e0f7ddfdf
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png.meta
new file mode 100644
index 000000000..24bad9c45
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: fe5eacfe0bb5a4c46a71f9b6f2258748
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png
new file mode 100644
index 000000000..e710e354a
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png.meta
new file mode 100644
index 000000000..3dabcf32f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 4a111d70085f40c4ebf47c99afccaa28
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png
new file mode 100644
index 000000000..36c3c34c2
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png.meta
new file mode 100644
index 000000000..95697fce2
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 285c795c43201c04da0d4ea99fc72312
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png
new file mode 100644
index 000000000..cc06ed176
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png.meta
new file mode 100644
index 000000000..368cb7c5b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 651cde10acd40fe499a5e369d1e1dd69
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png
new file mode 100644
index 000000000..ebafb5829
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png.meta
new file mode 100644
index 000000000..27b9b95f6
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: decbaa4844762c1458c4d6e51d12a103
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png
new file mode 100644
index 000000000..6258e017c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png.meta
new file mode 100644
index 000000000..5be66223d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: be9687f1da0d3cc459302a709826afb8
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png
new file mode 100644
index 000000000..b956b0191
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png.meta b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png.meta
new file mode 100644
index 000000000..7b32df0fa
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Fall_anim/fall__012.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 50389f35aa22ec74898cbfd38cf448c3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run.meta
new file mode 100644
index 000000000..9f8b4167e
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: becfb47d3a62a5d43b22aad7c3f7f792
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png
new file mode 100644
index 000000000..6ec33b05e
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png.meta
new file mode 100644
index 000000000..6a6c946b8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 4b560e06afe5f7f49a382d38f72b0f31
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png
new file mode 100644
index 000000000..279ec5496
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png.meta
new file mode 100644
index 000000000..89f3f7be0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: b57f97341825f7841b2f596a142111c5
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png
new file mode 100644
index 000000000..229cc0d24
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png.meta
new file mode 100644
index 000000000..0a632d575
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0468277f1163f744e85d41e7f8a3e211
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png
new file mode 100644
index 000000000..a80a70de7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png.meta
new file mode 100644
index 000000000..884fe8d73
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 563a12856bae0c546a5d056211b663f6
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png
new file mode 100644
index 000000000..3ef4eec4d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png.meta
new file mode 100644
index 000000000..04f7a3b5a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 6f1729e7f2d1b8646915695c3f3257b2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png
new file mode 100644
index 000000000..9d948907f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png.meta
new file mode 100644
index 000000000..7108636c7
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 79dc66c1e3bfacb4f8848da1c0bcb337
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png
new file mode 100644
index 000000000..b7b583034
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png.meta
new file mode 100644
index 000000000..91a5239a0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ddee8ace603361141b8d9d31f3ecb26b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png
new file mode 100644
index 000000000..37c663b96
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png.meta
new file mode 100644
index 000000000..c3b47f261
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d8047acca26009a4986f92a5f00ba18f
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png
new file mode 100644
index 000000000..359cb6107
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png.meta
new file mode 100644
index 000000000..b1b4d4978
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 90109807c3c9caf47b2a0ce116afcbdd
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png
new file mode 100644
index 000000000..baf06ea39
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png.meta
new file mode 100644
index 000000000..03070129e
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 3df38da409d991742a34a8ecde0b7b88
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png
new file mode 100644
index 000000000..dd3ecd367
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png.meta
new file mode 100644
index 000000000..3a3e76d86
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: c37a69e289e9d0c4592d40a5f82159d3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png
new file mode 100644
index 000000000..4cd2595d2
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png.meta
new file mode 100644
index 000000000..9134c0adc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/2run_glow__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 9f73454ce626a5a418c2a5ae38ef2be6
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data.meta
new file mode 100644
index 000000000..1bafc65e0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 35cf713bee3c60d418cf23b6d19dea7b
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab
new file mode 100644
index 000000000..c4293a946
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab.meta
new file mode 100644
index 000000000..3c797f146
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/Teli_Run_glow.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 5e5c1fec588e76e4ab3c3ba1f5789cad
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat
new file mode 100644
index 000000000..426633e53
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..b64aab10f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7e4bad235dc91634ab39ce3dfdcc54dc
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png
new file mode 100644
index 000000000..5e4dc2ac7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png.meta
new file mode 100644
index 000000000..daa413b8d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 409a87e013ebd444b81777c26fc3acdb
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab
new file mode 100644
index 000000000..d56db9057
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab.meta b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab.meta
new file mode 100644
index 000000000..3a40fc745
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Glowy_bw_run/Teli_Run_glow.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: a375c96ae1ee11b4fb7ef8d8b153df21
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_Animations.prefab b/Chromacore/Assets/Sprite Animations/Item_Animations.prefab
new file mode 100644
index 000000000..3be44ae95
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_Animations.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_Animations.prefab.meta b/Chromacore/Assets/Sprite Animations/Item_Animations.prefab.meta
new file mode 100644
index 000000000..2f7ec7446
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_Animations.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: aa8f9930819db6545b88cc0f10f4ec56
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs.meta b/Chromacore/Assets/Sprite Animations/Item_pngs.meta
new file mode 100644
index 000000000..05c026c0a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: cedefa72d1da97e4d81be2d1630aceeb
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle.meta
new file mode 100644
index 000000000..7cb3a3aaa
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 15c12664fb5b22846871ba2cb913de84
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data.meta
new file mode 100644
index 000000000..3968170e8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 6e85c6098850ca44d8c82b08b7f45e5f
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab
new file mode 100644
index 000000000..1009d45bb
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab.meta
new file mode 100644
index 000000000..2df03b79f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/Item_Idle.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 4cf48e469dccff54995aeee9bce7e9ff
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat
new file mode 100644
index 000000000..f3d828caf
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..ce2511337
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 6b0dc1b5453ae534c881a22a5cb36eea
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png
new file mode 100644
index 000000000..032b359c8
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png.meta
new file mode 100644
index 000000000..38d6b9778
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 38b957ebe3628b94dac241ee29065f27
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab
new file mode 100644
index 000000000..45f4c5423
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab.meta
new file mode 100644
index 000000000..9f5a9ea3e
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/Item_Idle.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: bc73da33c57301b42ac39335862741d0
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png
new file mode 100644
index 000000000..2074184c1
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png.meta
new file mode 100644
index 000000000..1866d6119
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: f3dbdaa3f64188c48bb012909c2418b4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png
new file mode 100644
index 000000000..617504840
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png.meta
new file mode 100644
index 000000000..0e6770d9e
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 09c7628c79bc3424c99583aa1ea3fa0e
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png
new file mode 100644
index 000000000..340702683
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png.meta
new file mode 100644
index 000000000..df27c6d48
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: b4638cb09f2e1ec4b82a422c6ae06b2c
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png
new file mode 100644
index 000000000..5209477da
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png.meta
new file mode 100644
index 000000000..7bf971af4
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 27f0826f0cb3a8a4284fc4e8962ae728
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png
new file mode 100644
index 000000000..3f0c820b6
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png.meta
new file mode 100644
index 000000000..108f13681
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0a7af5a109276e84398d32bab17425c3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png
new file mode 100644
index 000000000..99dfeb939
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png.meta
new file mode 100644
index 000000000..47eb87867
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: bc0f8e4bf3f7fc9439d71dad983214a2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png
new file mode 100644
index 000000000..38225241d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png.meta
new file mode 100644
index 000000000..37214f490
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: c0c049b2be26be84d9bfb0c32d5b7ab2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png
new file mode 100644
index 000000000..c92c7a4ef
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png.meta
new file mode 100644
index 000000000..51186e7bc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d632595e8e7d94443a11049e6c60a4d3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png
new file mode 100644
index 000000000..6dec23d86
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png.meta b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png.meta
new file mode 100644
index 000000000..1b1cfc698
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Item_pngs/Item idle/item_idle__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 76aad94daa6a14b4f93f547ecad365f1
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs.meta
new file mode 100644
index 000000000..ed53880e6
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 52d4db7bda6719149b5bf14f5a4a92e6
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png
new file mode 100644
index 000000000..0c2f77e17
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png.meta
new file mode 100644
index 000000000..a20d8b2e4
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: ea94a4ef69d4fde45bec6f72bbf18353
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png
new file mode 100644
index 000000000..85f3bc2ae
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png.meta
new file mode 100644
index 000000000..794b6c78e
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 64f147f65a38a6b47841d6453a561d21
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png
new file mode 100644
index 000000000..56adde12b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png.meta
new file mode 100644
index 000000000..8f9f63a5a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 043feb63738e8a44786adc24ae89ee36
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png
new file mode 100644
index 000000000..5e69f24aa
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png.meta
new file mode 100644
index 000000000..8298f0378
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: a9c70841f76f3de458f17259c457f9f3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png
new file mode 100644
index 000000000..0ff9690a0
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png.meta
new file mode 100644
index 000000000..7a9f3d4e2
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 812861b5e196d7c4cb810b875f0fafb9
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png
new file mode 100644
index 000000000..c4ae0b8a7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png.meta
new file mode 100644
index 000000000..ad077e7db
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 708ada0444e6fe549a2e28b16c0a00b7
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png
new file mode 100644
index 000000000..6d19d4361
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png.meta
new file mode 100644
index 000000000..4fcbe6566
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d27b01e695c5b0f41b160fec0cf834a0
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png
new file mode 100644
index 000000000..18224273d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png.meta
new file mode 100644
index 000000000..3eff667f4
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 1112eec01b89fed4296d26c2bdde2570
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png
new file mode 100644
index 000000000..d2aa7db21
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png.meta
new file mode 100644
index 000000000..97693bd02
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 7d5f3a712b8297d4fbb3d8f3434106f7
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png
new file mode 100644
index 000000000..17f493cb2
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png.meta
new file mode 100644
index 000000000..c16dbf26c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 62fa2bec8152e0c4f9a801ac54757642
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png
new file mode 100644
index 000000000..b9dac9e9b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png.meta
new file mode 100644
index 000000000..7a062ff19
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 2d7841e0222bb374f808c4ceb834263f
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png
new file mode 100644
index 000000000..f6fd5e958
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png.meta
new file mode 100644
index 000000000..f569913b2
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/2jump__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 35d6aaa88f4383c4bb5e60167282dd01
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data.meta
new file mode 100644
index 000000000..5c604e1a8
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: d88373ff4d07f4d4ab2fcaac8d313789
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab
new file mode 100644
index 000000000..c46e67e13
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab.meta
new file mode 100644
index 000000000..17d87a4c7
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/Teli_Jump.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 57975a1c2996ae34f968f8cf981e543c
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat
new file mode 100644
index 000000000..687856916
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..80f9dcd7a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3d476b535e9fdbe47a991b23928813ea
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png
new file mode 100644
index 000000000..aef81a1d7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png.meta
new file mode 100644
index 000000000..b1abde324
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8f9ccfbf29e75184a9d4d125b50dacb4
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab
new file mode 100644
index 000000000..3c89b55e1
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab.meta b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab.meta
new file mode 100644
index 000000000..cb4644b8f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Jump_pngs/Teli_Jump.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 6c0ba019c0e91e343956d48078d7897c
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles.meta b/Chromacore/Assets/Sprite Animations/Obstacles.meta
new file mode 100644
index 000000000..ee7dddc94
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 39e0fc6480dbe4844a71b9fe4b9fe98c
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data.meta b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data.meta
new file mode 100644
index 000000000..4fe0b5fc5
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 0d74658e19c7efe49bdecb0c02040b92
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab
new file mode 100644
index 000000000..357ccda30
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab.meta b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab.meta
new file mode 100644
index 000000000..41d140f76
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/Obstacles.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: b35ae102d76b5ba46a8d033656f263d8
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat
new file mode 100644
index 000000000..702ec4b8b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..6f93e54fd
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: fbfd350f5ba9d3f4b8063bd7e7dc0598
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png
new file mode 100644
index 000000000..791ba729f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png.meta
new file mode 100644
index 000000000..4068d8acc
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d787b35b75d1a56428428b115310a784
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab
new file mode 100644
index 000000000..982eb07a9
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab.meta b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab.meta
new file mode 100644
index 000000000..ebe6c4146
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/Obstacles.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 698fde4711ecf644993cc6cd7b3cf490
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png
new file mode 100644
index 000000000..62e795a0d
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png.meta
new file mode 100644
index 000000000..0c58c3e6f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 579383a4c9d79f746aec856226d86231
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png
new file mode 100644
index 000000000..2dd6fdd2f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png.meta
new file mode 100644
index 000000000..70e3f58e4
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0671026b4cb2dd6428c018785acfb792
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png
new file mode 100644
index 000000000..b347abf0f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png.meta
new file mode 100644
index 000000000..e8ad444d5
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: dadee0336498b3a4493a7ba4d7c7905d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png
new file mode 100644
index 000000000..bc45308c4
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png.meta
new file mode 100644
index 000000000..04d1b9e24
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: e69f9b4e512087b4db28530fecea457b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png
new file mode 100644
index 000000000..63de054bf
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png.meta
new file mode 100644
index 000000000..db5e1414c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 645562ea75102c34eb5a4f6189581feb
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png
new file mode 100644
index 000000000..d2724e0e7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png.meta
new file mode 100644
index 000000000..f48a5fbb9
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 35c55481eacf60045b8b2ce37484d5bb
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png
new file mode 100644
index 000000000..6cb548886
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png.meta
new file mode 100644
index 000000000..0a7322494
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 12942c8c2e6f1e441a260ad5492630e5
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png
new file mode 100644
index 000000000..a688a9726
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png.meta b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png.meta
new file mode 100644
index 000000000..69a0f7402
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Obstacles/obstacle__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 4362079023fea1a4b97d2c481360cfee
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs.meta b/Chromacore/Assets/Sprite Animations/Run_pngs.meta
new file mode 100644
index 000000000..eec92526f
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: c3376ddc7c987e540bf8fdc756603a3c
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png
new file mode 100644
index 000000000..65ea1df2b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png.meta
new file mode 100644
index 000000000..436a99c8a
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__000.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d7c268323a41a9e4c90ff59ef67c5267
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png
new file mode 100644
index 000000000..c18db5140
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png.meta
new file mode 100644
index 000000000..fc80aa1ac
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__001.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 9e57480ebfce2ca47b6cc154000c7560
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png
new file mode 100644
index 000000000..f1cefe3f7
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png.meta
new file mode 100644
index 000000000..46b40eb0b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__002.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 111e195ecedd3e548b8881ddf402f848
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png
new file mode 100644
index 000000000..c8e1a4369
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png.meta
new file mode 100644
index 000000000..7c153e1c3
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__003.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: c75cf30aa0fa218459d729c36ffe8d46
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png
new file mode 100644
index 000000000..4c977667b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png.meta
new file mode 100644
index 000000000..c968b9d2c
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__004.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 58515cead3f35394a8e2ce3e530bab1a
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png
new file mode 100644
index 000000000..f6240f3ab
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png.meta
new file mode 100644
index 000000000..c75cd1a02
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__005.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: db2124f4319c3de4a99745598f4212a3
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png
new file mode 100644
index 000000000..b1c5e0d7f
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png.meta
new file mode 100644
index 000000000..e70579c95
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__006.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 4b18fa53d2d23cb4b98ea2b82d55c7a0
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png
new file mode 100644
index 000000000..3b5178b94
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png.meta
new file mode 100644
index 000000000..0e53e2db9
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__007.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: a7e5a8b3a3319d9449015e1916906f01
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png
new file mode 100644
index 000000000..e68aaec2c
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png.meta
new file mode 100644
index 000000000..1cdf91bf0
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__008.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 227acbd6a01ca364c9f1ae029ed1821c
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png
new file mode 100644
index 000000000..8646a80e4
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png.meta
new file mode 100644
index 000000000..e5b4b6f6b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__009.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 54868da4a425dd04d8db8c87f04b6ba5
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png
new file mode 100644
index 000000000..52490682b
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png.meta
new file mode 100644
index 000000000..2cb82be18
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__010.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: b77c9546d4e1ad146bb658cf527ef1f2
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png
new file mode 100644
index 000000000..4ccca40a6
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png.meta
new file mode 100644
index 000000000..6b56c43cb
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/2run_plain__000__011.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 9ca89abf6ed451340810558026760253
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 1
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 4096
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 5
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data.meta
new file mode 100644
index 000000000..fbf4d7c5b
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: f4b0ccfc1ddc5ac4c8b5b4bc88f2db33
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab
new file mode 100644
index 000000000..cf36a4c15
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab.meta
new file mode 100644
index 000000000..66042dd3d
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/Teli_Run.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 72d90eac8b72e554aa9f65d183282e71
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat
new file mode 100644
index 000000000..5a1d5b0c0
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat.meta
new file mode 100644
index 000000000..065e6a509
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0 material.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 15bc824edf2b4c847b001c4ca79b5aff
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png
new file mode 100644
index 000000000..1a5cb9235
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png.meta
new file mode 100644
index 000000000..9ec0981a9
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run Data/atlas0.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 2729b1cb271452d4691f262705e9d804
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -3
+ maxTextureSize: 2048
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: -1
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab
new file mode 100644
index 000000000..eed5d3b77
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab.meta b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab.meta
new file mode 100644
index 000000000..3a3c45a67
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Run_pngs/Teli_Run.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: a1344e0a7f3c91745ad8d4fbfb61ad97
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab b/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab
new file mode 100644
index 000000000..552748702
Binary files /dev/null and b/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab differ
diff --git a/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab.meta b/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab.meta
new file mode 100644
index 000000000..c91334f04
--- /dev/null
+++ b/Chromacore/Assets/Sprite Animations/Teli_Animations.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2a53cb7d93777d1428c7f1bc94f70cca
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets.meta b/Chromacore/Assets/Standard Assets.meta
new file mode 100644
index 000000000..f4d0ff4e1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 0e0f8e634e708204384d11cfc6084fc8
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers.meta b/Chromacore/Assets/Standard Assets/Character Controllers.meta
new file mode 100644
index 000000000..8f37525fe
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 54216e9ed42974e30967824b7f0b2806
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab b/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab
new file mode 100644
index 000000000..df7ab5dfa
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab.meta b/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab.meta
new file mode 100644
index 000000000..0b2fb6a27
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/3rd Person Controller.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2314ce3a3eecf4816bad3c9eca4de2e1
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab b/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab
new file mode 100644
index 000000000..5a34be576
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab.meta b/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab.meta
new file mode 100644
index 000000000..8571a4d34
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/First Person Controller.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 9d4133d5d30b644bd87802a347eaccbe
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources.meta
new file mode 100644
index 000000000..9adeff351
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 7e0b0a994d8934541a387e092630b5db
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter.meta
new file mode 100644
index 000000000..383a41e26
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: c81df2918c80c054ca3d436e62090893
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX
new file mode 100644
index 000000000..b3ee8f359
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX.meta
new file mode 100644
index 000000000..1997dee57
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Constructor.FBX.meta
@@ -0,0 +1,267 @@
+fileFormatVersion: 2
+guid: 449b48f7eb5d87a4baaa5fb73f875a59
+ModelImporter:
+ serializedVersion: 15
+ fileIDToRecycleName:
+ 100000: Bip001 R Finger1
+ 100002: Bip001 R Finger21
+ 100004: Bip001 R Finger11
+ 100006: Bip001 R Finger02
+ 100010: Bip001 R Finger12
+ 100012: Bip001 R Finger41
+ 100014: Bip001 R Finger4
+ 100018: Bip001 R Finger32
+ 100020: Bip001 R Finger31
+ 100022: Bip001 R Finger3
+ 100026: hip_adjustment_bone_right
+ 100028: Bip001 R Finger42
+ 100032: hip_adjustment_bone_left
+ 100034: Bip001 R Finger2
+ 100036: Bip001 R Finger22
+ 100040: Bip001 R UpperArm
+ 100042: Bip001 R Forearm
+ 100044: Bip001 R Finger0
+ 100046: Bip001 R Finger01
+ 100052: //RootNode
+ 100054: Bip001 R Clavicle
+ 100058: Bip001 L Finger3
+ 100060: Bip001 L Finger31
+ 100062: Bip001 L Finger32
+ 100066: Bip001 L Finger4
+ 100068: Bip001 L Finger41
+ 100070: Bip001 L Finger42
+ 100074: Bip001 L Finger22
+ 100076: Bip001 L Finger02
+ 100080: Bip001 L Finger1
+ 100082: Bip001 L Finger11
+ 100084: Bip001 L Finger12
+ 100088: Bip001 L Finger2
+ 100090: Bip001 L Finger21
+ 100092: Bip001 L Finger0
+ 100094: Bip001 L Finger01
+ 100096: Bip001 L Forearm
+ 100098: Bip001 L UpperArm
+ 100100: Bip001 L Clavicle
+ 100102: construction_worker
+ 100104: Bip001 R Toe0
+ 100106: Bip001 R Foot
+ 100108: Bip001 R Calf
+ 100110: Bip001 R Thigh
+ 100112: Bip001 L Toe0
+ 100114: Bip001 L Foot
+ 100116: Bip001 L Calf
+ 100118: Bip001 L Thigh
+ 100120: helmet_bone
+ 100124: Bip001 Head
+ 100126: wrench
+ 100128: Bip001 R Hand
+ 100130: Bip001 L Hand
+ 100132: Bip001 Neck
+ 100134: Bip001 Spine1
+ 100136: Bip001 Spine
+ 100138: Bip001 Pelvis
+ 100140: Bip001
+ 400000: Bip001 R Finger1
+ 400002: Bip001 R Finger21
+ 400004: Bip001 R Finger11
+ 400006: Bip001 R Finger02
+ 400010: Bip001 R Finger12
+ 400012: Bip001 R Finger41
+ 400014: Bip001 R Finger4
+ 400018: Bip001 R Finger32
+ 400020: Bip001 R Finger31
+ 400022: Bip001 R Finger3
+ 400026: hip_adjustment_bone_right
+ 400028: Bip001 R Finger42
+ 400032: hip_adjustment_bone_left
+ 400034: Bip001 R Finger2
+ 400036: Bip001 R Finger22
+ 400040: Bip001 R UpperArm
+ 400042: Bip001 R Forearm
+ 400044: Bip001 R Finger0
+ 400046: Bip001 R Finger01
+ 400052: //RootNode
+ 400054: Bip001 R Clavicle
+ 400058: Bip001 L Finger3
+ 400060: Bip001 L Finger31
+ 400062: Bip001 L Finger32
+ 400066: Bip001 L Finger4
+ 400068: Bip001 L Finger41
+ 400070: Bip001 L Finger42
+ 400074: Bip001 L Finger22
+ 400076: Bip001 L Finger02
+ 400080: Bip001 L Finger1
+ 400082: Bip001 L Finger11
+ 400084: Bip001 L Finger12
+ 400088: Bip001 L Finger2
+ 400090: Bip001 L Finger21
+ 400092: Bip001 L Finger0
+ 400094: Bip001 L Finger01
+ 400096: Bip001 L Forearm
+ 400098: Bip001 L UpperArm
+ 400100: Bip001 L Clavicle
+ 400102: construction_worker
+ 400104: Bip001 R Toe0
+ 400106: Bip001 R Foot
+ 400108: Bip001 R Calf
+ 400110: Bip001 R Thigh
+ 400112: Bip001 L Toe0
+ 400114: Bip001 L Foot
+ 400116: Bip001 L Calf
+ 400118: Bip001 L Thigh
+ 400120: helmet_bone
+ 400124: Bip001 Head
+ 400126: wrench
+ 400128: Bip001 R Hand
+ 400130: Bip001 L Hand
+ 400132: Bip001 Neck
+ 400134: Bip001 Spine1
+ 400136: Bip001 Spine
+ 400138: Bip001 Pelvis
+ 400140: Bip001
+ 2300000: wrench
+ 3300000: wrench
+ 4300000: construction_worker
+ 4300002: wrench
+ 7400012: idle
+ 7400014: run
+ 7400016: walk
+ 7400018: jump_pose
+ 11100000: //RootNode
+ 13700000: Bip001 Pelvis
+ materials:
+ importMaterials: 1
+ materialName: 3
+ materialSearch: 1
+ animations:
+ legacyGenerateAnimations: 3
+ bakeSimulation: 0
+ animationCompression: 0
+ animationRotationError: .5
+ animationPositionError: .5
+ animationScaleError: .5
+ animationWrapMode: 0
+ clipAnimations:
+ - name: idle
+ takeName:
+ firstFrame: 2
+ lastFrame: 62
+ wrapMode: 2
+ orientationOffsetY: 0
+ level: 0
+ cycleOffset: 0
+ loop: 0
+ loopBlend: 0
+ loopBlendOrientation: 0
+ loopBlendPositionY: 0
+ loopBlendPositionXZ: 0
+ keepOriginalOrientation: 0
+ keepOriginalPositionY: 1
+ keepOriginalPositionXZ: 0
+ heightFromFeet: 0
+ mirror: 0
+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
+ curves: []
+ transformMask: []
+ - name: run
+ takeName:
+ firstFrame: 65
+ lastFrame: 81
+ wrapMode: 2
+ orientationOffsetY: 0
+ level: 0
+ cycleOffset: 0
+ loop: 0
+ loopBlend: 0
+ loopBlendOrientation: 0
+ loopBlendPositionY: 0
+ loopBlendPositionXZ: 0
+ keepOriginalOrientation: 0
+ keepOriginalPositionY: 1
+ keepOriginalPositionXZ: 0
+ heightFromFeet: 0
+ mirror: 0
+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
+ curves: []
+ transformMask: []
+ - name: walk
+ takeName:
+ firstFrame: 84
+ lastFrame: 116
+ wrapMode: 2
+ orientationOffsetY: 0
+ level: 0
+ cycleOffset: 0
+ loop: 0
+ loopBlend: 0
+ loopBlendOrientation: 0
+ loopBlendPositionY: 0
+ loopBlendPositionXZ: 0
+ keepOriginalOrientation: 0
+ keepOriginalPositionY: 1
+ keepOriginalPositionXZ: 0
+ heightFromFeet: 0
+ mirror: 0
+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
+ curves: []
+ transformMask: []
+ - name: jump_pose
+ takeName:
+ firstFrame: 118
+ lastFrame: 123
+ wrapMode: 0
+ orientationOffsetY: 0
+ level: 0
+ cycleOffset: 0
+ loop: 0
+ loopBlend: 0
+ loopBlendOrientation: 0
+ loopBlendPositionY: 0
+ loopBlendPositionXZ: 0
+ keepOriginalOrientation: 0
+ keepOriginalPositionY: 1
+ keepOriginalPositionXZ: 0
+ heightFromFeet: 0
+ mirror: 0
+ bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
+ curves: []
+ transformMask: []
+ isReadable: 1
+ meshes:
+ lODScreenPercentages: []
+ globalScale: .00999999978
+ meshCompression: 0
+ addColliders: 0
+ importBlendShapes: 1
+ swapUVChannels: 0
+ generateSecondaryUV: 0
+ useFileUnits: 1
+ optimizeMeshForGPU: 1
+ weldVertices: 1
+ secondaryUVAngleDistortion: 8
+ secondaryUVAreaDistortion: 15.000001
+ secondaryUVHardAngle: 88
+ secondaryUVPackMargin: 4
+ tangentSpace:
+ normalSmoothAngle: 60
+ splitTangentsAcrossUV: 1
+ normalImportMode: 0
+ tangentImportMode: 1
+ importAnimation: 1
+ copyAvatar: 0
+ humanDescription:
+ human: []
+ skeleton: []
+ handles: []
+ armTwist: .5
+ foreArmTwist: .5
+ upperLegTwist: .5
+ legTwist: .5
+ armStretch: .0500000007
+ legStretch: .0500000007
+ feetSpacing: 0
+ rootMotionBoneName:
+ lastHumanDescriptionAvatarSource: {instanceID: 0}
+ additionalBone: 1
+ animationType: 1
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials.meta
new file mode 100644
index 000000000..a2269285c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e53c8c3dcc4ff59438bc9e86cb45c3f6
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat
new file mode 100644
index 000000000..9b8dff82d
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat.meta
new file mode 100644
index 000000000..96ace04ca
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Materials/constructor_done.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: ca49380a71a2bb64c830d06bd421b9d1
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures.meta
new file mode 100644
index 000000000..ab6115875
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: b365e6042890d4b1987423ed6bb8a08c
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png
new file mode 100644
index 000000000..59fef908a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png.meta
new file mode 100644
index 000000000..ae683f062
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_diffuse.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 97b050d43ac7c4d2b9f6cbb587650761
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: -1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png
new file mode 100644
index 000000000..b3126695d
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png differ
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png.meta
new file mode 100644
index 000000000..f31888a13
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/PrototypeCharacter/Textures/constructor_normals.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 531c14f8d5cdc4e5baa83ee6e16f783a
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 1
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 1
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: -1
+ mipBias: -1
+ wrapMode: -1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts.meta
new file mode 100644
index 000000000..5fe49ae61
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: f781c091d1c8647c380d5230adfaee54
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js
new file mode 100644
index 000000000..7e01c2e9f
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js
@@ -0,0 +1,587 @@
+#pragma strict
+#pragma implicit
+#pragma downcast
+
+// Does this script currently respond to input?
+var canControl : boolean = true;
+
+var useFixedUpdate : boolean = true;
+
+// For the next variables, @System.NonSerialized tells Unity to not serialize the variable or show it in the inspector view.
+// Very handy for organization!
+
+// The current global direction we want the character to move in.
+@System.NonSerialized
+var inputMoveDirection : Vector3 = Vector3.zero;
+
+// Is the jump button held down? We use this interface instead of checking
+// for the jump button directly so this script can also be used by AIs.
+@System.NonSerialized
+var inputJump : boolean = false;
+
+class CharacterMotorMovement {
+ // The maximum horizontal speed when moving
+ var maxForwardSpeed : float = 10.0;
+ var maxSidewaysSpeed : float = 10.0;
+ var maxBackwardsSpeed : float = 10.0;
+
+ // Curve for multiplying speed based on slope (negative = downwards)
+ var slopeSpeedMultiplier : AnimationCurve = AnimationCurve(Keyframe(-90, 1), Keyframe(0, 1), Keyframe(90, 0));
+
+ // How fast does the character change speeds? Higher is faster.
+ var maxGroundAcceleration : float = 30.0;
+ var maxAirAcceleration : float = 20.0;
+
+ // The gravity for the character
+ var gravity : float = 10.0;
+ var maxFallSpeed : float = 20.0;
+
+ // For the next variables, @System.NonSerialized tells Unity to not serialize the variable or show it in the inspector view.
+ // Very handy for organization!
+
+ // The last collision flags returned from controller.Move
+ @System.NonSerialized
+ var collisionFlags : CollisionFlags;
+
+ // We will keep track of the character's current velocity,
+ @System.NonSerialized
+ var velocity : Vector3;
+
+ // This keeps track of our current velocity while we're not grounded
+ @System.NonSerialized
+ var frameVelocity : Vector3 = Vector3.zero;
+
+ @System.NonSerialized
+ var hitPoint : Vector3 = Vector3.zero;
+
+ @System.NonSerialized
+ var lastHitPoint : Vector3 = Vector3(Mathf.Infinity, 0, 0);
+}
+
+var movement : CharacterMotorMovement = CharacterMotorMovement();
+
+enum MovementTransferOnJump {
+ None, // The jump is not affected by velocity of floor at all.
+ InitTransfer, // Jump gets its initial velocity from the floor, then gradualy comes to a stop.
+ PermaTransfer, // Jump gets its initial velocity from the floor, and keeps that velocity until landing.
+ PermaLocked // Jump is relative to the movement of the last touched floor and will move together with that floor.
+}
+
+// We will contain all the jumping related variables in one helper class for clarity.
+class CharacterMotorJumping {
+ // Can the character jump?
+ var enabled : boolean = true;
+
+ // How high do we jump when pressing jump and letting go immediately
+ var baseHeight : float = 1.0;
+
+ // We add extraHeight units (meters) on top when holding the button down longer while jumping
+ var extraHeight : float = 4.1;
+
+ // How much does the character jump out perpendicular to the surface on walkable surfaces?
+ // 0 means a fully vertical jump and 1 means fully perpendicular.
+ var perpAmount : float = 0.0;
+
+ // How much does the character jump out perpendicular to the surface on too steep surfaces?
+ // 0 means a fully vertical jump and 1 means fully perpendicular.
+ var steepPerpAmount : float = 0.5;
+
+ // For the next variables, @System.NonSerialized tells Unity to not serialize the variable or show it in the inspector view.
+ // Very handy for organization!
+
+ // Are we jumping? (Initiated with jump button and not grounded yet)
+ // To see if we are just in the air (initiated by jumping OR falling) see the grounded variable.
+ @System.NonSerialized
+ var jumping : boolean = false;
+
+ @System.NonSerialized
+ var holdingJumpButton : boolean = false;
+
+ // the time we jumped at (Used to determine for how long to apply extra jump power after jumping.)
+ @System.NonSerialized
+ var lastStartTime : float = 0.0;
+
+ @System.NonSerialized
+ var lastButtonDownTime : float = -100;
+
+ @System.NonSerialized
+ var jumpDir : Vector3 = Vector3.up;
+}
+
+var jumping : CharacterMotorJumping = CharacterMotorJumping();
+
+class CharacterMotorMovingPlatform {
+ var enabled : boolean = true;
+
+ var movementTransfer : MovementTransferOnJump = MovementTransferOnJump.PermaTransfer;
+
+ @System.NonSerialized
+ var hitPlatform : Transform;
+
+ @System.NonSerialized
+ var activePlatform : Transform;
+
+ @System.NonSerialized
+ var activeLocalPoint : Vector3;
+
+ @System.NonSerialized
+ var activeGlobalPoint : Vector3;
+
+ @System.NonSerialized
+ var activeLocalRotation : Quaternion;
+
+ @System.NonSerialized
+ var activeGlobalRotation : Quaternion;
+
+ @System.NonSerialized
+ var lastMatrix : Matrix4x4;
+
+ @System.NonSerialized
+ var platformVelocity : Vector3;
+
+ @System.NonSerialized
+ var newPlatform : boolean;
+}
+
+var movingPlatform : CharacterMotorMovingPlatform = CharacterMotorMovingPlatform();
+
+class CharacterMotorSliding {
+ // Does the character slide on too steep surfaces?
+ var enabled : boolean = true;
+
+ // How fast does the character slide on steep surfaces?
+ var slidingSpeed : float = 15;
+
+ // How much can the player control the sliding direction?
+ // If the value is 0.5 the player can slide sideways with half the speed of the downwards sliding speed.
+ var sidewaysControl : float = 1.0;
+
+ // How much can the player influence the sliding speed?
+ // If the value is 0.5 the player can speed the sliding up to 150% or slow it down to 50%.
+ var speedControl : float = 0.4;
+}
+
+var sliding : CharacterMotorSliding = CharacterMotorSliding();
+
+@System.NonSerialized
+var grounded : boolean = true;
+
+@System.NonSerialized
+var groundNormal : Vector3 = Vector3.zero;
+
+private var lastGroundNormal : Vector3 = Vector3.zero;
+
+private var tr : Transform;
+
+private var controller : CharacterController;
+
+function Awake () {
+ controller = GetComponent (CharacterController);
+ tr = transform;
+}
+
+private function UpdateFunction () {
+ // We copy the actual velocity into a temporary variable that we can manipulate.
+ var velocity : Vector3 = movement.velocity;
+
+ // Update velocity based on input
+ velocity = ApplyInputVelocityChange(velocity);
+
+ // Apply gravity and jumping force
+ velocity = ApplyGravityAndJumping (velocity);
+
+ // Moving platform support
+ var moveDistance : Vector3 = Vector3.zero;
+ if (MoveWithPlatform()) {
+ var newGlobalPoint : Vector3 = movingPlatform.activePlatform.TransformPoint(movingPlatform.activeLocalPoint);
+ moveDistance = (newGlobalPoint - movingPlatform.activeGlobalPoint);
+ if (moveDistance != Vector3.zero)
+ controller.Move(moveDistance);
+
+ // Support moving platform rotation as well:
+ var newGlobalRotation : Quaternion = movingPlatform.activePlatform.rotation * movingPlatform.activeLocalRotation;
+ var rotationDiff : Quaternion = newGlobalRotation * Quaternion.Inverse(movingPlatform.activeGlobalRotation);
+
+ var yRotation = rotationDiff.eulerAngles.y;
+ if (yRotation != 0) {
+ // Prevent rotation of the local up vector
+ tr.Rotate(0, yRotation, 0);
+ }
+ }
+
+ // Save lastPosition for velocity calculation.
+ var lastPosition : Vector3 = tr.position;
+
+ // We always want the movement to be framerate independent. Multiplying by Time.deltaTime does this.
+ var currentMovementOffset : Vector3 = velocity * Time.deltaTime;
+
+ // Find out how much we need to push towards the ground to avoid loosing grouning
+ // when walking down a step or over a sharp change in slope.
+ var pushDownOffset : float = Mathf.Max(controller.stepOffset, Vector3(currentMovementOffset.x, 0, currentMovementOffset.z).magnitude);
+ if (grounded)
+ currentMovementOffset -= pushDownOffset * Vector3.up;
+
+ // Reset variables that will be set by collision function
+ movingPlatform.hitPlatform = null;
+ groundNormal = Vector3.zero;
+
+ // Move our character!
+ movement.collisionFlags = controller.Move (currentMovementOffset);
+
+ movement.lastHitPoint = movement.hitPoint;
+ lastGroundNormal = groundNormal;
+
+ if (movingPlatform.enabled && movingPlatform.activePlatform != movingPlatform.hitPlatform) {
+ if (movingPlatform.hitPlatform != null) {
+ movingPlatform.activePlatform = movingPlatform.hitPlatform;
+ movingPlatform.lastMatrix = movingPlatform.hitPlatform.localToWorldMatrix;
+ movingPlatform.newPlatform = true;
+ }
+ }
+
+ // Calculate the velocity based on the current and previous position.
+ // This means our velocity will only be the amount the character actually moved as a result of collisions.
+ var oldHVelocity : Vector3 = new Vector3(velocity.x, 0, velocity.z);
+ movement.velocity = (tr.position - lastPosition) / Time.deltaTime;
+ var newHVelocity : Vector3 = new Vector3(movement.velocity.x, 0, movement.velocity.z);
+
+ // The CharacterController can be moved in unwanted directions when colliding with things.
+ // We want to prevent this from influencing the recorded velocity.
+ if (oldHVelocity == Vector3.zero) {
+ movement.velocity = new Vector3(0, movement.velocity.y, 0);
+ }
+ else {
+ var projectedNewVelocity : float = Vector3.Dot(newHVelocity, oldHVelocity) / oldHVelocity.sqrMagnitude;
+ movement.velocity = oldHVelocity * Mathf.Clamp01(projectedNewVelocity) + movement.velocity.y * Vector3.up;
+ }
+
+ if (movement.velocity.y < velocity.y - 0.001) {
+ if (movement.velocity.y < 0) {
+ // Something is forcing the CharacterController down faster than it should.
+ // Ignore this
+ movement.velocity.y = velocity.y;
+ }
+ else {
+ // The upwards movement of the CharacterController has been blocked.
+ // This is treated like a ceiling collision - stop further jumping here.
+ jumping.holdingJumpButton = false;
+ }
+ }
+
+ // We were grounded but just loosed grounding
+ if (grounded && !IsGroundedTest()) {
+ grounded = false;
+
+ // Apply inertia from platform
+ if (movingPlatform.enabled &&
+ (movingPlatform.movementTransfer == MovementTransferOnJump.InitTransfer ||
+ movingPlatform.movementTransfer == MovementTransferOnJump.PermaTransfer)
+ ) {
+ movement.frameVelocity = movingPlatform.platformVelocity;
+ movement.velocity += movingPlatform.platformVelocity;
+ }
+
+ SendMessage("OnFall", SendMessageOptions.DontRequireReceiver);
+ // We pushed the character down to ensure it would stay on the ground if there was any.
+ // But there wasn't so now we cancel the downwards offset to make the fall smoother.
+ tr.position += pushDownOffset * Vector3.up;
+ }
+ // We were not grounded but just landed on something
+ else if (!grounded && IsGroundedTest()) {
+ grounded = true;
+ jumping.jumping = false;
+ SubtractNewPlatformVelocity();
+
+ SendMessage("OnLand", SendMessageOptions.DontRequireReceiver);
+ }
+
+ // Moving platforms support
+ if (MoveWithPlatform()) {
+ // Use the center of the lower half sphere of the capsule as reference point.
+ // This works best when the character is standing on moving tilting platforms.
+ movingPlatform.activeGlobalPoint = tr.position + Vector3.up * (controller.center.y - controller.height*0.5 + controller.radius);
+ movingPlatform.activeLocalPoint = movingPlatform.activePlatform.InverseTransformPoint(movingPlatform.activeGlobalPoint);
+
+ // Support moving platform rotation as well:
+ movingPlatform.activeGlobalRotation = tr.rotation;
+ movingPlatform.activeLocalRotation = Quaternion.Inverse(movingPlatform.activePlatform.rotation) * movingPlatform.activeGlobalRotation;
+ }
+}
+
+function FixedUpdate () {
+ if (movingPlatform.enabled) {
+ if (movingPlatform.activePlatform != null) {
+ if (!movingPlatform.newPlatform) {
+ var lastVelocity : Vector3 = movingPlatform.platformVelocity;
+
+ movingPlatform.platformVelocity = (
+ movingPlatform.activePlatform.localToWorldMatrix.MultiplyPoint3x4(movingPlatform.activeLocalPoint)
+ - movingPlatform.lastMatrix.MultiplyPoint3x4(movingPlatform.activeLocalPoint)
+ ) / Time.deltaTime;
+ }
+ movingPlatform.lastMatrix = movingPlatform.activePlatform.localToWorldMatrix;
+ movingPlatform.newPlatform = false;
+ }
+ else {
+ movingPlatform.platformVelocity = Vector3.zero;
+ }
+ }
+
+ if (useFixedUpdate)
+ UpdateFunction();
+}
+
+function Update () {
+ if (!useFixedUpdate)
+ UpdateFunction();
+}
+
+private function ApplyInputVelocityChange (velocity : Vector3) {
+ if (!canControl)
+ inputMoveDirection = Vector3.zero;
+
+ // Find desired velocity
+ var desiredVelocity : Vector3;
+ if (grounded && TooSteep()) {
+ // The direction we're sliding in
+ desiredVelocity = Vector3(groundNormal.x, 0, groundNormal.z).normalized;
+ // Find the input movement direction projected onto the sliding direction
+ var projectedMoveDir = Vector3.Project(inputMoveDirection, desiredVelocity);
+ // Add the sliding direction, the spped control, and the sideways control vectors
+ desiredVelocity = desiredVelocity + projectedMoveDir * sliding.speedControl + (inputMoveDirection - projectedMoveDir) * sliding.sidewaysControl;
+ // Multiply with the sliding speed
+ desiredVelocity *= sliding.slidingSpeed;
+ }
+ else
+ desiredVelocity = GetDesiredHorizontalVelocity();
+
+ if (movingPlatform.enabled && movingPlatform.movementTransfer == MovementTransferOnJump.PermaTransfer) {
+ desiredVelocity += movement.frameVelocity;
+ desiredVelocity.y = 0;
+ }
+
+ if (grounded)
+ desiredVelocity = AdjustGroundVelocityToNormal(desiredVelocity, groundNormal);
+ else
+ velocity.y = 0;
+
+ // Enforce max velocity change
+ var maxVelocityChange : float = GetMaxAcceleration(grounded) * Time.deltaTime;
+ var velocityChangeVector : Vector3 = (desiredVelocity - velocity);
+ if (velocityChangeVector.sqrMagnitude > maxVelocityChange * maxVelocityChange) {
+ velocityChangeVector = velocityChangeVector.normalized * maxVelocityChange;
+ }
+ // If we're in the air and don't have control, don't apply any velocity change at all.
+ // If we're on the ground and don't have control we do apply it - it will correspond to friction.
+ if (grounded || canControl)
+ velocity += velocityChangeVector;
+
+ if (grounded) {
+ // When going uphill, the CharacterController will automatically move up by the needed amount.
+ // Not moving it upwards manually prevent risk of lifting off from the ground.
+ // When going downhill, DO move down manually, as gravity is not enough on steep hills.
+ velocity.y = Mathf.Min(velocity.y, 0);
+ }
+
+ return velocity;
+}
+
+private function ApplyGravityAndJumping (velocity : Vector3) {
+
+ if (!inputJump || !canControl) {
+ jumping.holdingJumpButton = false;
+ jumping.lastButtonDownTime = -100;
+ }
+
+ if (inputJump && jumping.lastButtonDownTime < 0 && canControl)
+ jumping.lastButtonDownTime = Time.time;
+
+ if (grounded)
+ velocity.y = Mathf.Min(0, velocity.y) - movement.gravity * Time.deltaTime;
+ else {
+ velocity.y = movement.velocity.y - movement.gravity * Time.deltaTime;
+
+ // When jumping up we don't apply gravity for some time when the user is holding the jump button.
+ // This gives more control over jump height by pressing the button longer.
+ if (jumping.jumping && jumping.holdingJumpButton) {
+ // Calculate the duration that the extra jump force should have effect.
+ // If we're still less than that duration after the jumping time, apply the force.
+ if (Time.time < jumping.lastStartTime + jumping.extraHeight / CalculateJumpVerticalSpeed(jumping.baseHeight)) {
+ // Negate the gravity we just applied, except we push in jumpDir rather than jump upwards.
+ velocity += jumping.jumpDir * movement.gravity * Time.deltaTime;
+ }
+ }
+
+ // Make sure we don't fall any faster than maxFallSpeed. This gives our character a terminal velocity.
+ velocity.y = Mathf.Max (velocity.y, -movement.maxFallSpeed);
+ }
+
+ if (grounded) {
+ // Jump only if the jump button was pressed down in the last 0.2 seconds.
+ // We use this check instead of checking if it's pressed down right now
+ // because players will often try to jump in the exact moment when hitting the ground after a jump
+ // and if they hit the button a fraction of a second too soon and no new jump happens as a consequence,
+ // it's confusing and it feels like the game is buggy.
+ if (jumping.enabled && canControl && (Time.time - jumping.lastButtonDownTime < 0.2)) {
+ grounded = false;
+ jumping.jumping = true;
+ jumping.lastStartTime = Time.time;
+ jumping.lastButtonDownTime = -100;
+ jumping.holdingJumpButton = true;
+
+ // Calculate the jumping direction
+ if (TooSteep())
+ jumping.jumpDir = Vector3.Slerp(Vector3.up, groundNormal, jumping.steepPerpAmount);
+ else
+ jumping.jumpDir = Vector3.Slerp(Vector3.up, groundNormal, jumping.perpAmount);
+
+ // Apply the jumping force to the velocity. Cancel any vertical velocity first.
+ velocity.y = 0;
+ velocity += jumping.jumpDir * CalculateJumpVerticalSpeed (jumping.baseHeight);
+
+ // Apply inertia from platform
+ if (movingPlatform.enabled &&
+ (movingPlatform.movementTransfer == MovementTransferOnJump.InitTransfer ||
+ movingPlatform.movementTransfer == MovementTransferOnJump.PermaTransfer)
+ ) {
+ movement.frameVelocity = movingPlatform.platformVelocity;
+ velocity += movingPlatform.platformVelocity;
+ }
+
+ SendMessage("OnJump", SendMessageOptions.DontRequireReceiver);
+ }
+ else {
+ jumping.holdingJumpButton = false;
+ }
+ }
+
+ return velocity;
+}
+
+function OnControllerColliderHit (hit : ControllerColliderHit) {
+ if (hit.normal.y > 0 && hit.normal.y > groundNormal.y && hit.moveDirection.y < 0) {
+ if ((hit.point - movement.lastHitPoint).sqrMagnitude > 0.001 || lastGroundNormal == Vector3.zero)
+ groundNormal = hit.normal;
+ else
+ groundNormal = lastGroundNormal;
+
+ movingPlatform.hitPlatform = hit.collider.transform;
+ movement.hitPoint = hit.point;
+ movement.frameVelocity = Vector3.zero;
+ }
+}
+
+private function SubtractNewPlatformVelocity () {
+ // When landing, subtract the velocity of the new ground from the character's velocity
+ // since movement in ground is relative to the movement of the ground.
+ if (movingPlatform.enabled &&
+ (movingPlatform.movementTransfer == MovementTransferOnJump.InitTransfer ||
+ movingPlatform.movementTransfer == MovementTransferOnJump.PermaTransfer)
+ ) {
+ // If we landed on a new platform, we have to wait for two FixedUpdates
+ // before we know the velocity of the platform under the character
+ if (movingPlatform.newPlatform) {
+ var platform : Transform = movingPlatform.activePlatform;
+ yield WaitForFixedUpdate();
+ yield WaitForFixedUpdate();
+ if (grounded && platform == movingPlatform.activePlatform)
+ yield 1;
+ }
+ movement.velocity -= movingPlatform.platformVelocity;
+ }
+}
+
+private function MoveWithPlatform () : boolean {
+ return (
+ movingPlatform.enabled
+ && (grounded || movingPlatform.movementTransfer == MovementTransferOnJump.PermaLocked)
+ && movingPlatform.activePlatform != null
+ );
+}
+
+private function GetDesiredHorizontalVelocity () {
+ // Find desired velocity
+ var desiredLocalDirection : Vector3 = tr.InverseTransformDirection(inputMoveDirection);
+ var maxSpeed : float = MaxSpeedInDirection(desiredLocalDirection);
+ if (grounded) {
+ // Modify max speed on slopes based on slope speed multiplier curve
+ var movementSlopeAngle = Mathf.Asin(movement.velocity.normalized.y) * Mathf.Rad2Deg;
+ maxSpeed *= movement.slopeSpeedMultiplier.Evaluate(movementSlopeAngle);
+ }
+ return tr.TransformDirection(desiredLocalDirection * maxSpeed);
+}
+
+private function AdjustGroundVelocityToNormal (hVelocity : Vector3, groundNormal : Vector3) : Vector3 {
+ var sideways : Vector3 = Vector3.Cross(Vector3.up, hVelocity);
+ return Vector3.Cross(sideways, groundNormal).normalized * hVelocity.magnitude;
+}
+
+private function IsGroundedTest () {
+ return (groundNormal.y > 0.01);
+}
+
+function GetMaxAcceleration (grounded : boolean) : float {
+ // Maximum acceleration on ground and in air
+ if (grounded)
+ return movement.maxGroundAcceleration;
+ else
+ return movement.maxAirAcceleration;
+}
+
+function CalculateJumpVerticalSpeed (targetJumpHeight : float) {
+ // From the jump height and gravity we deduce the upwards speed
+ // for the character to reach at the apex.
+ return Mathf.Sqrt (2 * targetJumpHeight * movement.gravity);
+}
+
+function IsJumping () {
+ return jumping.jumping;
+}
+
+function IsSliding () {
+ return (grounded && sliding.enabled && TooSteep());
+}
+
+function IsTouchingCeiling () {
+ return (movement.collisionFlags & CollisionFlags.CollidedAbove) != 0;
+}
+
+function IsGrounded () {
+ return grounded;
+}
+
+function TooSteep () {
+ return (groundNormal.y <= Mathf.Cos(controller.slopeLimit * Mathf.Deg2Rad));
+}
+
+function GetDirection () {
+ return inputMoveDirection;
+}
+
+function SetControllable (controllable : boolean) {
+ canControl = controllable;
+}
+
+// Project a direction onto elliptical quater segments based on forward, sideways, and backwards speed.
+// The function returns the length of the resulting vector.
+function MaxSpeedInDirection (desiredMovementDirection : Vector3) : float {
+ if (desiredMovementDirection == Vector3.zero)
+ return 0;
+ else {
+ var zAxisEllipseMultiplier : float = (desiredMovementDirection.z > 0 ? movement.maxForwardSpeed : movement.maxBackwardsSpeed) / movement.maxSidewaysSpeed;
+ var temp : Vector3 = new Vector3(desiredMovementDirection.x, 0, desiredMovementDirection.z / zAxisEllipseMultiplier).normalized;
+ var length : float = new Vector3(temp.x, 0, temp.z * zAxisEllipseMultiplier).magnitude * movement.maxSidewaysSpeed;
+ return length;
+ }
+}
+
+function SetVelocity (velocity : Vector3) {
+ grounded = false;
+ movement.velocity = velocity;
+ movement.frameVelocity = Vector3.zero;
+ SendMessage("OnExternalVelocity");
+}
+
+// Require a character controller to be attached to the same game object
+@script RequireComponent (CharacterController)
+@script AddComponentMenu ("Character/Character Motor")
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js.meta
new file mode 100644
index 000000000..3edc737eb
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/CharacterMotor.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0ab79d7f243824f5d9826bd83522c8df
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js
new file mode 100644
index 000000000..3b00bffb5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js
@@ -0,0 +1,37 @@
+private var motor : CharacterMotor;
+
+// Use this for initialization
+function Awake () {
+ motor = GetComponent(CharacterMotor);
+}
+
+// Update is called once per frame
+function Update () {
+ // Get the input vector from kayboard or analog stick
+ var directionVector = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
+
+ if (directionVector != Vector3.zero) {
+ // Get the length of the directon vector and then normalize it
+ // Dividing by the length is cheaper than normalizing when we already have the length anyway
+ var directionLength = directionVector.magnitude;
+ directionVector = directionVector / directionLength;
+
+ // Make sure the length is no bigger than 1
+ directionLength = Mathf.Min(1, directionLength);
+
+ // Make the input vector more sensitive towards the extremes and less sensitive in the middle
+ // This makes it easier to control slow speeds when using analog sticks
+ directionLength = directionLength * directionLength;
+
+ // Multiply the normalized direction vector by the modified length
+ directionVector = directionVector * directionLength;
+ }
+
+ // Apply the direction to the CharacterMotor
+ motor.inputMoveDirection = transform.rotation * directionVector;
+ motor.inputJump = Input.GetButton("Jump");
+}
+
+// Require a character controller to be attached to the same game object
+@script RequireComponent (CharacterMotor)
+@script AddComponentMenu ("Character/FPS Input Controller")
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js.meta
new file mode 100644
index 000000000..64cb130ed
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/FPSInputController.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 60bca8f58a0b8478e946e6e86658cb29
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs
new file mode 100644
index 000000000..637444973
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs
@@ -0,0 +1,63 @@
+using UnityEngine;
+using System.Collections;
+
+/// MouseLook rotates the transform based on the mouse delta.
+/// Minimum and Maximum values can be used to constrain the possible rotation
+
+/// To make an FPS style character:
+/// - Create a capsule.
+/// - Add the MouseLook script to the capsule.
+/// -> Set the mouse look to use LookX. (You want to only turn character but not tilt it)
+/// - Add FPSInputController script to the capsule
+/// -> A CharacterMotor and a CharacterController component will be automatically added.
+
+/// - Create a camera. Make the camera a child of the capsule. Reset it's transform.
+/// - Add a MouseLook script to the camera.
+/// -> Set the mouse look to use LookY. (You want the camera to tilt up and down like a head. The character already turns.)
+[AddComponentMenu("Camera-Control/Mouse Look")]
+public class MouseLook : MonoBehaviour {
+
+ public enum RotationAxes { MouseXAndY = 0, MouseX = 1, MouseY = 2 }
+ public RotationAxes axes = RotationAxes.MouseXAndY;
+ public float sensitivityX = 15F;
+ public float sensitivityY = 15F;
+
+ public float minimumX = -360F;
+ public float maximumX = 360F;
+
+ public float minimumY = -60F;
+ public float maximumY = 60F;
+
+ float rotationY = 0F;
+
+ void Update ()
+ {
+ if (axes == RotationAxes.MouseXAndY)
+ {
+ float rotationX = transform.localEulerAngles.y + Input.GetAxis("Mouse X") * sensitivityX;
+
+ rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
+ rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
+
+ transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
+ }
+ else if (axes == RotationAxes.MouseX)
+ {
+ transform.Rotate(0, Input.GetAxis("Mouse X") * sensitivityX, 0);
+ }
+ else
+ {
+ rotationY += Input.GetAxis("Mouse Y") * sensitivityY;
+ rotationY = Mathf.Clamp (rotationY, minimumY, maximumY);
+
+ transform.localEulerAngles = new Vector3(-rotationY, transform.localEulerAngles.y, 0);
+ }
+ }
+
+ void Start ()
+ {
+ // Make the rigid body not change rotation
+ if (rigidbody)
+ rigidbody.freezeRotation = true;
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs.meta
new file mode 100644
index 000000000..9ab645ea6
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/MouseLook.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 68ec2fe99d1108b9d0006a298d76c639
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js
new file mode 100644
index 000000000..08691f073
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js
@@ -0,0 +1,68 @@
+// This makes the character turn to face the current movement speed per default.
+var autoRotate : boolean = true;
+var maxRotationSpeed : float = 360;
+
+private var motor : CharacterMotor;
+
+// Use this for initialization
+function Awake () {
+ motor = GetComponent(CharacterMotor);
+}
+
+// Update is called once per frame
+function Update () {
+ // Get the input vector from kayboard or analog stick
+ var directionVector = new Vector3(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"), 0);
+
+ if (directionVector != Vector3.zero) {
+ // Get the length of the directon vector and then normalize it
+ // Dividing by the length is cheaper than normalizing when we already have the length anyway
+ var directionLength = directionVector.magnitude;
+ directionVector = directionVector / directionLength;
+
+ // Make sure the length is no bigger than 1
+ directionLength = Mathf.Min(1, directionLength);
+
+ // Make the input vector more sensitive towards the extremes and less sensitive in the middle
+ // This makes it easier to control slow speeds when using analog sticks
+ directionLength = directionLength * directionLength;
+
+ // Multiply the normalized direction vector by the modified length
+ directionVector = directionVector * directionLength;
+ }
+
+ // Rotate the input vector into camera space so up is camera's up and right is camera's right
+ directionVector = Camera.main.transform.rotation * directionVector;
+
+ // Rotate input vector to be perpendicular to character's up vector
+ var camToCharacterSpace = Quaternion.FromToRotation(-Camera.main.transform.forward, transform.up);
+ directionVector = (camToCharacterSpace * directionVector);
+
+ // Apply the direction to the CharacterMotor
+ motor.inputMoveDirection = directionVector;
+ motor.inputJump = Input.GetButton("Jump");
+
+ // Set rotation to the move direction
+ if (autoRotate && directionVector.sqrMagnitude > 0.01) {
+ var newForward : Vector3 = ConstantSlerp(
+ transform.forward,
+ directionVector,
+ maxRotationSpeed * Time.deltaTime
+ );
+ newForward = ProjectOntoPlane(newForward, transform.up);
+ transform.rotation = Quaternion.LookRotation(newForward, transform.up);
+ }
+}
+
+function ProjectOntoPlane (v : Vector3, normal : Vector3) {
+ return v - Vector3.Project(v, normal);
+}
+
+function ConstantSlerp (from : Vector3, to : Vector3, angle : float) {
+ var value : float = Mathf.Min(1, angle / Vector3.Angle(from, to));
+ return Vector3.Slerp(from, to, value);
+}
+
+// Require a character controller to be attached to the same game object
+@script RequireComponent (CharacterMotor)
+@script AddComponentMenu ("Character/Platform Input Controller")
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js.meta
new file mode 100644
index 000000000..b128e0f0f
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: da93ddd6928094e24bb1f3f665f143d3
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js
new file mode 100644
index 000000000..425e7c1d7
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js
@@ -0,0 +1,230 @@
+
+
+var cameraTransform : Transform;
+private var _target : Transform;
+
+// The distance in the x-z plane to the target
+
+var distance = 7.0;
+
+// the height we want the camera to be above the target
+var height = 3.0;
+
+var angularSmoothLag = 0.3;
+var angularMaxSpeed = 15.0;
+
+var heightSmoothLag = 0.3;
+
+var snapSmoothLag = 0.2;
+var snapMaxSpeed = 720.0;
+
+var clampHeadPositionScreenSpace = 0.75;
+
+var lockCameraTimeout = 0.2;
+
+private var headOffset = Vector3.zero;
+private var centerOffset = Vector3.zero;
+
+private var heightVelocity = 0.0;
+private var angleVelocity = 0.0;
+private var snap = false;
+private var controller : ThirdPersonController;
+private var targetHeight = 100000.0;
+
+function Awake ()
+{
+ if(!cameraTransform && Camera.main)
+ cameraTransform = Camera.main.transform;
+ if(!cameraTransform) {
+ Debug.Log("Please assign a camera to the ThirdPersonCamera script.");
+ enabled = false;
+ }
+
+
+ _target = transform;
+ if (_target)
+ {
+ controller = _target.GetComponent(ThirdPersonController);
+ }
+
+ if (controller)
+ {
+ var characterController : CharacterController = _target.collider;
+ centerOffset = characterController.bounds.center - _target.position;
+ headOffset = centerOffset;
+ headOffset.y = characterController.bounds.max.y - _target.position.y;
+ }
+ else
+ Debug.Log("Please assign a target to the camera that has a ThirdPersonController script attached.");
+
+
+ Cut(_target, centerOffset);
+}
+
+function DebugDrawStuff ()
+{
+ Debug.DrawLine(_target.position, _target.position + headOffset);
+
+}
+
+function AngleDistance (a : float, b : float)
+{
+ a = Mathf.Repeat(a, 360);
+ b = Mathf.Repeat(b, 360);
+
+ return Mathf.Abs(b - a);
+}
+
+function Apply (dummyTarget : Transform, dummyCenter : Vector3)
+{
+ // Early out if we don't have a target
+ if (!controller)
+ return;
+
+ var targetCenter = _target.position + centerOffset;
+ var targetHead = _target.position + headOffset;
+
+// DebugDrawStuff();
+
+ // Calculate the current & target rotation angles
+ var originalTargetAngle = _target.eulerAngles.y;
+ var currentAngle = cameraTransform.eulerAngles.y;
+
+ // Adjust real target angle when camera is locked
+ var targetAngle = originalTargetAngle;
+
+ // When pressing Fire2 (alt) the camera will snap to the target direction real quick.
+ // It will stop snapping when it reaches the target
+ if (Input.GetButton("Fire2"))
+ snap = true;
+
+ if (snap)
+ {
+ // We are close to the target, so we can stop snapping now!
+ if (AngleDistance (currentAngle, originalTargetAngle) < 3.0)
+ snap = false;
+
+ currentAngle = Mathf.SmoothDampAngle(currentAngle, targetAngle, angleVelocity, snapSmoothLag, snapMaxSpeed);
+ }
+ // Normal camera motion
+ else
+ {
+ if (controller.GetLockCameraTimer () < lockCameraTimeout)
+ {
+ targetAngle = currentAngle;
+ }
+
+ // Lock the camera when moving backwards!
+ // * It is really confusing to do 180 degree spins when turning around.
+ if (AngleDistance (currentAngle, targetAngle) > 160 && controller.IsMovingBackwards ())
+ targetAngle += 180;
+
+ currentAngle = Mathf.SmoothDampAngle(currentAngle, targetAngle, angleVelocity, angularSmoothLag, angularMaxSpeed);
+ }
+
+
+ // When jumping don't move camera upwards but only down!
+ if (controller.IsJumping ())
+ {
+ // We'd be moving the camera upwards, do that only if it's really high
+ var newTargetHeight = targetCenter.y + height;
+ if (newTargetHeight < targetHeight || newTargetHeight - targetHeight > 5)
+ targetHeight = targetCenter.y + height;
+ }
+ // When walking always update the target height
+ else
+ {
+ targetHeight = targetCenter.y + height;
+ }
+
+ // Damp the height
+ var currentHeight = cameraTransform.position.y;
+ currentHeight = Mathf.SmoothDamp (currentHeight, targetHeight, heightVelocity, heightSmoothLag);
+
+ // Convert the angle into a rotation, by which we then reposition the camera
+ var currentRotation = Quaternion.Euler (0, currentAngle, 0);
+
+ // Set the position of the camera on the x-z plane to:
+ // distance meters behind the target
+ cameraTransform.position = targetCenter;
+ cameraTransform.position += currentRotation * Vector3.back * distance;
+
+ // Set the height of the camera
+ cameraTransform.position.y = currentHeight;
+
+ // Always look at the target
+ SetUpRotation(targetCenter, targetHead);
+}
+
+function LateUpdate () {
+ Apply (transform, Vector3.zero);
+}
+
+function Cut (dummyTarget : Transform, dummyCenter : Vector3)
+{
+ var oldHeightSmooth = heightSmoothLag;
+ var oldSnapMaxSpeed = snapMaxSpeed;
+ var oldSnapSmooth = snapSmoothLag;
+
+ snapMaxSpeed = 10000;
+ snapSmoothLag = 0.001;
+ heightSmoothLag = 0.001;
+
+ snap = true;
+ Apply (transform, Vector3.zero);
+
+ heightSmoothLag = oldHeightSmooth;
+ snapMaxSpeed = oldSnapMaxSpeed;
+ snapSmoothLag = oldSnapSmooth;
+}
+
+function SetUpRotation (centerPos : Vector3, headPos : Vector3)
+{
+ // Now it's getting hairy. The devil is in the details here, the big issue is jumping of course.
+ // * When jumping up and down we don't want to center the guy in screen space.
+ // This is important to give a feel for how high you jump and avoiding large camera movements.
+ //
+ // * At the same time we dont want him to ever go out of screen and we want all rotations to be totally smooth.
+ //
+ // So here is what we will do:
+ //
+ // 1. We first find the rotation around the y axis. Thus he is always centered on the y-axis
+ // 2. When grounded we make him be centered
+ // 3. When jumping we keep the camera rotation but rotate the camera to get him back into view if his head is above some threshold
+ // 4. When landing we smoothly interpolate towards centering him on screen
+ var cameraPos = cameraTransform.position;
+ var offsetToCenter = centerPos - cameraPos;
+
+ // Generate base rotation only around y-axis
+ var yRotation = Quaternion.LookRotation(Vector3(offsetToCenter.x, 0, offsetToCenter.z));
+
+ var relativeOffset = Vector3.forward * distance + Vector3.down * height;
+ cameraTransform.rotation = yRotation * Quaternion.LookRotation(relativeOffset);
+
+ // Calculate the projected center position and top position in world space
+ var centerRay = cameraTransform.camera.ViewportPointToRay(Vector3(.5, 0.5, 1));
+ var topRay = cameraTransform.camera.ViewportPointToRay(Vector3(.5, clampHeadPositionScreenSpace, 1));
+
+ var centerRayPos = centerRay.GetPoint(distance);
+ var topRayPos = topRay.GetPoint(distance);
+
+ var centerToTopAngle = Vector3.Angle(centerRay.direction, topRay.direction);
+
+ var heightToAngle = centerToTopAngle / (centerRayPos.y - topRayPos.y);
+
+ var extraLookAngle = heightToAngle * (centerRayPos.y - centerPos.y);
+ if (extraLookAngle < centerToTopAngle)
+ {
+ extraLookAngle = 0;
+ }
+ else
+ {
+ extraLookAngle = extraLookAngle - centerToTopAngle;
+ cameraTransform.rotation *= Quaternion.Euler(-extraLookAngle, 0, 0);
+ }
+}
+
+function GetCenterOffset ()
+{
+ return centerOffset;
+}
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js.meta
new file mode 100644
index 000000000..e458523b1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonCamera.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b167d00b3108411a8a963cba5ddde1b
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js
new file mode 100644
index 000000000..219b84d91
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js
@@ -0,0 +1,440 @@
+
+// Require a character controller to be attached to the same game object
+@script RequireComponent(CharacterController)
+
+public var idleAnimation : AnimationClip;
+public var walkAnimation : AnimationClip;
+public var runAnimation : AnimationClip;
+public var jumpPoseAnimation : AnimationClip;
+
+public var walkMaxAnimationSpeed : float = 0.75;
+public var trotMaxAnimationSpeed : float = 1.0;
+public var runMaxAnimationSpeed : float = 1.0;
+public var jumpAnimationSpeed : float = 1.15;
+public var landAnimationSpeed : float = 1.0;
+
+private var _animation : Animation;
+
+enum CharacterState {
+ Idle = 0,
+ Walking = 1,
+ Trotting = 2,
+ Running = 3,
+ Jumping = 4,
+}
+
+private var _characterState : CharacterState;
+
+// The speed when walking
+var walkSpeed = 2.0;
+// after trotAfterSeconds of walking we trot with trotSpeed
+var trotSpeed = 4.0;
+// when pressing "Fire3" button (cmd) we start running
+var runSpeed = 6.0;
+
+var inAirControlAcceleration = 3.0;
+
+// How high do we jump when pressing jump and letting go immediately
+var jumpHeight = 0.5;
+
+// The gravity for the character
+var gravity = 20.0;
+// The gravity in controlled descent mode
+var speedSmoothing = 10.0;
+var rotateSpeed = 500.0;
+var trotAfterSeconds = 3.0;
+
+var canJump = true;
+
+private var jumpRepeatTime = 0.05;
+private var jumpTimeout = 0.15;
+private var groundedTimeout = 0.25;
+
+// The camera doesnt start following the target immediately but waits for a split second to avoid too much waving around.
+private var lockCameraTimer = 0.0;
+
+// The current move direction in x-z
+private var moveDirection = Vector3.zero;
+// The current vertical speed
+private var verticalSpeed = 0.0;
+// The current x-z move speed
+private var moveSpeed = 0.0;
+
+// The last collision flags returned from controller.Move
+private var collisionFlags : CollisionFlags;
+
+// Are we jumping? (Initiated with jump button and not grounded yet)
+private var jumping = false;
+private var jumpingReachedApex = false;
+
+// Are we moving backwards (This locks the camera to not do a 180 degree spin)
+private var movingBack = false;
+// Is the user pressing any keys?
+private var isMoving = false;
+// When did the user start walking (Used for going into trot after a while)
+private var walkTimeStart = 0.0;
+// Last time the jump button was clicked down
+private var lastJumpButtonTime = -10.0;
+// Last time we performed a jump
+private var lastJumpTime = -1.0;
+
+
+// the height we jumped from (Used to determine for how long to apply extra jump power after jumping.)
+private var lastJumpStartHeight = 0.0;
+
+
+private var inAirVelocity = Vector3.zero;
+
+private var lastGroundedTime = 0.0;
+
+
+private var isControllable = true;
+
+function Awake ()
+{
+ moveDirection = transform.TransformDirection(Vector3.forward);
+
+ _animation = GetComponent(Animation);
+ if(!_animation)
+ Debug.Log("The character you would like to control doesn't have animations. Moving her might look weird.");
+
+ /*
+public var idleAnimation : AnimationClip;
+public var walkAnimation : AnimationClip;
+public var runAnimation : AnimationClip;
+public var jumpPoseAnimation : AnimationClip;
+ */
+ if(!idleAnimation) {
+ _animation = null;
+ Debug.Log("No idle animation found. Turning off animations.");
+ }
+ if(!walkAnimation) {
+ _animation = null;
+ Debug.Log("No walk animation found. Turning off animations.");
+ }
+ if(!runAnimation) {
+ _animation = null;
+ Debug.Log("No run animation found. Turning off animations.");
+ }
+ if(!jumpPoseAnimation && canJump) {
+ _animation = null;
+ Debug.Log("No jump animation found and the character has canJump enabled. Turning off animations.");
+ }
+
+}
+
+
+function UpdateSmoothedMovementDirection ()
+{
+ var cameraTransform = Camera.main.transform;
+ var grounded = IsGrounded();
+
+ // Forward vector relative to the camera along the x-z plane
+ var forward = cameraTransform.TransformDirection(Vector3.forward);
+ forward.y = 0;
+ forward = forward.normalized;
+
+ // Right vector relative to the camera
+ // Always orthogonal to the forward vector
+ var right = Vector3(forward.z, 0, -forward.x);
+
+ var v = Input.GetAxisRaw("Vertical");
+ var h = Input.GetAxisRaw("Horizontal");
+
+ // Are we moving backwards or looking backwards
+ if (v < -0.2)
+ movingBack = true;
+ else
+ movingBack = false;
+
+ var wasMoving = isMoving;
+ isMoving = Mathf.Abs (h) > 0.1 || Mathf.Abs (v) > 0.1;
+
+ // Target direction relative to the camera
+ var targetDirection = h * right + v * forward;
+
+ // Grounded controls
+ if (grounded)
+ {
+ // Lock camera for short period when transitioning moving & standing still
+ lockCameraTimer += Time.deltaTime;
+ if (isMoving != wasMoving)
+ lockCameraTimer = 0.0;
+
+ // We store speed and direction seperately,
+ // so that when the character stands still we still have a valid forward direction
+ // moveDirection is always normalized, and we only update it if there is user input.
+ if (targetDirection != Vector3.zero)
+ {
+ // If we are really slow, just snap to the target direction
+ if (moveSpeed < walkSpeed * 0.9 && grounded)
+ {
+ moveDirection = targetDirection.normalized;
+ }
+ // Otherwise smoothly turn towards it
+ else
+ {
+ moveDirection = Vector3.RotateTowards(moveDirection, targetDirection, rotateSpeed * Mathf.Deg2Rad * Time.deltaTime, 1000);
+
+ moveDirection = moveDirection.normalized;
+ }
+ }
+
+ // Smooth the speed based on the current target direction
+ var curSmooth = speedSmoothing * Time.deltaTime;
+
+ // Choose target speed
+ //* We want to support analog input but make sure you cant walk faster diagonally than just forward or sideways
+ var targetSpeed = Mathf.Min(targetDirection.magnitude, 1.0);
+
+ _characterState = CharacterState.Idle;
+
+ // Pick speed modifier
+ if (Input.GetKey (KeyCode.LeftShift) || Input.GetKey (KeyCode.RightShift))
+ {
+ targetSpeed *= runSpeed;
+ _characterState = CharacterState.Running;
+ }
+ else if (Time.time - trotAfterSeconds > walkTimeStart)
+ {
+ targetSpeed *= trotSpeed;
+ _characterState = CharacterState.Trotting;
+ }
+ else
+ {
+ targetSpeed *= walkSpeed;
+ _characterState = CharacterState.Walking;
+ }
+
+ moveSpeed = Mathf.Lerp(moveSpeed, targetSpeed, curSmooth);
+
+ // Reset walk time start when we slow down
+ if (moveSpeed < walkSpeed * 0.3)
+ walkTimeStart = Time.time;
+ }
+ // In air controls
+ else
+ {
+ // Lock camera while in air
+ if (jumping)
+ lockCameraTimer = 0.0;
+
+ if (isMoving)
+ inAirVelocity += targetDirection.normalized * Time.deltaTime * inAirControlAcceleration;
+ }
+
+
+
+}
+
+
+function ApplyJumping ()
+{
+ // Prevent jumping too fast after each other
+ if (lastJumpTime + jumpRepeatTime > Time.time)
+ return;
+
+ if (IsGrounded()) {
+ // Jump
+ // - Only when pressing the button down
+ // - With a timeout so you can press the button slightly before landing
+ if (canJump && Time.time < lastJumpButtonTime + jumpTimeout) {
+ verticalSpeed = CalculateJumpVerticalSpeed (jumpHeight);
+ SendMessage("DidJump", SendMessageOptions.DontRequireReceiver);
+ }
+ }
+}
+
+
+function ApplyGravity ()
+{
+ if (isControllable) // don't move player at all if not controllable.
+ {
+ // Apply gravity
+ var jumpButton = Input.GetButton("Jump");
+
+
+ // When we reach the apex of the jump we send out a message
+ if (jumping && !jumpingReachedApex && verticalSpeed <= 0.0)
+ {
+ jumpingReachedApex = true;
+ SendMessage("DidJumpReachApex", SendMessageOptions.DontRequireReceiver);
+ }
+
+ if (IsGrounded ())
+ verticalSpeed = 0.0;
+ else
+ verticalSpeed -= gravity * Time.deltaTime;
+ }
+}
+
+function CalculateJumpVerticalSpeed (targetJumpHeight : float)
+{
+ // From the jump height and gravity we deduce the upwards speed
+ // for the character to reach at the apex.
+ return Mathf.Sqrt(2 * targetJumpHeight * gravity);
+}
+
+function DidJump ()
+{
+ jumping = true;
+ jumpingReachedApex = false;
+ lastJumpTime = Time.time;
+ lastJumpStartHeight = transform.position.y;
+ lastJumpButtonTime = -10;
+
+ _characterState = CharacterState.Jumping;
+}
+
+function Update() {
+
+ if (!isControllable)
+ {
+ // kill all inputs if not controllable.
+ Input.ResetInputAxes();
+ }
+
+ if (Input.GetButtonDown ("Jump"))
+ {
+ lastJumpButtonTime = Time.time;
+ }
+
+ UpdateSmoothedMovementDirection();
+
+ // Apply gravity
+ // - extra power jump modifies gravity
+ // - controlledDescent mode modifies gravity
+ ApplyGravity ();
+
+ // Apply jumping logic
+ ApplyJumping ();
+
+ // Calculate actual motion
+ var movement = moveDirection * moveSpeed + Vector3 (0, verticalSpeed, 0) + inAirVelocity;
+ movement *= Time.deltaTime;
+
+ // Move the controller
+ var controller : CharacterController = GetComponent(CharacterController);
+ collisionFlags = controller.Move(movement);
+
+ // ANIMATION sector
+ if(_animation) {
+ if(_characterState == CharacterState.Jumping)
+ {
+ if(!jumpingReachedApex) {
+ _animation[jumpPoseAnimation.name].speed = jumpAnimationSpeed;
+ _animation[jumpPoseAnimation.name].wrapMode = WrapMode.ClampForever;
+ _animation.CrossFade(jumpPoseAnimation.name);
+ } else {
+ _animation[jumpPoseAnimation.name].speed = -landAnimationSpeed;
+ _animation[jumpPoseAnimation.name].wrapMode = WrapMode.ClampForever;
+ _animation.CrossFade(jumpPoseAnimation.name);
+ }
+ }
+ else
+ {
+ if(controller.velocity.sqrMagnitude < 0.1) {
+ _animation.CrossFade(idleAnimation.name);
+ }
+ else
+ {
+ if(_characterState == CharacterState.Running) {
+ _animation[runAnimation.name].speed = Mathf.Clamp(controller.velocity.magnitude, 0.0, runMaxAnimationSpeed);
+ _animation.CrossFade(runAnimation.name);
+ }
+ else if(_characterState == CharacterState.Trotting) {
+ _animation[walkAnimation.name].speed = Mathf.Clamp(controller.velocity.magnitude, 0.0, trotMaxAnimationSpeed);
+ _animation.CrossFade(walkAnimation.name);
+ }
+ else if(_characterState == CharacterState.Walking) {
+ _animation[walkAnimation.name].speed = Mathf.Clamp(controller.velocity.magnitude, 0.0, walkMaxAnimationSpeed);
+ _animation.CrossFade(walkAnimation.name);
+ }
+
+ }
+ }
+ }
+ // ANIMATION sector
+
+ // Set rotation to the move direction
+ if (IsGrounded())
+ {
+
+ transform.rotation = Quaternion.LookRotation(moveDirection);
+
+ }
+ else
+ {
+ var xzMove = movement;
+ xzMove.y = 0;
+ if (xzMove.sqrMagnitude > 0.001)
+ {
+ transform.rotation = Quaternion.LookRotation(xzMove);
+ }
+ }
+
+ // We are in jump mode but just became grounded
+ if (IsGrounded())
+ {
+ lastGroundedTime = Time.time;
+ inAirVelocity = Vector3.zero;
+ if (jumping)
+ {
+ jumping = false;
+ SendMessage("DidLand", SendMessageOptions.DontRequireReceiver);
+ }
+ }
+}
+
+function OnControllerColliderHit (hit : ControllerColliderHit )
+{
+// Debug.DrawRay(hit.point, hit.normal);
+ if (hit.moveDirection.y > 0.01)
+ return;
+}
+
+function GetSpeed () {
+ return moveSpeed;
+}
+
+function IsJumping () {
+ return jumping;
+}
+
+function IsGrounded () {
+ return (collisionFlags & CollisionFlags.CollidedBelow) != 0;
+}
+
+function GetDirection () {
+ return moveDirection;
+}
+
+function IsMovingBackwards () {
+ return movingBack;
+}
+
+function GetLockCameraTimer ()
+{
+ return lockCameraTimer;
+}
+
+function IsMoving () : boolean
+{
+ return Mathf.Abs(Input.GetAxisRaw("Vertical")) + Mathf.Abs(Input.GetAxisRaw("Horizontal")) > 0.5;
+}
+
+function HasJumpReachedApex ()
+{
+ return jumpingReachedApex;
+}
+
+function IsGroundedWithTimeout ()
+{
+ return lastGroundedTime + groundedTimeout > Time.time;
+}
+
+function Reset ()
+{
+ gameObject.tag = "Player";
+}
+
diff --git a/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js.meta b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js.meta
new file mode 100644
index 000000000..c09500e03
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1d5ac211a643e447ca78c2d794a16381
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles.meta b/Chromacore/Assets/Standard Assets/Particles.meta
new file mode 100644
index 000000000..51eaf0607
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 9b9106e5cf82342e78e4fcc288becd41
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Dust.meta b/Chromacore/Assets/Standard Assets/Particles/Dust.meta
new file mode 100644
index 000000000..244aab03a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Dust.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: caa1ec025a7c049ec8f67b889fb33a6d
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab b/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab
new file mode 100644
index 000000000..08073ff43
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab.meta
new file mode 100644
index 000000000..3c24f1ac3
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Dust/Dust Storm.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 88324f760c579473199bfbc4f1073097
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Fire.meta b/Chromacore/Assets/Standard Assets/Particles/Fire.meta
new file mode 100644
index 000000000..d080dfb90
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Fire.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: d5396a3251db948279e0c7262385dafe
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab b/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab
new file mode 100644
index 000000000..3aef138b9
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab.meta
new file mode 100644
index 000000000..05b446c6a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Fire/Fire1.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 542f86e4e34b523499e0f073b1355e1a
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab b/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab
new file mode 100644
index 000000000..2fd12d792
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab.meta
new file mode 100644
index 000000000..59ab867f5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Fire/Flame.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2acf9c8e812eff6459715d2b3dce2c96
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles.meta
new file mode 100644
index 000000000..0af9a5ae4
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 510306bf62c654a548c9d0193dbedd8e
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab
new file mode 100644
index 000000000..72025324f
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab.meta
new file mode 100644
index 000000000..4c1aefd4d
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Small explosion.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: bd943c792514675e464dfc7a8c26d3e0
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab
new file mode 100644
index 000000000..f47714137
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab.meta
new file mode 100644
index 000000000..2946d9903
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/Sparks.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c994fde8e6848a3771503f184e0c9cb4
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js
new file mode 100644
index 000000000..ad3bb527b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js
@@ -0,0 +1,15 @@
+var timeOut = 1.0;
+var detachChildren = false;
+
+function Awake ()
+{
+ Invoke ("DestroyNow", timeOut);
+}
+
+function DestroyNow ()
+{
+ if (detachChildren) {
+ transform.DetachChildren ();
+ }
+ DestroyObject (gameObject);
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js.meta
new file mode 100644
index 000000000..1ec9bde1d
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/TimedObjectDestructor.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5a09dad89d11389ed000e82b8d76c639
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab
new file mode 100644
index 000000000..b8566b2f1
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab.meta
new file mode 100644
index 000000000..47656dc2d
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/explosion.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 169b10ce10f4327cb9f40f6b117ed8d7
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab
new file mode 100644
index 000000000..1cbe33025
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab.meta
new file mode 100644
index 000000000..476c6acc3
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/large flames.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7b277829b0b4991f100024a80dbc5c14
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab
new file mode 100644
index 000000000..6160917a7
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab.meta
new file mode 100644
index 000000000..e665336c3
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Legacy Particles/small flames.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 01174e4954348268c150b6f98c48939f
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc.meta b/Chromacore/Assets/Standard Assets/Particles/Misc.meta
new file mode 100644
index 000000000..a6e19f8a6
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Misc.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: df42ef794d3e0441783057cf822a525c
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab b/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab
new file mode 100644
index 000000000..837c322b0
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab.meta
new file mode 100644
index 000000000..b31ad63f9
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Misc/Fireworks.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 9c5bd6070cd5d481abdb8755ff51fd7a
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab b/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab
new file mode 100644
index 000000000..ca704964a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab.meta
new file mode 100644
index 000000000..a31d488aa
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Misc/Light Snow.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 144b203f383094d16b1f336c74c47326
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab b/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab
new file mode 100644
index 000000000..b9bb956b0
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab.meta
new file mode 100644
index 000000000..2559b3c13
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Misc/Soap Bubbles.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: a28540d6bcf674c1bb3dd7af7de640fc
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab b/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab
new file mode 100644
index 000000000..5f0c65888
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab.meta
new file mode 100644
index 000000000..879bc9c1d
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Misc/Sparks.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7a598717ded698c4dbdd57c2260fa1e1
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke.meta b/Chromacore/Assets/Standard Assets/Particles/Smoke.meta
new file mode 100644
index 000000000..caef9dbc0
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Smoke.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 3c5bb2bad5622497490fdbd0f36e9674
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab b/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab
new file mode 100644
index 000000000..838f42abd
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab.meta
new file mode 100644
index 000000000..d6bfade6c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Smoke/Detailed Smoke.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 4b31b1caadab1ee4b8606c9f35713992
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab
new file mode 100644
index 000000000..a1581aab7
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab.meta
new file mode 100644
index 000000000..1481dd227
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke Large.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 92e6d9926a8c43d49a79f0d3d603277a
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab
new file mode 100644
index 000000000..da1cd3083
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab.meta
new file mode 100644
index 000000000..60c5d5e45
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Smoke/Fluffy Smoke.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 44b3febaf5142a5429938ef0a0de2395
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab b/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab
new file mode 100644
index 000000000..37669343e
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab.meta
new file mode 100644
index 000000000..5525f0f20
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Smoke/Smoke Trail.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 29f2844e1d89a4ed09e527cd2039d6ea
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources.meta b/Chromacore/Assets/Standard Assets/Particles/Sources.meta
new file mode 100644
index 000000000..2ee9f10da
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 8c1f929571ef549619212d9405d4f923
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations.meta
new file mode 100644
index 000000000..455fb90e5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 85cde262bee344ae28a0bf86762219ac
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim
new file mode 100644
index 000000000..82f48669e
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim.meta
new file mode 100644
index 000000000..77adb3c3e
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Light explosion.anim.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 9c7f793f82a4f7bda3662a9a2f23142e
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim
new file mode 100644
index 000000000..8a7b49bbe
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim.meta
new file mode 100644
index 000000000..f8f46c1b4
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting ,5 sec.anim.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 327835a878f496675e402fdba3e0a4bc
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim
new file mode 100644
index 000000000..5bf1fb7ad
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim.meta
new file mode 100644
index 000000000..aca8e9606
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 1 sec.anim.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: af4465c7aa1400a6573c907831d716c9
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim
new file mode 100644
index 000000000..ca541adb5
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim.meta
new file mode 100644
index 000000000..9a3557f49
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Animations/Stop Emitting 2 sec.anim.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 3fbc34d51ee4155dc17d8f49133f44ad
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials.meta
new file mode 100644
index 000000000..41ad4dd6a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 46e871058d317418fab60bb84a290869
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat
new file mode 100644
index 000000000..b2cf8e8c1
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat.meta
new file mode 100644
index 000000000..eaf44b0c9
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Dust Material 1.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: bb393e804ad0e204cb1fcfbc9b8b0409
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat
new file mode 100644
index 000000000..aea13e93c
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat.meta
new file mode 100644
index 000000000..f3eb70677
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fairy Dust.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 74bcba72c2286ce429281c86d5928418
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat
new file mode 100644
index 000000000..4190c8327
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat.meta
new file mode 100644
index 000000000..be63172ed
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Add.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: e667992b28845df99060a8f876d1d11b
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat
new file mode 100644
index 000000000..4ba68b727
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat.meta
new file mode 100644
index 000000000..44c4c4569
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Fire Smoke.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: b9a268fc98c474f721ff8c9bf8f5160e
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat
new file mode 100644
index 000000000..36819d510
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat.meta
new file mode 100644
index 000000000..3731e658a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameA.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 4efe5620a91cf9542993ee04a027a7f5
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat
new file mode 100644
index 000000000..00df31643
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat.meta
new file mode 100644
index 000000000..4d0428040
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameB.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 2b21364bb71d4eb4dbce6894c82cd119
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat
new file mode 100644
index 000000000..62225d06d
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat.meta
new file mode 100644
index 000000000..d280148bb
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameC.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 5c54115eb5a2a4c4fb1b11b8e6100bd8
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat
new file mode 100644
index 000000000..506152463
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat.meta
new file mode 100644
index 000000000..e6c0ef6ff
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameD.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 642367443312c224bb40c297365867ac
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat
new file mode 100644
index 000000000..0efa913ae
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat.meta
new file mode 100644
index 000000000..31d69e1c8
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/FlameE.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 073946e94d57ac04fb345d5c28d21992
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat
new file mode 100644
index 000000000..dd17f8c0a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat.meta
new file mode 100644
index 000000000..77660b0c9
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Poof1.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: f60723ea36fc34476899abc83a5309c9
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat
new file mode 100644
index 000000000..86fa872d2
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat.meta
new file mode 100644
index 000000000..efe232205
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke Trail.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 74f4a47fc3b034e2d963491f4e514174
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat
new file mode 100644
index 000000000..02cfafef1
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat.meta
new file mode 100644
index 000000000..054d4e141
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 96558d9af5ccba84da0a06dc9afa072d
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat
new file mode 100644
index 000000000..22fa88be3
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat.meta
new file mode 100644
index 000000000..e07f40686
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke1.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: f89a53f13e64bbbd73bd6eb9f8509a09
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat
new file mode 100644
index 000000000..564412f31
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat.meta
new file mode 100644
index 000000000..3871ea95c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke2.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 62f7c8a57ece2204695f3c7dc963d23c
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat
new file mode 100644
index 000000000..1c89f4536
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat.meta
new file mode 100644
index 000000000..3665e1638
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke3.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: e4e4cff51dff43545953848c2258e62c
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat
new file mode 100644
index 000000000..b71038261
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat.meta
new file mode 100644
index 000000000..92c4cd159
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Smoke4.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: ad90f586d4fe1b942b46f0da520a0e61
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat
new file mode 100644
index 000000000..020843b3e
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat.meta
new file mode 100644
index 000000000..bf3e43b50
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Snowflake.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 65836931803ab5b4fb9f60bd418f4100
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat
new file mode 100644
index 000000000..3591277fa
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat.meta
new file mode 100644
index 000000000..8a93c0bdd
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/SoapBubble.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7e3669cf306c78f48a1f9affe08eb0f9
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat
new file mode 100644
index 000000000..f4844036c
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat.meta
new file mode 100644
index 000000000..4ea3c1424
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Spark.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: e097e0ca551c28647a5a126e44c35bbc
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat
new file mode 100644
index 000000000..d69ddf560
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat.meta
new file mode 100644
index 000000000..1de91219b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles1.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7c98ffa948c8d43d5ac42a3e9f0ea897
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat
new file mode 100644
index 000000000..7fbce8d79
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat.meta
new file mode 100644
index 000000000..bc3f29dbb
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Sparkles2.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c78b114ae617a4914a6f9b9e0f796a0b
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat
new file mode 100644
index 000000000..b1722d54f
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat.meta
new file mode 100644
index 000000000..fcc97bc0a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash1.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: f3d66f34459704a34b36657da3964ea1
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat
new file mode 100644
index 000000000..6b4dc079a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat.meta
new file mode 100644
index 000000000..fd6efa35b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Materials/Water Splash2.mat.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 7dca5dff796eb47908302d505dcb19b0
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders.meta
new file mode 100644
index 000000000..72f5a8f94
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 1e3cbdfe3644f44aeb1c053d96cc254e
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader
new file mode 100644
index 000000000..c0573dfc5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader
@@ -0,0 +1,87 @@
+Shader "Hidden/Particles/Alpha Blended +100" {
+Properties {
+ _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5)
+ _MainTex ("Particle Texture", 2D) = "white" {}
+}
+
+Category {
+ Tags { "Queue"="Transparent +100" "IgnoreProjector"="True" "RenderType"="Transparent" }
+ Blend SrcAlpha OneMinusSrcAlpha
+ AlphaTest Greater .01
+ ColorMask RGB
+ Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
+ BindChannels {
+ Bind "Color", color
+ Bind "Vertex", vertex
+ Bind "TexCoord", texcoord
+ }
+
+ // ---- Fragment program cards
+ SubShader {
+ Pass {
+
+ CGPROGRAM
+ #pragma vertex vert
+ #pragma fragment frag
+ #pragma fragmentoption ARB_precision_hint_fastest
+ #pragma fragmentoption ARB_fog_exp2
+
+ #include "UnityCG.cginc"
+
+ sampler2D _MainTex;
+ float4 _TintColor;
+
+ struct appdata_t {
+ float4 vertex : POSITION;
+ float4 color : COLOR;
+ float2 texcoord : TEXCOORD0;
+ };
+
+ struct v2f {
+ float4 vertex : POSITION;
+ float4 color : COLOR;
+ float2 texcoord : TEXCOORD0;
+ };
+
+ float4 _MainTex_ST;
+
+ v2f vert (appdata_t v)
+ {
+ v2f o;
+ o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
+ o.color = v.color;
+ o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);
+ return o;
+ }
+
+ half4 frag (v2f i) : COLOR
+ {
+ return 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord);
+ }
+ ENDCG
+ }
+ }
+
+ // ---- Dual texture cards
+ SubShader {
+ Pass {
+ SetTexture [_MainTex] {
+ constantColor [_TintColor]
+ combine constant * primary
+ }
+ SetTexture [_MainTex] {
+ combine texture * previous DOUBLE
+ }
+ }
+ }
+
+ // ---- Single texture cards (does not do color tint)
+ SubShader {
+ Pass {
+ SetTexture [_MainTex] {
+ combine texture * primary
+ }
+ }
+ }
+}
+}
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader.meta
new file mode 100644
index 000000000..0bbc63ce5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Shaders/Particle Alpha Blend (Queue +100).shader.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e83c2f831bb0fd14b92751cdcbe823ec
+ShaderImporter:
+ defaultTextures: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures.meta
new file mode 100644
index 000000000..111f288e7
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e9b2eead3d2f84ce19c1d65f1dbf66f9
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png
new file mode 100644
index 000000000..5ba39f00a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png.meta
new file mode 100644
index 000000000..d50f0a009
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/ColorFlare.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: e976c6d3ebc1e4a85aa7186a3192d8c5
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd
new file mode 100644
index 000000000..4335621e5
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd.meta
new file mode 100644
index 000000000..fd2966b61
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/DustPoof.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 65fb74f285bbb4d11a3b64d99c0a53b0
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd
new file mode 100644
index 000000000..8bc7c7998
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd.meta
new file mode 100644
index 000000000..5433da5f8
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Fireball.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 028c11450244e4feabe6828fc2ec3e03
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 2
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif
new file mode 100644
index 000000000..81ab8dc6d
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif.meta
new file mode 100644
index 000000000..3df1d2ccc
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Snowflake.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 01b622d4830754f4886f4b03606fb1ec
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png
new file mode 100644
index 000000000..8ab98d12c
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png.meta
new file mode 100644
index 000000000..0fc579058
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/Star02.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 6793afeb1ba524134ae93ee3038763e0
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png
new file mode 100644
index 000000000..e5f1f40ac
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png.meta
new file mode 100644
index 000000000..e8ec27c82
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/SteamBlur.png.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 12747bdca86d344c2a4f1ea2bb362f17
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif
new file mode 100644
index 000000000..c90fd20bf
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif.meta
new file mode 100644
index 000000000..56439cf1c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fairydust.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 79ee47d0d7d8347459a63ae804788244
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd
new file mode 100644
index 000000000..fa8195221
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd.meta
new file mode 100644
index 000000000..ee74e8077
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire3.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: acd22cefe09441d2c7e801193b935495
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 2
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .100000001
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 256
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd
new file mode 100644
index 000000000..ba598039a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd.meta
new file mode 100644
index 000000000..355a3854b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/fire4.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8e3ff3e27ca4bc54dda56e89e0550dfa
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 2
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .100000001
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 256
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif
new file mode 100644
index 000000000..b2fbb3211
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif.meta
new file mode 100644
index 000000000..17d80f481
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameA.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 34c9fcec00ce63b49a6725d4eadead19
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif
new file mode 100644
index 000000000..7fa15b182
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif.meta
new file mode 100644
index 000000000..08477a9a0
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameB.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 3ddb50e323b793449ad89bd605735e35
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif
new file mode 100644
index 000000000..11df92acb
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif.meta
new file mode 100644
index 000000000..f76cbb799
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameC.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 8e303788a4e296443b33942a5be85049
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif
new file mode 100644
index 000000000..612396998
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif.meta
new file mode 100644
index 000000000..ef149514a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameD.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d236c2e07976ff942a0e23d979e8f4cb
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif
new file mode 100644
index 000000000..99954a0fa
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif.meta
new file mode 100644
index 000000000..234c3078b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flameE.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 0a70c16c7b47ab048bc9e03b588c24f6
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif
new file mode 100644
index 000000000..cd0c8671c
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif.meta
new file mode 100644
index 000000000..f95846a82
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/flametemplate.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 820a38890d8f1f742b289b29927ffb3b
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga
new file mode 100644
index 000000000..b4816186d
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga.meta
new file mode 100644
index 000000000..b335884b9
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/foam.tga.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 086544326e5604e81a96f61fb0f0a78e
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif
new file mode 100644
index 000000000..527bfc617
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif.meta
new file mode 100644
index 000000000..405512433
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 08f28e42a647e2a4cbd32e793359aa3c
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif
new file mode 100644
index 000000000..ad9dc48ad
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif.meta
new file mode 100644
index 000000000..731e45aac
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke2.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 1a5d8cd24a805cd44b00c7f1e1e4d287
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif
new file mode 100644
index 000000000..fa6b99a93
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif.meta
new file mode 100644
index 000000000..4a33b0bc5
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke3.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: d3b7d84ffb95cc04aaeb74f19a10f034
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif
new file mode 100644
index 000000000..4ec870d4b
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif.meta
new file mode 100644
index 000000000..cad9e4166
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoke4.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: e7d408c28925be148bd9ef32f4f28e44
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd
new file mode 100644
index 000000000..aeb382dff
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd.meta
new file mode 100644
index 000000000..a0a2b824f
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smokepuff1.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 6e77d387966489d6cb6bb6ba39e09c45
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 2
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .100000001
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 256
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd
new file mode 100644
index 000000000..be7356de0
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd.meta
new file mode 100644
index 000000000..5366a72d1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/smoketest2.psd.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 2a49aa5b76842305fc65897abcdcf30f
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 2
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .100000001
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 256
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif
new file mode 100644
index 000000000..5b1271400
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif.meta
new file mode 100644
index 000000000..73c45a340
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/soapbubble.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: 60fb16895cbaf4946906b6d63f3653ec
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: -1
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif
new file mode 100644
index 000000000..dfe8c944a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif.meta b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif.meta
new file mode 100644
index 000000000..852a547b1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sources/Textures/spark.tif.meta
@@ -0,0 +1,36 @@
+fileFormatVersion: 2
+guid: e79b4ee3b7b31ee499b1532270c7730d
+TextureImporter:
+ serializedVersion: 2
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ linearTexture: 0
+ correctGamma: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: .25
+ normalMapFilter: 0
+ isReadable: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 0
+ seamlessCubemap: 0
+ textureFormat: -1
+ maxTextureSize: 1024
+ textureSettings:
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapMode: 1
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ alphaIsTransparency: 0
+ textureType: 0
+ buildTargetSettings: []
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sparkles.meta b/Chromacore/Assets/Standard Assets/Particles/Sparkles.meta
new file mode 100644
index 000000000..5f1b92f2e
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sparkles.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: aadd99b5f57c2486b98d31bcbb5c640e
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab b/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab
new file mode 100644
index 000000000..52ca158a4
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab.meta
new file mode 100644
index 000000000..9543a8cd1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Sparkles/Sparkle Rising.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 5692846c5ce8f4ee08ef64bec4aad0bd
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water.meta b/Chromacore/Assets/Standard Assets/Particles/Water.meta
new file mode 100644
index 000000000..aad33da38
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Water.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e02bf8d8fe18948ea8ce546b6a32bee5
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab b/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab
new file mode 100644
index 000000000..250c23ef1
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab.meta
new file mode 100644
index 000000000..8883f8860
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Water/Water Fountain.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: caf20877f7cce4351a9b1cfef8dcd186
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab b/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab
new file mode 100644
index 000000000..f9b18995a
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab.meta
new file mode 100644
index 000000000..62be27538
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Water/Water Surface Splash.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 8600316ae23e146108aa156f81a2d56f
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab b/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab
new file mode 100644
index 000000000..121e992d6
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab.meta b/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab.meta
new file mode 100644
index 000000000..318b2fd6f
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Particles/Water/WaterFall.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c31fa1a55f0c141ccb34e61d6bb78569
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials.meta b/Chromacore/Assets/Standard Assets/Physic Materials.meta
new file mode 100644
index 000000000..f56a4a60e
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: c48f755640f4048aeaa765302f0c14b3
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial b/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial
new file mode 100644
index 000000000..046c1f795
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial differ
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial.meta b/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial.meta
new file mode 100644
index 000000000..7001053ec
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials/Bouncy.physicmaterial.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 99e86ee0ad11f8d6d00011d98d76c639
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial b/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial
new file mode 100644
index 000000000..48ee159c6
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial differ
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial.meta b/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial.meta
new file mode 100644
index 000000000..e5ed57283
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials/Ice.physicmaterial.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 5410a64fad11e8d6d00011d98d76c639
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial b/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial
new file mode 100644
index 000000000..c16329d62
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial differ
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial.meta b/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial.meta
new file mode 100644
index 000000000..b0fc30ec1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials/Metal.physicmaterial.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 67db31eead11e8d6d00011d98d76c639
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial b/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial
new file mode 100644
index 000000000..ba964a270
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial differ
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial.meta b/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial.meta
new file mode 100644
index 000000000..1ebbaa770
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials/Rubber.physicmaterial.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: fa9a139ead11e8d6d00011d98d76c639
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial b/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial
new file mode 100644
index 000000000..bd6358100
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial differ
diff --git a/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial.meta b/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial.meta
new file mode 100644
index 000000000..a6601840d
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Physic Materials/Wood.physicmaterial.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: cdf7d3f1ad11f8d6d00011d98d76c639
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs.meta b/Chromacore/Assets/Standard Assets/Prefabs.meta
new file mode 100644
index 000000000..0738c1c5e
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: e23a2ec89d9094c1fa1aff8b4c73d5c1
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab b/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab
new file mode 100644
index 000000000..508002636
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab.meta b/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab.meta
new file mode 100644
index 000000000..bc91a5a51
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs/MasterNote0.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 567650bd461fdb3429413c01e97eda94
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab b/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab
new file mode 100644
index 000000000..e19718a42
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab.meta b/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab.meta
new file mode 100644
index 000000000..b02e83839
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs/Note.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 46413ffe6f4a01344b0eb8afa5ff2800
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab b/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab
new file mode 100644
index 000000000..09e2de9b2
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab.meta b/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab.meta
new file mode 100644
index 000000000..c62b1fbe1
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs/Obstacle0.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: c749812e0c36cc14da3742a9ebf3af3a
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab b/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab
new file mode 100644
index 000000000..022431ad7
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab.meta b/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab.meta
new file mode 100644
index 000000000..91f7e1e0a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs/PlatformTemplate.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: 8d595c8b3a04ad741a1c5ca52beea499
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab b/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab
new file mode 100644
index 000000000..5b2bbe1c7
Binary files /dev/null and b/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab differ
diff --git a/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab.meta b/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab.meta
new file mode 100644
index 000000000..77cece33f
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Prefabs/Teli.prefab.meta
@@ -0,0 +1,4 @@
+fileFormatVersion: 2
+guid: efebaf1e908e317499ba8cd7a3c4eba9
+NativeFormatImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts.meta b/Chromacore/Assets/Standard Assets/Scripts.meta
new file mode 100644
index 000000000..fde4340bb
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: f24211acc2f84428d99aa151bdf3f32b
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs b/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs
new file mode 100644
index 000000000..4cd90b794
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs
@@ -0,0 +1,46 @@
+using UnityEngine;
+using System.Collections;
+
+public class Checkpoints : MonoBehaviour {
+ // Get the current spawn point
+ public GameObject spawnPoint;
+
+ // Teli's velocity
+ float velocity = 4.75196f;
+
+ // Teli's starting position
+ float startPOS = -62.20014f;
+
+ // This checkpoint's timestamp
+ float checkpoint_timestamp;
+
+ // Use this for initialization
+ void Start () {
+
+ }
+
+ // Update is called once per frame
+ void Update () {
+
+ }
+
+ // Detect collisions with checkpoints via Character Controller
+ // When checkpoint is found, set spawn point to checkpoint's position
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Checkpoint"){
+ // Add 5 to the checkpoint's y position to ensure Teli isn't spawned below level
+ col.transform.position = new Vector3(col.transform.position.x, col.transform.position.y + 1, col.transform.position.z);
+ spawnPoint.transform.position = col.transform.position;
+ checkpoint_timestamp = calcTimestamp();
+ BroadcastMessage("getCheckpoint", checkpoint_timestamp);
+ }
+ }
+
+ float calcTimestamp(){
+ // Formula: ( timestamp = (xPOS - startPOS) / velocity )
+ checkpoint_timestamp = (collider.transform.position.x - startPOS) / velocity;
+ return checkpoint_timestamp;
+
+ // (Opposite of calcXPOS formula: xPOS = (velocity * timestamp) + startPOS )
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs.meta
new file mode 100644
index 000000000..db6b81762
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Checkpoints.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5fdd06b5983c181489268acc725b94e1
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs b/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs
new file mode 100644
index 000000000..63a3d8c22
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs
@@ -0,0 +1,95 @@
+using UnityEngine;
+
+using System.Collections;
+
+// This script changes textures from black and white to color when Teli
+// collects the corresponding note. A master object holds both the color
+// and monochrome textures, as well as the pickups in that area. As Teli
+// picks up collectibles, the texture will transition from black and white
+// to color
+
+public class ColorSwap : MonoBehaviour {
+
+ // Black and White Texture
+ public tk2dBaseSprite mono;
+ // Color Texture
+ public tk2dBaseSprite multi;
+ // Color from the Color Texture
+ Color multiC;
+ // Amount of collectibles in area
+ public int Collectibles;
+ // Amount of collectibles picked up
+ int collected;
+ // Alpha level for textures
+ float fade;
+ // Current alpha value
+ float curFade;
+ // current alpha value for monochrome texture
+ float curFadeOut;
+ // current alpha value for colored texture
+ float curFadeIn;
+ // Color from the Black and White texture
+ Color monoC;
+ // Should the colors be swapped?
+ bool swap;
+
+ // Use this for initialization
+ void Start () {
+ // Initialize delta fade
+ fade = (float)1/(float)Collectibles;
+ // At the start, there should be no color swapping
+ swap = false;
+ // Get the color value of the color texture
+ multiC = multi.color;
+ // Set thet color texture invisible
+ multiC.a = 0.0f;
+ // Set the invisible color texture to the Color
+ multi.color = multiC;
+ // Get the color of the monochrome texture
+ monoC = mono.color;
+ //// Set the monochrome texture visible
+ monoC.a = 1.0f;
+ //Set the monochrome visibility to the texture
+ mono.color = monoC;
+ // The alpha value of the monochrome should start at 1
+ curFadeOut = 1;
+ // The alpha value of the color should start at 0
+ curFadeIn = 0;
+ // The fade value should start at 0
+ curFade = 0;
+ }
+
+ void Update(){
+ // If an item has been picked up, and the alpha values are
+ // below their target fade values, run the fade
+ if(swap && multiC.a < curFadeIn && monoC.a > curFadeOut)
+ {
+ // Increment the alpha value of thet color texture
+ multiC.a += .01f;
+ // Set this new color to the texure
+ multi.color = multiC;
+ // Decrement the alpha value of the monochrome texture
+ monoC.a -= .01f;
+ // Set new color to texture
+ mono.color = monoC;
+ }
+ }
+
+ // Sets the new fade values of the textures once the a collectible
+ // is collected
+ void ChangeColor (){
+ // start the swap
+ swap = true;
+ // An object has been picked up so increment collected
+ collected++;
+ // The current fade value should be the change in fade times
+ // the amount of collectibles collected
+ curFade = fade * collected;
+ // The monochrome texture should fade out, so subtract
+ // curFade from 1
+ curFadeOut = 1 - curFade;
+ // The color texture fades in, so it increments up
+ curFadeIn = curFade;
+ }
+
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs.meta
new file mode 100644
index 000000000..d017e0bc7
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ColorSwap.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ab34637e032d78848b780b8c926879b2
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs b/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs
new file mode 100644
index 000000000..938445084
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs
@@ -0,0 +1,89 @@
+using UnityEngine;
+using System.Collections;
+
+public class EndOfLevel : MonoBehaviour {
+ // Texture used to fade in and out from black
+ public GUITexture fadeToBlackTexture;
+ // Text fading in, "Thanks for playing!"
+ public GUIText fadeToBlackThanksText;
+ // Text credits developers
+ public GUIText creditsDEVS;
+ // Text credits Northeastern
+ public GUIText creditsNEU;
+
+ // Get the scoring system to display final score
+ public GameObject scoringSystem;
+
+ // The alpha value used to fade in and out
+ float alphaFadeValue = 0;
+ float text_alphaFadeValue = 0;
+ // Bool used to determine if we should fade out.
+ bool fadeOutP;
+
+ // Use this for initialization
+ void Start () {
+ // Set texture invisible & black at beginning
+ fadeToBlackTexture.color = new Color(0, 0, 0, alphaFadeValue);
+ // Set text invisisble & white at beginning
+ fadeToBlackThanksText.color = new Color(255, 255, 255, text_alphaFadeValue);
+ // Set credits invisible & white at beginning
+ creditsDEVS.color = new Color(255, 255, 255, text_alphaFadeValue);
+ creditsNEU.color = new Color(255, 255, 255, text_alphaFadeValue);
+
+
+ // Do not fade out to black by default
+ fadeOutP = false;
+ }
+
+ // Update is called once per frame
+ void Update () {
+ if (fadeOutP){
+ FadeOutToBlack();
+ FadeInText();
+ SetTextPosition();
+ }
+ }
+
+ // Upon colliding with the player, trigger the end of level
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Player")
+ {
+ fadeOutP = true;
+ Debug.Log(fadeOutP);
+ }
+ }
+
+ // Mimic the camera fading out to black
+ private void FadeOutToBlack(){
+ Debug.Log("Fade out");
+ // Dividing by 8 makes fade lasts 8 secs
+ alphaFadeValue += Mathf.Clamp01(Time.deltaTime / 8);
+
+ fadeToBlackTexture.color = new Color(0, 0, 0, alphaFadeValue);
+
+ // After 15 seconds, reset game
+ Invoke("Reset", 15);
+ }
+
+ // Fade in "Thanks for playing"
+ private void FadeInText(){
+ // Dividing by 8 makes fade lasts 8 secs
+ text_alphaFadeValue += Mathf.Clamp01(Time.deltaTime / 10);
+
+ fadeToBlackThanksText.color = new Color(255, 255, 255, text_alphaFadeValue);
+ creditsDEVS.color = new Color(255, 255, 255, text_alphaFadeValue);
+ creditsNEU.color = new Color(255, 255, 255, text_alphaFadeValue);
+ }
+
+ // Set the position of "Thanks for playing text" GUI to middle center
+ void SetTextPosition(){
+ fadeToBlackThanksText.pixelOffset = new Vector2(Screen.width / 500, (float)Screen.height / 30f);
+ creditsDEVS.pixelOffset = new Vector2(Screen.width / 500, (float)Screen.height / 30f - 70f);
+ creditsNEU.pixelOffset = new Vector2(Screen.width / 500, (float)Screen.height / 30f - 120f);
+ }
+
+ // Reset entire game by reloading level after 15 seconds
+ void Reset(){
+ Application.LoadLevel(0);
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs.meta
new file mode 100644
index 000000000..c368b7a91
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/EndOfLevel.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 4a466f79c38c7c24ea8487278913af06
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/General Scripts.meta b/Chromacore/Assets/Standard Assets/Scripts/General Scripts.meta
new file mode 100644
index 000000000..82579c709
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/General Scripts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 8636e662e0f7d440fa257e9dce592504
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs
new file mode 100644
index 000000000..f840d945c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs
@@ -0,0 +1,62 @@
+using UnityEngine;
+
+public class ActivateTrigger : MonoBehaviour {
+ public enum Mode {
+ Trigger = 0, // Just broadcast the action on to the target
+ Replace = 1, // replace target with source
+ Activate = 2, // Activate the target GameObject
+ Enable = 3, // Enable a component
+ Animate = 4, // Start animation on target
+ Deactivate= 5 // Decativate target GameObject
+ }
+
+ /// The action to accomplish
+ public Mode action = Mode.Activate;
+
+ /// The game object to affect. If none, the trigger work on this game object
+ public Object target;
+ public GameObject source;
+ public int triggerCount = 1;///
+ public bool repeatTrigger = false;
+
+ void DoActivateTrigger () {
+ triggerCount--;
+
+ if (triggerCount == 0 || repeatTrigger) {
+ Object currentTarget = target != null ? target : gameObject;
+ Behaviour targetBehaviour = currentTarget as Behaviour;
+ GameObject targetGameObject = currentTarget as GameObject;
+ if (targetBehaviour != null)
+ targetGameObject = targetBehaviour.gameObject;
+
+ switch (action) {
+ case Mode.Trigger:
+ targetGameObject.BroadcastMessage ("DoActivateTrigger");
+ break;
+ case Mode.Replace:
+ if (source != null) {
+ Object.Instantiate (source, targetGameObject.transform.position, targetGameObject.transform.rotation);
+ DestroyObject (targetGameObject);
+ }
+ break;
+ case Mode.Activate:
+ targetGameObject.active = true;
+ break;
+ case Mode.Enable:
+ if (targetBehaviour != null)
+ targetBehaviour.enabled = true;
+ break;
+ case Mode.Animate:
+ targetGameObject.animation.Play ();
+ break;
+ case Mode.Deactivate:
+ targetGameObject.active = false;
+ break;
+ }
+ }
+ }
+
+ void OnTriggerEnter (Collider other) {
+ DoActivateTrigger ();
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs.meta
new file mode 100644
index 000000000..f8c33b925
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c8634e062924929664361c08745211fb
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js
new file mode 100644
index 000000000..b1aa5a4d2
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js
@@ -0,0 +1,81 @@
+var spring = 50.0;
+var damper = 5.0;
+var drag = 10.0;
+var angularDrag = 5.0;
+var distance = 0.2;
+var attachToCenterOfMass = false;
+
+private var springJoint : SpringJoint;
+
+function Update ()
+{
+ // Make sure the user pressed the mouse down
+ if (!Input.GetMouseButtonDown (0))
+ return;
+
+ var mainCamera = FindCamera();
+
+ // We need to actually hit an object
+ var hit : RaycastHit;
+ if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), hit, 100))
+ return;
+ // We need to hit a rigidbody that is not kinematic
+ if (!hit.rigidbody || hit.rigidbody.isKinematic)
+ return;
+
+ if (!springJoint)
+ {
+ var go = new GameObject("Rigidbody dragger");
+ var body : Rigidbody = go.AddComponent ("Rigidbody") as Rigidbody;
+ springJoint = go.AddComponent ("SpringJoint");
+ body.isKinematic = true;
+ }
+
+ springJoint.transform.position = hit.point;
+ if (attachToCenterOfMass)
+ {
+ var anchor = transform.TransformDirection(hit.rigidbody.centerOfMass) + hit.rigidbody.transform.position;
+ anchor = springJoint.transform.InverseTransformPoint(anchor);
+ springJoint.anchor = anchor;
+ }
+ else
+ {
+ springJoint.anchor = Vector3.zero;
+ }
+
+ springJoint.spring = spring;
+ springJoint.damper = damper;
+ springJoint.maxDistance = distance;
+ springJoint.connectedBody = hit.rigidbody;
+
+ StartCoroutine ("DragObject", hit.distance);
+}
+
+function DragObject (distance : float)
+{
+ var oldDrag = springJoint.connectedBody.drag;
+ var oldAngularDrag = springJoint.connectedBody.angularDrag;
+ springJoint.connectedBody.drag = drag;
+ springJoint.connectedBody.angularDrag = angularDrag;
+ var mainCamera = FindCamera();
+ while (Input.GetMouseButton (0))
+ {
+ var ray = mainCamera.ScreenPointToRay (Input.mousePosition);
+ springJoint.transform.position = ray.GetPoint(distance);
+ yield;
+ }
+ if (springJoint.connectedBody)
+ {
+ springJoint.connectedBody.drag = oldDrag;
+ springJoint.connectedBody.angularDrag = oldAngularDrag;
+ springJoint.connectedBody = null;
+ }
+}
+
+function FindCamera ()
+{
+ if (camera)
+ return camera;
+ else
+ return Camera.main;
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js.meta b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js.meta
new file mode 100644
index 000000000..c6d9cd36c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/General Scripts/DragRigidbody.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cae09c86ad1122e5d0006ac98d76c639
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs b/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs
new file mode 100644
index 000000000..2fb40c2ad
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+public class Glow_Animation : MonoBehaviour {
+ // Used to detect collisions with Notes via Character Controller and
+ // send message to animation script to play Glow Animation.
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Note"){
+ BroadcastMessage("GlowAnimation");
+ }
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs.meta
new file mode 100644
index 000000000..67120e799
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Glow_Animation.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 25261a6d42656784f8312aceed80f72e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs b/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs
new file mode 100644
index 000000000..1b046cd5a
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs
@@ -0,0 +1,59 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+public class Inventory : MonoBehaviour {
+
+ // Notes that have been collected by the player
+ private int notesCollected = 0;
+ // Notes that have been seen by the player
+ private int notesSeen = 0;
+ public GameObject scoringSystem;
+
+ // Variables used to save score, zero by default
+ private int save_notesCollected = 0;
+ private int save_notesSeen = 0;
+
+ // Use this for initialization
+ void Start () {
+ save_notesCollected = 0;
+ save_notesSeen = 0;
+ }
+
+ // Increment notes when the player passes them
+ void SeeNote()
+ {
+ notesSeen++;
+ scoringSystem.SendMessage("ScoreSeen", notesSeen.ToString());
+ //Debug.Log("Notes Seen: " + notesSeen.ToString());
+ }
+
+ // Increment notes when the player collects them
+ void CollectNote()
+ {
+ notesCollected++;
+ scoringSystem.SendMessage("ScoreCollected", notesCollected.ToString());
+ //Debug.Log("Notes Collected: " + notesSeen.ToString());
+ }
+
+ // Save the current score at this checkpoint
+ void getCheckpoint(){
+ save_notesCollected = notesCollected;
+ save_notesSeen = notesSeen;
+ }
+
+ // On death, reset score to the saved scores at latest checkpoint
+ void ResetScore(){
+ notesCollected = save_notesCollected;
+ scoringSystem.SendMessage("ScoreCollected", notesCollected.ToString());
+
+ notesSeen = save_notesSeen;
+ scoringSystem.SendMessage("ScoreSeen", notesSeen.ToString());
+ }
+
+
+ // Update is called once per frame
+ void Update () {
+
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs.meta
new file mode 100644
index 000000000..90941de59
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Inventory.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 78701b5fdc519f44391562d748a122a5
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js b/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js
new file mode 100644
index 000000000..e5a3568e6
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js
@@ -0,0 +1,46 @@
+var target : Transform;
+var distance = 10.0;
+
+var xSpeed = 250.0;
+var ySpeed = 120.0;
+
+var yMinLimit = -20;
+var yMaxLimit = 80;
+
+private var x = 0.0;
+private var y = 0.0;
+
+@script AddComponentMenu("Camera-Control/Mouse Orbit")
+
+function Start () {
+ var angles = transform.eulerAngles;
+ x = angles.y;
+ y = angles.x;
+
+ // Make the rigid body not change rotation
+ if (rigidbody)
+ rigidbody.freezeRotation = true;
+}
+
+function LateUpdate () {
+ if (target) {
+ x += Input.GetAxis("Mouse X") * xSpeed * 0.02;
+ y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02;
+
+ y = ClampAngle(y, yMinLimit, yMaxLimit);
+
+ var rotation = Quaternion.Euler(y, x, 0);
+ var position = rotation * Vector3(0.0, 0.0, -distance) + target.position;
+
+ transform.rotation = rotation;
+ transform.position = position;
+ }
+}
+
+static function ClampAngle (angle : float, min : float, max : float) {
+ if (angle < -360)
+ angle += 360;
+ if (angle > 360)
+ angle -= 360;
+ return Mathf.Clamp (angle, min, max);
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js.meta b/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js.meta
new file mode 100644
index 000000000..7dec8de05
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/MouseOrbit.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f5b6c0192b0b34436be503f19b95fb6c
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js b/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js
new file mode 100644
index 000000000..b6c034ed9
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js
@@ -0,0 +1,42 @@
+#pragma strict
+
+// Responsible for movement, gravity
+
+var speed : float = 6.0;
+var jumpSpeed : float = 8.0;
+var gravity : float = 20.0;
+
+private var moveDirection : Vector3 = Vector3.zero;
+
+// Are we not dead?
+var notdeadp = true;
+
+// Used to recieve message from Teli_Animation.cs
+function death(bool){
+ // Set dead boolean to the boolean value passed to it by
+ // either Reset() or ObstalceDeath() methods
+ notdeadp = bool;
+}
+
+// Update is called once every frame
+function Update() {
+ var controller : CharacterController = GetComponent(CharacterController);
+ if (controller.isGrounded) {
+ // We are grounded, so recalculate
+ // move direction directly from axes
+ moveDirection = Vector3(1, 0, 0);
+ moveDirection = transform.TransformDirection(moveDirection);
+ moveDirection *= speed;
+
+ if (Input.GetButton ("Jump")) {
+ moveDirection.y = jumpSpeed;
+ }
+ }
+ // Apply gravity
+ moveDirection.y -= gravity * Time.deltaTime;
+
+ // Move the controller if we are not dead
+ if (notdeadp == true){
+ controller.Move(moveDirection * Time.deltaTime);
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js.meta b/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js.meta
new file mode 100644
index 000000000..a3d426c7b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Movement_Gravity.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1a891adfc5f9a42079f8c880e5506518
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs b/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs
new file mode 100644
index 000000000..1dd01297c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs
@@ -0,0 +1,21 @@
+using UnityEngine;
+using System.Collections;
+
+public class NoteCollect : MonoBehaviour {
+
+ // Use this for initialization
+ void Start () {
+
+ }
+
+
+ void OnTriggerEnter(Collider col)
+ {
+ col.SendMessage("SeeNote");
+ }
+
+ // Update is called once per frame
+ void Update () {
+
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs.meta
new file mode 100644
index 000000000..deba5f890
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/NoteCollect.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0ad69a31bd7b01941aecd312c5395dab
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs b/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs
new file mode 100644
index 000000000..da90a7712
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs
@@ -0,0 +1,53 @@
+using UnityEngine;
+using System.Collections;
+
+public class ObstacleCollision : MonoBehaviour {
+ private tk2dSpriteAnimator anim;
+
+ // Get the Teli animation object
+ public tk2dSpriteAnimator Teli;
+
+ // Use this for initialization
+ void Start () {
+ anim = GetComponent();
+ }
+
+ // Update is called once per frame
+ void Update () {
+ }
+
+ // Upon picking up this object, trigger events
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Player")
+ {
+ Debug.Log("Obstacle Hit");
+ // And they are punching
+
+ if(Teli.IsPlaying("Punch"))
+ {
+ // Break the obstacle
+ BreakObstacle();
+ // Play the breaking sound
+ audio.Play();
+ }
+ }
+ }
+
+ // Play break animation, then destroy gameObject
+ void BreakObstacle()
+ {
+ // Play the break animation
+ anim.Play("Obstacle");
+ Debug.Log("Obstacle break!");
+ // Destroy Obstacle gameObject after 5 seconds
+ Invoke("Destroy", 5);
+ }
+
+ // Destroy the obstacle
+ void Destroy()
+ {
+ Destroy(gameObject);
+ }
+
+
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs.meta
new file mode 100644
index 000000000..fef2b8d67
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ObstacleCollision.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2264e56de2c16cf4b8e2a58b32492101
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs b/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs
new file mode 100644
index 000000000..516007240
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+public class ObstacleDeath : MonoBehaviour {
+ // Used to detect collisions with Notes via Character Controller and
+ // send message to animation script to play Glow Animation.
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Obstacle"){
+ BroadcastMessage("ObstacleDeath");
+ }
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs.meta
new file mode 100644
index 000000000..daf6e716b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ObstacleDeath.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 63754126a439ad746a9c56378973bcfa
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs b/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs
new file mode 100644
index 000000000..7e8d5badd
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs
@@ -0,0 +1,33 @@
+using UnityEngine;
+using System.Collections;
+
+public class Pickup : MonoBehaviour {
+
+ // Corresponding sound to the musical track attached to
+ // the object
+ private AudioClip collectSound;
+
+ // Get the parent of this collectible
+ GameObject parent;
+
+ // Use this for initialization
+ void Start () {
+ parent = transform.parent.gameObject;
+ }
+
+ // Upon picking up this object, trigger events
+ void OnTriggerEnter(Collider col){
+ if(col.gameObject.tag == "Player")
+ {
+ // Change the color of the textures on pickup
+ parent.SendMessage("ChangeColor");
+ // A note has been collected so increment the score
+ col.SendMessage("CollectNote");
+ // Make this object invisible
+ gameObject.renderer.enabled = false;
+ // Play the corresponding sound
+ audio.Play();
+ }
+ }
+
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs.meta
new file mode 100644
index 000000000..1337f302c
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Pickup.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b6efa9c2b6e24428c84e8ae69a64af1e
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs b/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs
new file mode 100644
index 000000000..ddde51076
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs
@@ -0,0 +1,41 @@
+using UnityEngine;
+using System.Collections;
+
+public class ScoringSystem : MonoBehaviour {
+ string _numSeen = "0";
+ string _numCollected = "0";
+
+ // Use this for initialization
+ void Start () {
+
+ }
+
+ // Update is called once per frame
+ void Update () {
+ ScoreString();
+ SetPosition();
+ }
+
+ // Recieve the number of Notes seen from Inventory.cs
+ // Save it to pass on to ScoreString function
+ void ScoreSeen(string numSeen){
+ _numSeen = numSeen;
+ }
+
+ // Recieve the number of Notes collected from Inventory.cs
+ // Save it to pass on to ScoreString function
+ void ScoreCollected(string numCollected){
+ _numCollected = numCollected;
+ }
+
+ // Concatonate the number of Notes seen & collected into 1 string
+ // and display the string with the GUI Text object.
+ void ScoreString(){
+ guiText.text = _numCollected + " / " + _numSeen;
+ }
+
+ // Set the position of Score GUI to top center
+ void SetPosition(){
+ guiText.pixelOffset = new Vector2(Screen.width / 500, (float)Screen.height / 2.5f);
+ }
+}
diff --git a/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs.meta
new file mode 100644
index 000000000..a76badab2
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/ScoringSystem.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 012cb95479dcd644380094835143b320
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js b/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js
new file mode 100644
index 000000000..739332bc3
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js
@@ -0,0 +1,58 @@
+/*
+This camera smoothes out rotation around the y-axis and height.
+Horizontal Distance to the target is always fixed.
+
+There are many different ways to smooth the rotation but doing it this way gives you a lot of control over how the camera behaves.
+
+For every of those smoothed values we calculate the wanted value and the current value.
+Then we smooth it using the Lerp function.
+Then we apply the smoothed values to the transform's position.
+*/
+
+// The target we are following
+var target : Transform;
+// The distance in the x-z plane to the target
+var distance = 10.0;
+// the height we want the camera to be above the target
+var height = 5.0;
+// How much we
+var heightDamping = 2.0;
+var rotationDamping = 3.0;
+
+// Place the script in the Camera-Control group in the component menu
+@script AddComponentMenu("Camera-Control/Smooth Follow")
+
+
+function LateUpdate () {
+ // Early out if we don't have a target
+ if (!target)
+ return;
+
+ // Calculate the current rotation angles
+ var wantedRotationAngle = target.eulerAngles.y;
+ var wantedHeight = target.position.y + height;
+
+ var currentRotationAngle = transform.eulerAngles.y;
+ var currentHeight = transform.position.y;
+
+ // Damp the rotation around the y-axis
+ currentRotationAngle = Mathf.LerpAngle (currentRotationAngle, wantedRotationAngle, rotationDamping * Time.deltaTime);
+
+ // Damp the height
+ currentHeight = Mathf.Lerp (currentHeight, wantedHeight, heightDamping * Time.deltaTime);
+
+ // Convert the angle into a rotation
+ var currentRotation = Quaternion.Euler (0, currentRotationAngle, 0);
+
+ // Set the position of the camera on the x-z plane to:
+ // distance meters behind the target
+ transform.position = target.position;
+ transform.position -= currentRotation * Vector3.forward * distance;
+ transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + 5);
+
+ // Set the height of the camera
+ transform.position.y = currentHeight;
+
+ // Always look at the target
+ transform.LookAt (target);
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js.meta b/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js.meta
new file mode 100644
index 000000000..6a1c2d869
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/SmoothFollow.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 400de7b0f23854d0591967cfa03de8b7
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js b/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js
new file mode 100644
index 000000000..65d4051d8
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js
@@ -0,0 +1,27 @@
+var target : Transform;
+var damping = 6.0;
+var smooth = true;
+
+@script AddComponentMenu("Camera-Control/Smooth Look At")
+
+function LateUpdate () {
+ if (target) {
+ if (smooth)
+ {
+ // Look at and dampen the rotation
+ var rotation = Quaternion.LookRotation(target.position - transform.position);
+ transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * damping);
+ }
+ else
+ {
+ // Just lookat
+ transform.LookAt(target);
+ }
+ }
+}
+
+function Start () {
+ // Make the rigid body not change rotation
+ if (rigidbody)
+ rigidbody.freezeRotation = true;
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js.meta b/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js.meta
new file mode 100644
index 000000000..1e6f4f69b
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/SmoothLookAt.js.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: aa021f06042324a31a24b11978e5dfc1
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs b/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs
new file mode 100644
index 000000000..7e51ba826
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs
@@ -0,0 +1,147 @@
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+
+[AddComponentMenu("2D Toolkit/Sprite/tk2dSpriteAnimator")]
+public class Teli_Animation : MonoBehaviour {
+ // Spawn point at beginning of level
+ public GameObject spawn;
+
+ // The main character's Charcter Controller
+ public CharacterController teliCharacter;
+
+ // Value of character's Y velocity to begin falling animation at
+ private float fallAnimVel = -0.25f;
+
+ // Link to animated sprite
+ private tk2dSpriteAnimator anim;
+
+ // State variable to check if player is running (running by default)
+ public bool runningP = true;
+
+ // The background music track (used to reset after death)
+ public AudioSource backgroundTrack;
+
+ // An array of notes
+ public GameObject[] Notes;
+
+ // The latest timestamp to reset music track at right checkpoint
+ float checkpoint_timestamp;
+
+ // Use this for initialization
+ void Start () {
+ // This script must be attached to the sprite to work
+ anim = GetComponent();
+
+ Notes = GameObject.FindGameObjectsWithTag("Note");
+ }
+
+ // Update is called once per frame
+ void Update () {
+ // Jump Animation
+ if (Input.GetKey(KeyCode.Space)){
+ // Only play the clip if it is not already playing.
+ // Calling play will restart the clip if it is already playing
+ if (!anim.IsPlaying("Jump")){
+ anim.Play("Jump");
+ }
+ }
+
+ // If the Player presses the punch button
+ if (Input.GetKey(KeyCode.A)){
+ // And the charcter isn't currently punching
+ if(!anim.IsPlaying("Punch")){
+ anim.Play("Punch");
+ }
+ }
+
+ // If none of the other animations are playing
+ if (!anim.IsPlaying("Run") & !anim.IsPlaying("Jump") & !anim.IsPlaying("Run_Glow") & !anim.IsPlaying("Punch") & !anim.IsPlaying("Death")){
+ // Loop running animation
+ anim.Play("Run");
+ }
+
+ // If the character is falling
+ if (teliCharacter.velocity.y < fallAnimVel){
+ // And the falling animation isn't already playing
+ if (!anim.IsPlaying("Fall")){
+ anim.Play("Fall");
+ }
+ }
+
+ // Wait to invoke death animation function until a few
+ // seconds after game has begun.
+ Invoke("DeathAnimation", 3);
+
+
+ }
+
+ // Handles death by Edges (death by obstacles is
+ // handled in ObstacleDeath() function)
+ void DeathAnimation(){
+ // If Teli's X-position stops increasing or the Y position is below level
+ if (teliCharacter.velocity.x < 1 || teliCharacter.transform.position.y < -5){
+ //Debug.Log(teliCharacter.velocity.x);
+ Debug.Log("DEATH");
+ // And the death animation isn't already playing
+ if(!anim.IsPlaying("Death")){
+ // Play the death animation
+ anim.Play("Death");
+ }
+ // Call reset function after 2 seconds
+ Invoke("Reset", 1);
+ }
+ }
+
+ // Recieve the checkpoint timestamp from ObstacleDeath.cs and set
+ // checkpoint timestamp variable to the latest checkpoint's timestamp
+ void getCheckpoint(float timestamp){
+ checkpoint_timestamp = timestamp;
+ }
+
+ // Reset Teli's position, the background track, and respawn Notes
+ void Reset(){
+ // Send a message to restart Teli's movement
+ SendMessageUpwards("death", true);
+ // Reset score to last saved score
+ SendMessageUpwards("ResetScore");
+ // Reset position to spawn
+ teliCharacter.transform.position = spawn.transform.position;
+ // Reset music
+ backgroundTrack.Stop();
+ // Set music's start time to checkpoint's start time
+ backgroundTrack.time = checkpoint_timestamp;
+ // Restart music track
+ backgroundTrack.Play();
+
+ // Reset the renderer of all Notes
+ for(int i = 0; i < Notes.Length; i++){
+ Notes[i].renderer.enabled = true;
+ }
+ }
+
+ // Hanlde Glow Animation
+ void GlowAnimation(){
+ if(!anim.IsPlaying("Run_Glow")){
+ anim.Stop();
+ anim.Play("Run_Glow");
+ }
+ }
+
+ // On death, stop movement and if the PunchAnimation isn't
+ // already playing when Death broadcast is recieved, play it.
+ void ObstacleDeath(){
+ if(!anim.IsPlaying("Punch")){
+ Debug.Log("DEATH - Wasn't punching");
+ // And the death animation isn't already playing
+ if(!anim.IsPlaying("Death")){
+ // Play the death animation
+ anim.Play("Death");
+ // Send a message to stop Teli's movement
+ SendMessageUpwards("death", false);
+ }
+ // Call reset function after 2 seconds
+ Invoke("Reset", 1);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs.meta b/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs.meta
new file mode 100644
index 000000000..803949325
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Teli_Animation.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 18f130ed13a500048b0c190346d22bc6
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts.meta b/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts.meta
new file mode 100644
index 000000000..be44f35b6
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: 5d63a1abb44ac41d39dcc41c9f3c147e
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts/CombineChildren.cs b/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts/CombineChildren.cs
new file mode 100644
index 000000000..75296c6f6
--- /dev/null
+++ b/Chromacore/Assets/Standard Assets/Scripts/Utility Scripts/CombineChildren.cs
@@ -0,0 +1,87 @@
+using UnityEngine;
+using System.Collections;
+/*
+Attach this script as a parent to some game objects. The script will then combine the meshes at startup.
+This is useful as a performance optimization since it is faster to render one big mesh than many small meshes. See the docs on graphics performance optimization for more info.
+
+Different materials will cause multiple meshes to be created, thus it is useful to share as many textures/material as you can.
+*/
+
+[AddComponentMenu("Mesh/Combine Children")]
+public class CombineChildren : MonoBehaviour {
+
+ /// Usually rendering with triangle strips is faster.
+ /// However when combining objects with very low triangle counts, it can be faster to use triangles.
+ /// Best is to try out which value is faster in practice.
+ public bool generateTriangleStrips = true;
+
+ /// This option has a far longer preprocessing time at startup but leads to better runtime performance.
+ void Start () {
+ Component[] filters = GetComponentsInChildren(typeof(MeshFilter));
+ Matrix4x4 myTransform = transform.worldToLocalMatrix;
+ Hashtable materialToMesh= new Hashtable();
+
+ for (int i=0;i() != null) {
+ EditorGUI.indentLevel++;
+
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PrefixLabel("Offset");
+ Vector2 anchorOffset = _target.AnchorOffsetPixels;
+ anchorOffset.x = EditorGUILayout.FloatField(anchorOffset.x, GUILayout.MaxWidth(60));
+ anchorOffset.y = EditorGUILayout.FloatField(anchorOffset.y, GUILayout.MaxWidth(60));
+ _target.AnchorOffsetPixels = anchorOffset;
+ GUILayout.EndHorizontal();
+
+ _target.AnchorToNativeBounds = EditorGUILayout.Toggle("To Native Bounds", _target.AnchorToNativeBounds);
+
+ EditorGUI.indentLevel--;
+ }
+
+ if (GUI.changed) {
+ _target.ForceUpdateTransform();
+ if (prevAnchorPoint != _target.AnchorPoint
+ && _target.gameObject.name == GetAnchorPointName(prevAnchorPoint)) {
+ UpdateAnchorName( _target );
+ }
+ EditorUtility.SetDirty(_target);
+ }
+ }
+
+
+ // Create tk2dCamera menu item
+ [MenuItem("GameObject/Create Other/tk2d/Camera Anchor", false, 14906)]
+ static void DoCreateCameraAnchorObject()
+ {
+ if (Selection.activeGameObject == null || Selection.activeGameObject.camera == null) {
+ EditorUtility.DisplayDialog(
+ "Camera Anchor Error",
+ "You will need to select a camera before creating an anchor attached to it",
+ "Ok");
+ }
+ else {
+ GameObject go = new GameObject("");
+ go.transform.parent = Selection.activeGameObject.transform;
+ go.transform.localPosition = new Vector3(0, 0, 10);
+ go.transform.localRotation = Quaternion.identity;
+ go.transform.localScale = Vector3.one;
+ tk2dCameraAnchor anchor = go.AddComponent();
+ anchor.AnchorCamera = Selection.activeGameObject.camera;
+ UpdateAnchorName(anchor);
+
+ EditorGUIUtility.PingObject( go );
+ Selection.activeGameObject = go;
+ }
+ }
+}
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraAnchorEditor.cs.meta b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraAnchorEditor.cs.meta
new file mode 100644
index 000000000..b15761bf6
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraAnchorEditor.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d8fa67f34deda4f00865f8e869e44146
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs
new file mode 100644
index 000000000..4f61603fb
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs
@@ -0,0 +1,748 @@
+using UnityEngine;
+using UnityEditor;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+[CustomEditor(typeof(tk2dCamera))]
+public class tk2dCameraEditor : Editor
+{
+ struct Preset
+ {
+ public string name;
+ public int width;
+ public int height;
+ public float aspect;
+ public Preset(string name, int width, int height) { this.name = name; this.width = width; this.height = height; this.aspect = (float)this.width / (float)this.height; }
+ public Preset(string name, int width, int height, float aspect) { this.name = name; this.width = width; this.height = height; this.aspect = aspect; }
+ public bool MatchAspect( float aspect ) {
+ return (width == -1 && height == -1) || Mathf.Abs(aspect - this.aspect) < 0.01f;
+ }
+ }
+
+ Preset[] presets = new Preset[] {
+ new Preset("iOS/iPhone 3G Tall", 320, 480),
+ new Preset("iOS/iPhone 3G Wide", 480, 320),
+ new Preset("iOS/iPhone 5 Tall", 640, 1136, 0.563380282f),
+ new Preset("iOS/iPhone 5 Wide", 1136, 640, 1.777777778f),
+ new Preset("iOS/iPhone 4 Tall", 640, 960),
+ new Preset("iOS/iPhone 4 Wide", 960, 640),
+ new Preset("iOS/iPad Tall", 768, 1024),
+ new Preset("iOS/iPad Wide", 1024, 768),
+ new Preset("iOS/iPad 3 Tall", 1536, 2048),
+ new Preset("iOS/iPad 3 Wide", 2048, 1536),
+
+ new Preset("Android/HTC Legend Tall", 480, 320),
+ new Preset("Android/HTC Legend Wide", 320, 480),
+ new Preset("Android/Nexus One Tall", 480, 800),
+ new Preset("Android/Nexus One Wide", 800, 480),
+ new Preset("Android/MotorolaDroidX Tall", 480, 854),
+ new Preset("Android/MotorolaDroidX Wide", 854, 480),
+ new Preset("Android/MotorolaDroidX2 Tall", 540, 960),
+ new Preset("Android/MotorolaDroidX2 Wide", 960, 540),
+ new Preset("Android/Tegra Tablet Tall", 600, 1024),
+ new Preset("Android/Tegra Tablet Wide", 1024, 600),
+ new Preset("Android/Nexus7 Tall", 800, 1280),
+ new Preset("Android/Nexus7 Wide", 1280, 800),
+
+ new Preset("TV/720p", 1280, 720),
+ new Preset("TV/1080p", 1920, 1080),
+
+ new Preset("PC/4:3", 640, 480),
+ new Preset("PC/4:3", 800, 600),
+ new Preset("PC/4:3", 1024, 768),
+
+ new Preset("Custom", -1, -1),
+ };
+
+ static int toolbarSelection = 0;
+ int refreshCount = 0;
+
+ Vector2 ResolutionControl(string label, Vector2 resolution) {
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PrefixLabel(label);
+ resolution.x = EditorGUILayout.IntField((int)resolution.x, GUILayout.Width(60));
+ GUILayout.Label("x", GUILayout.ExpandWidth(false));
+ resolution.y = EditorGUILayout.IntField((int)resolution.y, GUILayout.Width(60));
+ GUILayout.EndHorizontal();
+ return resolution;
+ }
+
+ public override void OnInspectorGUI()
+ {
+ //DrawDefaultInspector();
+ tk2dCamera _target = (tk2dCamera)target;
+
+ // sanity
+ if (_target.resolutionOverride == null)
+ {
+ _target.resolutionOverride = new tk2dCameraResolutionOverride[0];
+ GUI.changed = true;
+ }
+
+ string[] toolbarButtons = new string[] { "General", "Camera", "Overrides", "Advanced" };
+ toolbarSelection = GUILayout.Toolbar(toolbarSelection, toolbarButtons);
+ GUILayout.Space(16);
+
+ if (toolbarSelection == 0) {
+ GUILayout.BeginHorizontal();
+ tk2dCamera newInherit = EditorGUILayout.ObjectField("Inherit config", _target.InheritConfig, typeof(tk2dCamera), true) as tk2dCamera;
+ if (newInherit != _target.InheritConfig) {
+ if (newInherit != _target) {
+ _target.InheritConfig = newInherit;
+ }
+ else {
+ EditorUtility.DisplayDialog("Error", "Can't inherit from self", "Ok");
+ }
+ }
+ if (_target.InheritConfig != null && GUILayout.Button("Clear", GUILayout.ExpandWidth(false))) {
+ _target.InheritConfig = null;
+ GUI.changed = true;
+ }
+ GUILayout.EndHorizontal();
+
+ GUI.enabled = _target.SettingsRoot == _target;
+ DrawConfigGUI( _target.SettingsRoot );
+ GUI.enabled = true;
+
+ GUILayout.Space(16);
+ _target.ZoomFactor = EditorGUILayout.FloatField("Zoom factor", _target.ZoomFactor);
+ }
+
+ if (toolbarSelection == 1) {
+ DrawCameraGUI(_target, true);
+ }
+
+ if (toolbarSelection == 2) {
+ // Overrides
+ DrawOverrideGUI(_target);
+ }
+
+ if (toolbarSelection == 3) {
+
+ bool isPerspective = _target.SettingsRoot.CameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective;
+
+ EditorGUILayout.LabelField("Anchored Viewport Clipping", EditorStyles.boldLabel);
+ EditorGUI.indentLevel++;
+ if (_target.InheritConfig == null || isPerspective) {
+ _target.viewportClippingEnabled = false;
+ GUI.enabled = false;
+ EditorGUILayout.Toggle("Enable", false);
+ GUI.enabled = true;
+ if (isPerspective) {
+ tk2dGuiUtility.InfoBox("Anchored viewport clipping not allowed on perspective cameras.\n", tk2dGuiUtility.WarningLevel.Error);
+ }
+ else {
+ tk2dGuiUtility.InfoBox("Anchored viewport clipping not allowed on this camera.\nAttach a link to a camera which displays the entire screen to enable viewport clipping.", tk2dGuiUtility.WarningLevel.Error);
+ }
+ }
+ else {
+ _target.viewportClippingEnabled = EditorGUILayout.Toggle("Enable", _target.viewportClippingEnabled);
+ if (_target.viewportClippingEnabled) {
+ EditorGUILayout.LabelField("Region");
+ EditorGUI.indentLevel++;
+ _target.viewportRegion.x = EditorGUILayout.IntField("X", (int)_target.viewportRegion.x);
+ _target.viewportRegion.y = EditorGUILayout.IntField("Y", (int)_target.viewportRegion.y);
+ _target.viewportRegion.z = EditorGUILayout.IntField("Width", (int)_target.viewportRegion.z);
+ _target.viewportRegion.w = EditorGUILayout.IntField("Height", (int)_target.viewportRegion.w);
+ EditorGUI.indentLevel--;
+ }
+ }
+ EditorGUI.indentLevel--;
+ }
+
+ if (GUI.changed)
+ {
+ _target.UpdateCameraMatrix();
+ EditorUtility.SetDirty(target);
+ tk2dCameraAnchor[] allAlignmentObjects = GameObject.FindObjectsOfType(typeof(tk2dCameraAnchor)) as tk2dCameraAnchor[];
+ foreach (var v in allAlignmentObjects)
+ {
+ EditorUtility.SetDirty(v);
+ }
+ }
+
+ GUILayout.Space(16.0f);
+ }
+
+ void DrawConfigGUI(tk2dCamera _target) {
+ bool cameraOverrideChanged = false;
+ GUILayout.Space(8);
+
+ // Game view stuff
+ float gameViewPixelWidth = 0, gameViewPixelHeight = 0;
+ float gameViewAspect = 0;
+ bool gameViewFound = tk2dCamera.Editor__GetGameViewSize( out gameViewPixelWidth, out gameViewPixelHeight, out gameViewAspect);
+ bool gameViewReflectionError = tk2dCamera.Editor__gameViewReflectionError;
+ bool gameViewResolutionSet = (gameViewFound && gameViewPixelWidth != 0 && gameViewPixelHeight != 0);
+ if (!gameViewFound && ++refreshCount < 3) {
+ HandleUtility.Repaint();
+ }
+
+ // Native resolution
+ Vector2 nativeRes = new Vector2(_target.nativeResolutionWidth, _target.nativeResolutionHeight);
+ EditorGUI.BeginChangeCheck();
+ nativeRes = ResolutionControl("Native Resolution", nativeRes);
+ if (EditorGUI.EndChangeCheck()) {
+ _target.nativeResolutionWidth = (int)nativeRes.x;
+ _target.nativeResolutionHeight = (int)nativeRes.y;
+ }
+
+ // Preview resolution
+ if (gameViewFound && gameViewResolutionSet) {
+ if (_target.forceResolutionInEditor == false || _target.forceResolution.x != gameViewPixelWidth || _target.forceResolution.y != gameViewPixelHeight) {
+ _target.forceResolutionInEditor = true;
+ _target.forceResolution.Set( gameViewPixelWidth, gameViewPixelHeight );
+ GUI.changed = true;
+ }
+
+ ResolutionControl("Preview Resolution", _target.forceResolution);
+ }
+ else {
+ EditorGUILayout.LabelField("Preview Resolution");
+ EditorGUI.indentLevel++;
+
+ GUIContent toggleLabel = new GUIContent("Force Resolution",
+ "When enabled, forces the resolution in the editor regardless of the size of the game window.");
+
+ if (gameViewReflectionError) {
+ EditorGUILayout.HelpBox("Game window resolution can't be detected.\n\n" +
+ "tk2dCamera can't detect the game view resolution, possibly because of a Unity upgrade. You might need a 2D Toolkit update, or alternatively pick a resolution below.\n", MessageType.Error);
+ }
+ else if (gameViewFound) {
+ EditorGUILayout.HelpBox("Game window has an aspect ratio selected.\n\n" +
+ "tk2dCamera doesn't know your preview resolution, select from the list below, or pick a resolution in the game view instead.\n", MessageType.Info);
+ }
+ else {
+ EditorGUILayout.HelpBox("Unable to detect game window resolution.\n\n" +
+ "Ensure that the game window resolution is set, instead of selecting Free Aspect.\n", MessageType.Error);
+ }
+
+ tk2dGuiUtility.BeginChangeCheck();
+ _target.forceResolutionInEditor = EditorGUILayout.Toggle(toggleLabel, _target.forceResolutionInEditor);
+ if (tk2dGuiUtility.EndChangeCheck()) cameraOverrideChanged = true;
+
+ if (_target.forceResolutionInEditor)
+ {
+ tk2dGuiUtility.BeginChangeCheck();
+
+ List presetList = null;
+ if (gameViewFound) {
+ presetList = new List(from t in presets where t.MatchAspect( gameViewAspect ) select t);
+ }
+ else {
+ presetList = new List( presets );
+ }
+
+ int currentSelectedResolution = presetList.FindIndex( x => x.width == _target.forceResolution.x && x.height == _target.forceResolution.y );
+ if (currentSelectedResolution == -1) {
+ currentSelectedResolution = presetList.Count - 1;
+ }
+
+ string[] presetNames = (from t in presetList select t.name).ToArray();
+ int selectedResolution = EditorGUILayout.Popup("Preset", currentSelectedResolution, presetNames);
+ if (selectedResolution != presetList.Count && selectedResolution != currentSelectedResolution)
+ {
+ var preset = presetList[selectedResolution];
+ _target.forceResolution.x = preset.width;
+ _target.forceResolution.y = preset.height;
+ GUI.changed = true;
+ }
+
+ if (gameViewFound // we only want to display warning when a resolution hasn't been selected from the list of known res / aspects
+ && currentSelectedResolution == presetList.Count - 1) {
+ float targetAspect = _target.forceResolution.y / Mathf.Max(_target.forceResolution.x, 0.01f);
+ if (Mathf.Abs(targetAspect - gameViewAspect) > 0.01f) {
+ EditorGUILayout.HelpBox("The preview resolution looks incorrect.\n\n" +
+ "It looks like you've selected a preview resolution that doesn't match the game view aspect ratio.\n", MessageType.Error);
+ }
+ }
+
+ _target.forceResolution.x = EditorGUILayout.IntField("Width", (int)_target.forceResolution.x);
+ _target.forceResolution.y = EditorGUILayout.IntField("Height", (int)_target.forceResolution.y);
+
+ // clamp to a sensible value
+ _target.forceResolution.x = Mathf.Max(_target.forceResolution.x, 50);
+ _target.forceResolution.y = Mathf.Max(_target.forceResolution.y, 50);
+
+ if (tk2dGuiUtility.EndChangeCheck())
+ cameraOverrideChanged = true;
+ }
+ else
+ {
+ EditorGUILayout.FloatField("Width", _target.TargetResolution.x);
+ EditorGUILayout.FloatField("Height", _target.TargetResolution.y);
+ }
+ EditorGUI.indentLevel--;
+
+ }
+
+ // Camera GUI is not available when inheriting configuration
+ GUILayout.Space(16);
+ DrawCameraGUI(_target, false);
+
+
+ if (cameraOverrideChanged) {
+ // Propagate values to all tk2dCameras in scene
+ tk2dCamera[] otherCameras = Resources.FindObjectsOfTypeAll(typeof(tk2dCamera)) as tk2dCamera[];
+ foreach (tk2dCamera thisCamera in otherCameras)
+ {
+ thisCamera.forceResolutionInEditor = _target.forceResolutionInEditor;
+ thisCamera.forceResolution = _target.forceResolution;
+ thisCamera.UpdateCameraMatrix();
+ }
+
+ // Update all anchors after that
+ tk2dCameraAnchor[] anchors = Resources.FindObjectsOfTypeAll(typeof(tk2dCameraAnchor)) as tk2dCameraAnchor[];
+ foreach (var anchor in anchors)
+ anchor.ForceUpdateTransform();
+ }
+ }
+
+ void DrawCameraGUI(tk2dCamera target, bool complete) {
+ bool allowProjectionParameters = target.SettingsRoot == target;
+ bool oldGuiEnabled = GUI.enabled;
+
+ SerializedObject so = this.serializedObject;
+ SerializedObject cam = new SerializedObject( target.camera );
+
+ SerializedProperty m_ClearFlags = cam.FindProperty("m_ClearFlags");
+ SerializedProperty m_BackGroundColor = cam.FindProperty("m_BackGroundColor");
+ SerializedProperty m_CullingMask = cam.FindProperty("m_CullingMask");
+ SerializedProperty m_TargetTexture = cam.FindProperty("m_TargetTexture");
+ SerializedProperty m_Near = cam.FindProperty("near clip plane");
+ SerializedProperty m_Far = cam.FindProperty("far clip plane");
+ SerializedProperty m_Depth = cam.FindProperty("m_Depth");
+ SerializedProperty m_RenderingPath = cam.FindProperty("m_RenderingPath");
+ SerializedProperty m_HDR = cam.FindProperty("m_HDR");
+ TransparencySortMode transparencySortMode = target.camera.transparencySortMode;
+
+ if (complete) {
+ EditorGUILayout.PropertyField( m_ClearFlags );
+ EditorGUILayout.PropertyField( m_BackGroundColor );
+ EditorGUILayout.PropertyField( m_CullingMask );
+ EditorGUILayout.Space();
+ }
+
+ tk2dCameraSettings cameraSettings = target.CameraSettings;
+ tk2dCameraSettings inheritedSettings = target.SettingsRoot.CameraSettings;
+
+ GUI.enabled &= allowProjectionParameters;
+ inheritedSettings.projection = (tk2dCameraSettings.ProjectionType)EditorGUILayout.EnumPopup("Projection", inheritedSettings.projection);
+ EditorGUI.indentLevel++;
+ if (inheritedSettings.projection == tk2dCameraSettings.ProjectionType.Orthographic) {
+ inheritedSettings.orthographicType = (tk2dCameraSettings.OrthographicType)EditorGUILayout.EnumPopup("Type", inheritedSettings.orthographicType);
+ switch (inheritedSettings.orthographicType) {
+ case tk2dCameraSettings.OrthographicType.OrthographicSize:
+ inheritedSettings.orthographicSize = Mathf.Max( 0.001f, EditorGUILayout.FloatField("Orthographic Size", inheritedSettings.orthographicSize) );
+ break;
+ case tk2dCameraSettings.OrthographicType.PixelsPerMeter:
+ inheritedSettings.orthographicPixelsPerMeter = Mathf.Max( 0.001f, EditorGUILayout.FloatField("Pixels per Meter", inheritedSettings.orthographicPixelsPerMeter) );
+ break;
+ }
+ inheritedSettings.orthographicOrigin = (tk2dCameraSettings.OrthographicOrigin)EditorGUILayout.EnumPopup("Origin", inheritedSettings.orthographicOrigin);
+ }
+ else if (inheritedSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ inheritedSettings.fieldOfView = EditorGUILayout.Slider("Field of View", inheritedSettings.fieldOfView, 1, 179);
+ transparencySortMode = (TransparencySortMode)EditorGUILayout.EnumPopup("Sort mode", transparencySortMode);
+ }
+ EditorGUI.indentLevel--;
+ GUI.enabled = oldGuiEnabled;
+
+ if (complete) {
+ EditorGUILayout.Space();
+ GUILayout.Label("Clipping Planes");
+ GUILayout.BeginHorizontal();
+ GUILayout.Space(14);
+ GUILayout.Label("Near");
+ if (m_Near != null) EditorGUILayout.PropertyField(m_Near, GUIContent.none, GUILayout.Width(60) );
+ GUILayout.Label("Far");
+ if (m_Far != null) EditorGUILayout.PropertyField(m_Far, GUIContent.none, GUILayout.Width(60) );
+ GUILayout.EndHorizontal();
+ cameraSettings.rect = EditorGUILayout.RectField("Normalized View Port Rect", cameraSettings.rect);
+
+ EditorGUILayout.Space();
+ if (m_Depth != null) EditorGUILayout.PropertyField(m_Depth);
+ if (m_RenderingPath != null) EditorGUILayout.PropertyField(m_RenderingPath);
+ if (m_TargetTexture != null) EditorGUILayout.PropertyField(m_TargetTexture);
+ if (m_HDR != null) EditorGUILayout.PropertyField(m_HDR);
+ }
+
+ cam.ApplyModifiedProperties();
+ so.ApplyModifiedProperties();
+
+ if (transparencySortMode != target.camera.transparencySortMode) {
+ target.camera.transparencySortMode = transparencySortMode;
+ EditorUtility.SetDirty(target.camera);
+ }
+ }
+
+ void DrawToolsGUI() {
+ EditorGUILayout.LabelField("Tools", EditorStyles.boldLabel);
+ EditorGUILayout.BeginHorizontal(GUILayout.ExpandWidth(true));
+ if (GUILayout.Button("Create Anchor", EditorStyles.miniButton, GUILayout.ExpandWidth(false)))
+ {
+ tk2dCamera cam = (tk2dCamera)target;
+
+ GameObject go = new GameObject("Anchor");
+ go.transform.parent = cam.transform;
+ tk2dCameraAnchor cameraAnchor = go.AddComponent();
+ cameraAnchor.AnchorCamera = cam.camera;
+ tk2dCameraAnchorEditor.UpdateAnchorName( cameraAnchor );
+
+ EditorGUIUtility.PingObject(go);
+ }
+ EditorGUILayout.EndHorizontal();
+ }
+
+ void DrawOverrideGUI(tk2dCamera _camera) {
+ var frameBorderStyle = EditorStyles.textField;
+
+ EditorGUIUtility.LookLikeControls(64);
+
+ tk2dCamera _target = _camera.SettingsRoot;
+ if (_target.CameraSettings.projection == tk2dCameraSettings.ProjectionType.Perspective) {
+ tk2dGuiUtility.InfoBox("Overrides not supported with perspective camera.", tk2dGuiUtility.WarningLevel.Info);
+ }
+ else {
+ GUI.enabled = _target == _camera;
+
+ tk2dCameraResolutionOverride usedOverride = _target.CurrentResolutionOverride;
+
+ if (_target.resolutionOverride.Length == 0) {
+ EditorGUILayout.HelpBox("There are no overrides on this tk2dCamera.\n\nThe camera will always scale itself to be pixel perfect at any resolution. " +
+ "Add an override if you wish to change this behaviour.", MessageType.Warning);
+ }
+ else {
+ EditorGUILayout.HelpBox("Matching is performed from top to bottom. The first override matching the current resolution will be used.", MessageType.Info);
+ }
+
+ System.Action deferredAction = null;
+ for (int i = 0; i < _target.resolutionOverride.Length; ++i)
+ {
+ tk2dCameraResolutionOverride ovr = _target.resolutionOverride[i];
+
+ EditorGUILayout.BeginVertical(frameBorderStyle);
+ GUILayout.Space(8);
+ GUILayout.BeginHorizontal();
+ ovr.name = EditorGUILayout.TextField("Name", ovr.name);
+
+ GUI.enabled = (i != _target.resolutionOverride.Length - 1);
+ if (GUILayout.Button("", tk2dEditorSkin.SimpleButton("btn_down")))
+ {
+ int idx = i;
+ deferredAction = delegate(int q) {
+ _target.resolutionOverride[idx] = _target.resolutionOverride[idx+1];
+ _target.resolutionOverride[idx+1] = ovr;
+ };
+ }
+
+ GUI.enabled = (i != 0);
+ if (GUILayout.Button("", tk2dEditorSkin.SimpleButton("btn_up")))
+ {
+ int idx = i;
+ deferredAction = delegate(int q) {
+ _target.resolutionOverride[idx] = _target.resolutionOverride[idx-1];
+ _target.resolutionOverride[idx-1] = ovr;
+ };
+ }
+
+ GUI.enabled = true;
+ if (GUILayout.Button("", tk2dEditorSkin.GetStyle("TilemapDeleteItem"))) {
+ int idx = i;
+ deferredAction = delegate(int q) {
+ List list = new List(_target.resolutionOverride);
+ list.RemoveAt(idx);
+ _target.resolutionOverride = list.ToArray();
+ };
+ }
+
+ GUILayout.EndHorizontal();
+
+ ovr.matchBy = (tk2dCameraResolutionOverride.MatchByType)EditorGUILayout.EnumPopup("Match By", ovr.matchBy);
+
+ int tmpIndent = EditorGUI.indentLevel;
+ EditorGUI.indentLevel = 0;
+ switch (ovr.matchBy) {
+ case tk2dCameraResolutionOverride.MatchByType.Wildcard:
+ break;
+ case tk2dCameraResolutionOverride.MatchByType.Resolution:
+ Vector2 res = new Vector2(ovr.width, ovr.height);
+ res = ResolutionControl(" ", res);
+ ovr.width = (int)res.x;
+ ovr.height = (int)res.y;
+ break;
+ case tk2dCameraResolutionOverride.MatchByType.AspectRatio:
+ GUILayout.BeginHorizontal();
+ EditorGUILayout.PrefixLabel(" ");
+ ovr.aspectRatioNumerator = EditorGUILayout.FloatField(ovr.aspectRatioNumerator, GUILayout.Width(40));
+ GUILayout.Label(":", GUILayout.ExpandWidth(false));
+ ovr.aspectRatioDenominator = EditorGUILayout.FloatField(ovr.aspectRatioDenominator, GUILayout.Width(40));
+ GUILayout.EndHorizontal();
+ break;
+ }
+ EditorGUI.indentLevel = tmpIndent;
+
+ ovr.autoScaleMode = (tk2dCameraResolutionOverride.AutoScaleMode)EditorGUILayout.EnumPopup("Auto Scale", ovr.autoScaleMode);
+ if (ovr.autoScaleMode == tk2dCameraResolutionOverride.AutoScaleMode.None)
+ {
+ EditorGUI.indentLevel++;
+ ovr.scale = EditorGUILayout.FloatField("Scale", ovr.scale);
+ EditorGUI.indentLevel--;
+ }
+ if (ovr.autoScaleMode == tk2dCameraResolutionOverride.AutoScaleMode.StretchToFit)
+ {
+ string msg = "The native resolution image will be stretched to fit the target display. " +
+ "Image quality will suffer if non-uniform scaling occurs.";
+ tk2dGuiUtility.InfoBox(msg, tk2dGuiUtility.WarningLevel.Info);
+ }
+ else
+ {
+ ovr.fitMode = (tk2dCameraResolutionOverride.FitMode)EditorGUILayout.EnumPopup("Fit Mode", ovr.fitMode);
+ if (ovr.fitMode == tk2dCameraResolutionOverride.FitMode.Constant)
+ {
+ EditorGUI.indentLevel++;
+ ovr.offsetPixels.x = EditorGUILayout.FloatField("X", ovr.offsetPixels.x);
+ ovr.offsetPixels.y = EditorGUILayout.FloatField("Y", ovr.offsetPixels.y);
+ EditorGUI.indentLevel--;
+ }
+ }
+ GUILayout.Space(4);
+
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ if (ovr == usedOverride) {
+ GUI.color = Color.green;
+ GUIContent content = new GUIContent("ACTIVE", "The active override is the one that matches the current resolution, and is being used in the tk2dCamera game window.");
+ GUILayout.Label(content, EditorStyles.miniBoldLabel, GUILayout.ExpandWidth(false));
+ GUI.color = Color.white;
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+
+ EditorGUILayout.EndVertical();
+ }
+
+ if (deferredAction != null)
+ {
+ deferredAction(0);
+ GUI.changed = true;
+ Repaint();
+ }
+
+ EditorGUILayout.BeginVertical(frameBorderStyle);
+ GUILayout.Space(32);
+ GUILayout.BeginHorizontal();
+ GUILayout.FlexibleSpace();
+ if (GUILayout.Button("Add override", GUILayout.ExpandWidth(false)))
+ {
+ tk2dCameraResolutionOverride ovr = new tk2dCameraResolutionOverride();
+ ovr.name = "New override";
+ ovr.matchBy = tk2dCameraResolutionOverride.MatchByType.Wildcard;
+ ovr.autoScaleMode = tk2dCameraResolutionOverride.AutoScaleMode.FitVisible;
+ ovr.fitMode = tk2dCameraResolutionOverride.FitMode.Center;
+ System.Array.Resize(ref _target.resolutionOverride, _target.resolutionOverride.Length + 1);
+ _target.resolutionOverride[_target.resolutionOverride.Length - 1] = ovr;
+ GUI.changed = true;
+ }
+ GUILayout.FlexibleSpace();
+ GUILayout.EndHorizontal();
+ GUILayout.Space(32);
+ EditorGUILayout.EndVertical();
+
+ GUI.enabled = true;
+ }
+ }
+
+ // Scene GUI handler - draws custom preview window, working around Unity bug
+ tk2dEditor.tk2dCameraSceneGUI sceneGUIHandler = null;
+
+ void OnDisable()
+ {
+ if (sceneGUIHandler != null)
+ {
+ sceneGUIHandler.Destroy();
+ sceneGUIHandler = null;
+ }
+ }
+
+ static Vector3[] viewportBoxPoints = new Vector3[] {
+ new Vector3(-1, -1, -1), new Vector3( 1, -1, -1), new Vector3( 1, 1, -1), new Vector3(-1, 1, -1), new Vector3(-1, -1, 1), new Vector3( 1, -1, 1), new Vector3( 1, 1, 1), new Vector3(-1, 1, 1),
+ };
+ static int[] viewportBoxIndices = new int[] {
+ 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 3, 7, 2, 6,
+ };
+ static Vector3[] transformedViewportBoxPoints = new Vector3[8];
+
+ static void DrawCameraBounds( Matrix4x4 worldToCamera, Matrix4x4 projectionMatrix ) {
+ Matrix4x4 m = worldToCamera.inverse * projectionMatrix.inverse;
+ for (int i = 0; i < viewportBoxPoints.Length; ++i) {
+ transformedViewportBoxPoints[i] = m.MultiplyPoint( viewportBoxPoints[i] );
+ }
+ for (int i = 0; i < viewportBoxIndices.Length; i += 2) {
+ Handles.DrawLine(transformedViewportBoxPoints[viewportBoxIndices[i]], transformedViewportBoxPoints[viewportBoxIndices[i + 1]]);
+ }
+ }
+
+ void OnSceneGUI()
+ {
+ tk2dCamera target = this.target as tk2dCamera;
+ Handles.color = new Color32(255,255,255,255);
+ DrawCameraBounds( target.camera.worldToCameraMatrix, target.Editor__GetFinalProjectionMatrix() );
+ Handles.color = new Color32(55,203,105,102);
+ DrawCameraBounds( target.camera.worldToCameraMatrix, target.Editor__GetNativeProjectionMatrix() );
+
+
+ Handles.color = Color.white;
+
+ // Draw scene gui
+ if (sceneGUIHandler == null)
+ sceneGUIHandler = new tk2dEditor.tk2dCameraSceneGUI();
+ sceneGUIHandler.OnSceneGUI(target);
+ }
+
+ [MenuItem("CONTEXT/tk2dCamera/Toggle unity camera")]
+ static void ToggleUnityCamera() {
+ if (Selection.gameObjects.Length == 1) {
+ Camera c = Selection.activeGameObject.GetComponent();
+ if ((c.hideFlags & HideFlags.HideInInspector) != 0) {
+ c.hideFlags &= ~(HideFlags.HideInHierarchy | HideFlags.HideInInspector);
+ }
+ else {
+ c.hideFlags |= HideFlags.HideInHierarchy | HideFlags.HideInInspector;
+ }
+ }
+ }
+
+
+ // Create tk2dCamera menu item
+ [MenuItem("GameObject/Create Other/tk2d/Camera", false, 14905)]
+ static void DoCreateCameraObject()
+ {
+ bool setAsMain = (Camera.main == null);
+
+ Camera[] allCameras = Object.FindObjectsOfType(typeof(Camera)) as Camera[];
+ foreach (Camera cam in allCameras) {
+ if (cam.cullingMask == -1) {
+ Debug.LogError(string.Format("Camera: {0} has Culling Mask set to Everything. This will cause the scene to be drawn multiple times. Did you mean to do this?", cam.name ));
+ }
+ }
+
+ GameObject go = tk2dEditorUtility.CreateGameObjectInScene("tk2dCamera");
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ go.active = false;
+#else
+ go.SetActive(false);
+#endif
+ go.transform.position = new Vector3(0, 0, -10.0f);
+ Camera camera = go.AddComponent();
+ camera.orthographic = true;
+ camera.orthographicSize = 480.0f; // arbitrary large number
+ camera.farClipPlane = 1000.0f;
+ camera.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector;
+ tk2dCamera newCamera = go.AddComponent();
+ newCamera.version = 1;
+ go.AddComponent("FlareLayer");
+ go.AddComponent("GUILayer");
+ if (Object.FindObjectsOfType(typeof(AudioListener)).Length == 0) {
+ go.AddComponent();
+ }
+
+#if UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9
+ go.active = true;
+#else
+ go.SetActive(true);
+#endif
+
+
+ // Set as main camera if Camera.main is not set
+ if (setAsMain)
+ go.tag = "MainCamera";
+
+ Selection.activeGameObject = go;
+ Undo.RegisterCreatedObjectUndo(go, "Create tk2dCamera");
+ }
+}
+
+
+// tk2dCameraSceneGUI - Enacapsulates the scene GUI implementation
+// This is a workaround while Unity fixes the bug in the tk2dCamera code
+// This is also the reason its in the same file - it will simply be defined
+// when unity fix the bug and not leave an extra file in the file system
+namespace tk2dEditor
+{
+ public class tk2dCameraSceneGUI
+ {
+ public void Destroy()
+ {
+ if (previewCamera != null)
+ {
+ Object.DestroyImmediate(previewCamera.gameObject);
+ previewCamera = null;
+ }
+ }
+
+ void PreviewWindowFunc(int windowId)
+ {
+ GUILayout.BeginVertical();
+ Rect rs = GUILayoutUtility.GetRect(1.0f, 1.0f, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));
+
+ switch (Event.current.type)
+ {
+ case EventType.Repaint:
+ {
+ int heightTweak = 19;
+ Rect r = new Rect(previewWindowRect.x + rs.x, Camera.current.pixelHeight - (previewWindowRect.y + rs.y), rs.width, rs.height);
+ Vector2 v = new Vector2(previewWindowRect.x + rs.x, (Camera.current.pixelHeight - previewWindowRect.y - rs.height - heightTweak) + rs.y);
+ previewCamera.CopyFrom(target.camera);
+ previewCamera.projectionMatrix = target.Editor__GetFinalProjectionMatrix(); // Work around a Unity bug
+ previewCamera.pixelRect = new Rect(v.x, v.y, r.width, r.height);
+ previewCamera.Render();
+ break;
+ }
+ }
+
+ GUILayout.EndVertical();
+ }
+
+ public void OnSceneGUI(tk2dCamera target)
+ {
+ this.target = target;
+
+ if (previewCamera == null)
+ {
+ GameObject go = EditorUtility.CreateGameObjectWithHideFlags("@tk2dCamera_ScenePreview", UnityEngine.HideFlags.HideAndDontSave, new System.Type[] { typeof(Camera) } );
+ previewCamera = go.camera;
+ previewCamera.enabled = false;
+ }
+
+ Vector2 resolution = target.TargetResolution;
+
+ float maxHeight = Screen.height / 5;
+ float fWidth, fHeight;
+ fHeight = maxHeight;
+ fWidth = resolution.x / resolution.y * maxHeight;
+
+ int windowDecorationWidth = 11;
+ int windowDecorationHeight = 24;
+ int width = (int)fWidth + windowDecorationWidth;
+ int height = (int)fHeight + windowDecorationHeight;
+
+ string windowCaption = "tk2dCamera";
+ if (width > 200)
+ windowCaption += string.Format(" ({0:0} x {1:0})", resolution.x, resolution.y);
+
+ int viewportOffsetLeft = 10;
+ int viewportOffsetBottom = -8;
+ previewWindowRect = new Rect(viewportOffsetLeft, Camera.current.pixelHeight - height - viewportOffsetBottom, width, height);
+ Handles.BeginGUI();
+ GUI.Window("tk2dCamera Preview".GetHashCode(), previewWindowRect, PreviewWindowFunc, windowCaption);
+ Handles.EndGUI();
+ }
+
+ tk2dCamera target;
+
+ Camera previewCamera = null;
+ Rect previewWindowRect;
+ }
+}
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs.meta b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs.meta
new file mode 100644
index 000000000..fa5362847
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Camera/tk2dCameraEditor.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: eb0a122c8e20f43468621440ebc9bc90
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader b/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader
new file mode 100644
index 000000000..59f579081
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader
@@ -0,0 +1,52 @@
+Shader "Hidden/tk2d/EditorUtility"
+{
+ SubShader
+ {
+ Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
+ ZTest Always ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend SrcAlpha OneMinusSrcAlpha AlphaTest Greater 0
+ LOD 110
+
+ Pass
+ {
+ CGPROGRAM
+ #pragma vertex vert_vct
+ #pragma fragment frag_mult
+ #include "UnityCG.cginc"
+
+ sampler2D _MainTex;
+ float4 _Tint = float4(1,1,1,1);
+ float4 _Clip;
+
+ struct vin_vct
+ {
+ float4 vertex : POSITION;
+ float2 texcoord : TEXCOORD0;
+ };
+
+ struct v2f_vct
+ {
+ float4 vertex : POSITION;
+ float2 texcoord : TEXCOORD0;
+ float2 w : TEXCOORD1;
+ };
+
+ v2f_vct vert_vct(vin_vct v)
+ {
+ v2f_vct o;
+ o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
+ o.texcoord = v.texcoord;
+ o.w = mul(UNITY_MATRIX_MV, v.vertex).xy;
+ return o;
+ }
+
+ fixed4 frag_mult(v2f_vct i) : COLOR
+ {
+ fixed4 col = tex2D(_MainTex, i.texcoord) * _Tint;
+ if (i.w.x < _Clip.x || i.w.x > _Clip.z || i.w.y < _Clip.y || i.w.y > _Clip.w) col.a = 0;
+ return col;
+ }
+
+ ENDCG
+ }
+ }
+}
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader.meta b/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader.meta
new file mode 100644
index 000000000..096937484
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/EditorUtility.shader.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: b99ccc7a8e0d047b5ba9f0707126a407
+ShaderImporter:
+ defaultTextures: []
+ userData:
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts.meta b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts.meta
new file mode 100644
index 000000000..e35ef5ec7
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts.meta
@@ -0,0 +1,5 @@
+fileFormatVersion: 2
+guid: d2b57c2c1833921419031b7a824a5a00
+folderAsset: yes
+DefaultImporter:
+ userData:
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs
new file mode 100644
index 000000000..5b0d0745c
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs
@@ -0,0 +1,452 @@
+using UnityEngine;
+using UnityEditor;
+using System.Collections.Generic;
+using System.Xml;
+
+namespace tk2dEditor.Font
+{
+ // Internal structures to fill and process
+ public class Char
+ {
+ public int id = 0, x = 0, y = 0, width = 0, height = 0, xoffset = 0, yoffset = 0, xadvance = 0;
+
+ public int texOffsetX, texOffsetY;
+ public int texX, texY, texW, texH;
+ public bool texFlipped;
+ public bool texOverride;
+ public int channel = 0;
+ };
+
+ public class Kerning
+ {
+ public int first = 0, second = 0, amount = 0;
+ };
+
+ public class Info
+ {
+ public string[] texturePaths = new string[0];
+ public int scaleW = 0, scaleH = 0;
+ public int lineHeight = 0;
+ public int numPages = 0;
+ public bool isPacked = false;
+ public float textureScale = 1;
+
+ public List chars = new List();
+ public List kernings = new List();
+ };
+
+ class BMFontXmlImporter
+ {
+ static int ReadIntAttribute(XmlNode node, string attribute)
+ {
+ return int.Parse(node.Attributes[attribute].Value, System.Globalization.NumberFormatInfo.InvariantInfo);
+ }
+ static float ReadFloatAttribute(XmlNode node, string attribute)
+ {
+ return float.Parse(node.Attributes[attribute].Value, System.Globalization.NumberFormatInfo.InvariantInfo);
+ }
+ static string ReadStringAttribute(XmlNode node, string attribute)
+ {
+ return node.Attributes[attribute].Value;
+ }
+ static Vector2 ReadVector2Attributes(XmlNode node, string attributeX, string attributeY)
+ {
+ return new Vector2(ReadFloatAttribute(node, attributeX), ReadFloatAttribute(node, attributeY));
+ }
+ static bool HasAttribute(XmlNode node, string attribute)
+ {
+ return node.Attributes[attribute] != null;
+ }
+
+ public static Info Parse(string path)
+ {
+ XmlDocument doc = new XmlDocument();
+ doc.Load(path);
+ Info fontInfo = new Info();
+
+ XmlNode nodeCommon = doc.SelectSingleNode("/font/common");
+ fontInfo.scaleW = ReadIntAttribute(nodeCommon, "scaleW");
+ fontInfo.scaleH = ReadIntAttribute(nodeCommon, "scaleH");
+ fontInfo.lineHeight = ReadIntAttribute(nodeCommon, "lineHeight");
+ int pages = ReadIntAttribute(nodeCommon, "pages");
+ if (pages != 1)
+ {
+ EditorUtility.DisplayDialog("Fatal error", "Only one page supported in font. Please change the setting and re-export.", "Ok");
+ return null;
+ }
+ fontInfo.numPages = pages;
+ fontInfo.texturePaths = new string[pages];
+ for (int i = 0; i < pages; ++i) fontInfo.texturePaths[i] = string.Empty;
+
+ foreach (XmlNode node in doc.SelectNodes("/font/pages/page"))
+ {
+ int id = ReadIntAttribute(node, "id");
+ fontInfo.texturePaths[id] = ReadStringAttribute(node, "file");
+ }
+
+ foreach (XmlNode node in doc.SelectNodes(("/font/chars/char")))
+ {
+ Char thisChar = new Char();
+ thisChar.id = ReadIntAttribute(node, "id");
+ thisChar.x = ReadIntAttribute(node, "x");
+ thisChar.y = ReadIntAttribute(node, "y");
+ thisChar.width = ReadIntAttribute(node, "width");
+ thisChar.height = ReadIntAttribute(node, "height");
+ thisChar.xoffset = ReadIntAttribute(node, "xoffset");
+ thisChar.yoffset = ReadIntAttribute(node, "yoffset");
+ thisChar.xadvance = ReadIntAttribute(node, "xadvance");
+
+ thisChar.texOverride = false;
+
+ if (thisChar.id == -1) thisChar.id = 0;
+ fontInfo.chars.Add(thisChar);
+ }
+
+ foreach (XmlNode node in doc.SelectNodes("/font/kernings/kerning"))
+ {
+ Kerning thisKerning = new Kerning();
+ thisKerning.first = ReadIntAttribute(node, "first");
+ thisKerning.second = ReadIntAttribute(node, "second");
+ thisKerning.amount = ReadIntAttribute(node, "amount");
+
+ fontInfo.kernings.Add(thisKerning);
+ }
+
+ return fontInfo;
+ }
+ }
+
+ class BMFontTextImporter
+ {
+ static string FindKeyValue(string[] tokens, string key)
+ {
+ string keyMatch = key + "=";
+ for (int i = 0; i < tokens.Length; ++i)
+ {
+ if (tokens[i].Length > keyMatch.Length && tokens[i].Substring(0, keyMatch.Length) == keyMatch)
+ return tokens[i].Substring(keyMatch.Length);
+ }
+
+ return "";
+ }
+
+ public static Info Parse(string path)
+ {
+ Info fontInfo = new Info();
+
+ System.IO.FileInfo finfo = new System.IO.FileInfo(path);
+ System.IO.StreamReader reader = finfo.OpenText();
+ string line;
+ while ((line = reader.ReadLine()) != null)
+ {
+ string[] tokens = line.Split( ' ' );
+
+ if (tokens[0] == "common")
+ {
+ fontInfo.lineHeight = int.Parse( FindKeyValue(tokens, "lineHeight") );
+ fontInfo.scaleW = int.Parse( FindKeyValue(tokens, "scaleW") );
+ fontInfo.scaleH = int.Parse( FindKeyValue(tokens, "scaleH") );
+ int pages = int.Parse( FindKeyValue(tokens, "pages") );
+ if (pages != 1)
+ {
+ EditorUtility.DisplayDialog("Fatal error", "Only one page supported in font. Please change the setting and re-export.", "Ok");
+ return null;
+ }
+ fontInfo.numPages = pages;
+ if (FindKeyValue(tokens, "packed") != "")
+ fontInfo.isPacked = int.Parse(FindKeyValue(tokens, "packed")) != 0;
+ fontInfo.texturePaths = new string[pages];
+ for (int i = 0 ; i < pages; ++i)
+ fontInfo.texturePaths[i] = string.Empty;
+ }
+ else if (tokens[0] == "page")
+ {
+ int id = int.Parse(FindKeyValue(tokens, "id"));
+ string file = FindKeyValue(tokens, "file");
+ if (file[0] == '"' && file[file.Length - 1] == '"')
+ file = file.Substring(1, file.Length - 2);
+ fontInfo.texturePaths[id] = file;
+ }
+ else if (tokens[0] == "char")
+ {
+ Char thisChar = new Char();
+ thisChar.id = int.Parse(FindKeyValue(tokens, "id"));
+ thisChar.x = int.Parse(FindKeyValue(tokens, "x"));
+ thisChar.y = int.Parse(FindKeyValue(tokens, "y"));
+ thisChar.width = int.Parse(FindKeyValue(tokens, "width"));
+ thisChar.height = int.Parse(FindKeyValue(tokens, "height"));
+ thisChar.xoffset = int.Parse(FindKeyValue(tokens, "xoffset"));
+ thisChar.yoffset = int.Parse(FindKeyValue(tokens, "yoffset"));
+ thisChar.xadvance = int.Parse(FindKeyValue(tokens, "xadvance"));
+ if (fontInfo.isPacked)
+ {
+ int chnl = int.Parse(FindKeyValue(tokens, "chnl"));
+ thisChar.channel = (int)Mathf.Round(Mathf.Log(chnl) / Mathf.Log(2));
+ }
+ if (thisChar.id == -1) thisChar.id = 0;
+ fontInfo.chars.Add(thisChar);
+ }
+ else if (tokens[0] == "kerning")
+ {
+ Kerning thisKerning = new Kerning();
+ thisKerning.first = int.Parse(FindKeyValue(tokens, "first"));
+ thisKerning.second = int.Parse(FindKeyValue(tokens, "second"));
+ thisKerning.amount = int.Parse(FindKeyValue(tokens, "amount"));
+ fontInfo.kernings.Add(thisKerning);
+ }
+ }
+ reader.Close();
+
+ return fontInfo;
+ }
+ }
+
+ public static class Builder
+ {
+ public static Info ParseBMFont(string path)
+ {
+ Info fontInfo = null;
+
+ try
+ {
+ fontInfo = BMFontXmlImporter.Parse(path);
+ }
+ catch
+ {
+ fontInfo = BMFontTextImporter.Parse(path);
+ }
+
+ if (fontInfo == null || fontInfo.chars.Count == 0)
+ {
+ Debug.LogError("Font parsing returned 0 characters, check source bmfont file for errors");
+ return null;
+ }
+
+ return fontInfo;
+ }
+
+ public static bool BuildFont(Info fontInfo, tk2dFontData target, float scale, int charPadX, bool dupeCaps, bool flipTextureY, Texture2D gradientTexture, int gradientCount)
+ {
+ float texWidth = fontInfo.scaleW;
+ float texHeight = fontInfo.scaleH;
+ float lineHeight = fontInfo.lineHeight;
+ float texScale = fontInfo.textureScale;
+
+ target.version = tk2dFontData.CURRENT_VERSION;
+ target.lineHeight = lineHeight * scale;
+ target.texelSize = new Vector2(scale, scale);
+ target.isPacked = fontInfo.isPacked;
+
+ // Get number of characters (lastindex + 1)
+ int maxCharId = 0;
+ int maxUnicodeChar = 100000;
+ foreach (var theChar in fontInfo.chars)
+ {
+ if (theChar.id > maxUnicodeChar)
+ {
+ // in most cases the font contains unwanted characters!
+ Debug.LogError("Unicode character id exceeds allowed limit: " + theChar.id.ToString() + ". Skipping.");
+ continue;
+ }
+
+ if (theChar.id > maxCharId) maxCharId = theChar.id;
+ }
+
+ // decide to use dictionary if necessary
+ // 2048 is a conservative lower floor
+ bool useDictionary = maxCharId > 2048;
+
+ Dictionary charDict = (useDictionary)?new Dictionary():null;
+ tk2dFontChar[] chars = (useDictionary)?null:new tk2dFontChar[maxCharId + 1];
+ int minChar = 0x7fffffff;
+ int maxCharWithinBounds = 0;
+ int numLocalChars = 0;
+ float largestWidth = 0.0f;
+ foreach (var theChar in fontInfo.chars)
+ {
+ tk2dFontChar thisChar = new tk2dFontChar();
+ int id = theChar.id;
+ int x = theChar.x;
+ int y = theChar.y;
+ int width = theChar.width;
+ int height = theChar.height;
+ int xoffset = theChar.xoffset;
+ int yoffset = theChar.yoffset;
+ int xadvance = theChar.xadvance + charPadX;
+
+ // special case, if the width and height are zero, the origin doesn't need to be offset
+ // handles problematic case highlighted here:
+ // http://2dtoolkit.com/forum/index.php/topic,89.msg220.html
+ if (width == 0 && height == 0)
+ {
+ xoffset = 0;
+ yoffset = 0;
+ }
+
+ // precompute required data
+ if (theChar.texOverride)
+ {
+ float w = theChar.texW / texScale;
+ float h = theChar.texH / texScale;
+ if (theChar.texFlipped)
+ {
+ h = theChar.texW / texScale;
+ w = theChar.texH / texScale;
+ }
+
+ float px = (xoffset + theChar.texOffsetX * texScale) * scale;
+ float py = (lineHeight - yoffset - theChar.texOffsetY * texScale) * scale;
+
+ thisChar.p0 = new Vector3(px, py , 0);
+ thisChar.p1 = new Vector3(px + w * scale, py - h * scale, 0);
+
+ thisChar.uv0 = new Vector2((theChar.texX) / texWidth, (theChar.texY + theChar.texH) / texHeight);
+ thisChar.uv1 = new Vector2((theChar.texX + theChar.texW) / texWidth, (theChar.texY) / texHeight);
+ if (flipTextureY)
+ {
+ float tmp = 0;
+ if (theChar.texFlipped)
+ {
+ tmp = thisChar.uv1.x;
+ thisChar.uv1.x = thisChar.uv0.x;
+ thisChar.uv0.x = tmp;
+ }
+ else
+ {
+ tmp = thisChar.uv1.y;
+ thisChar.uv1.y = thisChar.uv0.y;
+ thisChar.uv0.y = tmp;
+ }
+ }
+
+ thisChar.flipped = theChar.texFlipped;
+ }
+ else
+ {
+ float px = xoffset * scale;
+ float py = (lineHeight - yoffset) * scale;
+
+ thisChar.p0 = new Vector3(px, py, 0);
+ thisChar.p1 = new Vector3(px + width * scale, py - height * scale, 0);
+ if (flipTextureY)
+ {
+ thisChar.uv0 = new Vector2(x / texWidth, y / texHeight);
+ thisChar.uv1 = new Vector2(thisChar.uv0.x + width / texWidth, thisChar.uv0.y + height / texHeight);
+ }
+ else
+ {
+ thisChar.uv0 = new Vector2(x / texWidth, 1.0f - y / texHeight);
+ thisChar.uv1 = new Vector2(thisChar.uv0.x + width / texWidth, thisChar.uv0.y - height / texHeight);
+ }
+
+ thisChar.flipped = false;
+ }
+ thisChar.advance = xadvance * scale;
+ thisChar.channel = theChar.channel;
+ largestWidth = Mathf.Max(thisChar.advance, largestWidth);
+
+ // Needs gradient data
+ if (gradientTexture != null)
+ {
+ // build it up assuming the first gradient
+ float x0 = (float)(0.0f / gradientCount);
+ float x1 = (float)(1.0f / gradientCount);
+ float y0 = 1.0f;
+ float y1 = 0.0f;
+
+ // align to glyph if necessary
+
+ thisChar.gradientUv = new Vector2[4];
+ thisChar.gradientUv[0] = new Vector2(x0, y0);
+ thisChar.gradientUv[1] = new Vector2(x1, y0);
+ thisChar.gradientUv[2] = new Vector2(x0, y1);
+ thisChar.gradientUv[3] = new Vector2(x1, y1);
+ }
+
+ if (id <= maxCharId)
+ {
+ maxCharWithinBounds = (id > maxCharWithinBounds) ? id : maxCharWithinBounds;
+ minChar = (id < minChar) ? id : minChar;
+
+ if (useDictionary)
+ charDict[id] = thisChar;
+ else
+ chars[id] = thisChar;
+
+ ++numLocalChars;
+ }
+ }
+
+ // duplicate capitals to lower case, or vice versa depending on which ones exist
+ if (dupeCaps)
+ {
+ for (int uc = 'A'; uc <= 'Z'; ++uc)
+ {
+ int lc = uc + ('a' - 'A');
+
+ if (useDictionary)
+ {
+ if (charDict.ContainsKey(uc))
+ charDict[lc] = charDict[uc];
+ else if (charDict.ContainsKey(lc))
+ charDict[uc] = charDict[lc];
+ }
+ else
+ {
+ if (chars[lc] == null) chars[lc] = chars[uc];
+ else if (chars[uc] == null) chars[uc] = chars[lc];
+ }
+ }
+ }
+
+ // share null char, same pointer
+ var nullChar = new tk2dFontChar();
+ nullChar.gradientUv = new Vector2[4]; // this would be null otherwise
+ nullChar.channel = 0;
+
+ target.largestWidth = largestWidth;
+ if (useDictionary)
+ {
+ // guarantee at least the first 256 characters
+ for (int i = 0; i < 256; ++i)
+ {
+ if (!charDict.ContainsKey(i))
+ charDict[i] = nullChar;
+ }
+
+ target.chars = null;
+ target.SetDictionary(charDict);
+ target.useDictionary = true;
+ }
+ else
+ {
+ target.chars = new tk2dFontChar[maxCharId + 1];
+ for (int i = 0; i <= maxCharId; ++i)
+ {
+ target.chars[i] = chars[i];
+ if (target.chars[i] == null)
+ {
+ target.chars[i] = nullChar; // zero everything, null char
+ }
+ }
+
+ target.charDict = null;
+ target.useDictionary = false;
+ }
+
+ // kerning
+ target.kerning = new tk2dFontKerning[fontInfo.kernings.Count];
+ for (int i = 0; i < target.kerning.Length; ++i)
+ {
+ tk2dFontKerning kerning = new tk2dFontKerning();
+ kerning.c0 = fontInfo.kernings[i].first;
+ kerning.c1 = fontInfo.kernings[i].second;
+ kerning.amount = fontInfo.kernings[i].amount * scale;
+ target.kerning[i] = kerning;
+ }
+
+ return true;
+ }
+ }
+}
+
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs.meta b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs.meta
new file mode 100644
index 000000000..fe2ace2fc
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontBuilder.cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: dec7aab8f44bbec48a8ff3c1aa30e5e9
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
diff --git a/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontEditor.cs b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontEditor.cs
new file mode 100644
index 000000000..553f7a6da
--- /dev/null
+++ b/Chromacore/Assets/TK2DROOT/tk2d/Editor/Fonts/tk2dFontEditor.cs
@@ -0,0 +1,233 @@
+using UnityEngine;
+using UnityEditor;
+using System.Collections;
+using System.Collections.Generic;
+
+[CustomEditor(typeof(tk2dFont))]
+public class tk2dFontEditor : Editor
+{
+ public Shader GetShader(bool gradient)
+ {
+ if (gradient) return Shader.Find("tk2d/Blend2TexVertexColor");
+ else return Shader.Find("tk2d/BlendVertexColor");
+ }
+
+ public override void OnInspectorGUI()
+ {
+ tk2dFont gen = (tk2dFont)target;
+ if (gen.proxyFont)
+ {
+ GUILayout.Label("This font is managed by a Sprite Collection");
+ return;
+ }
+ gen.Upgrade();
+
+ EditorGUILayout.BeginVertical();
+
+ DrawDefaultInspector();
+ tk2dGuiUtility.SpriteCollectionSize( gen.sizeDef );
+
+ // Warning when texture is compressed
+ if (gen.texture != null)
+ {
+ Texture2D tex = (Texture2D)gen.texture;
+ if (tex && IsTextureCompressed(tex))
+ {
+ int buttonPressed;
+ if ((buttonPressed = tk2dGuiUtility.InfoBoxWithButtons(
+ "Font texture appears to be compressed. " +
+ "Quality will be lost and the texture may appear blocky in game.\n" +
+ "Do you wish to change the format?",
+ tk2dGuiUtility.WarningLevel.Warning,
+ new string[] { "16bit", "Truecolor" }
+ )) != -1)
+ {
+ if (buttonPressed == 0)
+ {
+ ConvertTextureToFormat(tex, TextureImporterFormat.Automatic16bit);
+ }
+ else
+ {
+ ConvertTextureToFormat(tex, TextureImporterFormat.AutomaticTruecolor);
+ }
+ }
+ }
+ }
+
+ // Warning when gradient texture is compressed
+ if (gen.gradientTexture != null &&
+ (gen.gradientTexture.format != TextureFormat.ARGB32 && gen.gradientTexture.format != TextureFormat.RGB24 && gen.gradientTexture.format != TextureFormat.RGBA32))
+ {
+ if (tk2dGuiUtility.InfoBoxWithButtons(
+ "The gradient texture should be truecolor for best quality. " +
+ "Current format is " + gen.gradientTexture.format.ToString() + ".",
+ tk2dGuiUtility.WarningLevel.Warning,
+ new string[] { "Fix" }
+ ) != -1)
+ {
+ ConvertTextureToFormat(gen.gradientTexture, TextureImporterFormat.AutomaticTruecolor);
+ }
+ }
+
+ if (GUILayout.Button("Commit..."))
+ {
+ if (gen.bmFont == null || gen.texture == null)
+ {
+ EditorUtility.DisplayDialog("BMFont", "Need an bmFont and texture bound to work", "Ok");
+ return;
+ }
+
+ if (gen.material == null)
+ {
+ gen.material = new Material(GetShader(gen.gradientTexture != null));
+ string materialPath = AssetDatabase.GetAssetPath(gen).Replace(".prefab", "material.mat");
+ AssetDatabase.CreateAsset(gen.material, materialPath);
+ }
+
+ if (gen.data == null)
+ {
+ string bmFontPath = AssetDatabase.GetAssetPath(gen).Replace(".prefab", "data.prefab");
+
+ GameObject go = new GameObject();
+ go.AddComponent