-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zios
committed
Jun 18, 2016
0 parents
commit 3e6b153
Showing
82 changed files
with
7,384 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/@Solutions/ZiosThemes.dll |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@ECHO OFF | ||
copy /Y 3.5.7\* . >NUL | ||
del ZiosThemes.dll | ||
IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 | ||
IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\15.0\Bin" GOTO USE_VS15_X64 | ||
GOTO CLOSE | ||
:USE_VS14_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 32-bit host)... | ||
"%programfiles%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS14_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 32-bit host)... | ||
"%programfiles%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:CLOSE | ||
copy /Y 5.4\* . >NUL | ||
rmdir /Q /S obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@ECHO OFF | ||
copy /Y 4.7.2\* . >NUL | ||
del ZiosThemes.dll | ||
IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 | ||
IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\15.0\Bin" GOTO USE_VS15_X64 | ||
GOTO CLOSE | ||
:USE_VS14_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 32-bit host)... | ||
"%programfiles%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS14_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 32-bit host)... | ||
"%programfiles%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:CLOSE | ||
copy /Y 5.4\* . >NUL | ||
rmdir /Q /S obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@ECHO OFF | ||
copy /Y 5.4\* . >NUL | ||
echo Compiling ZiosThemes.dll - Mono Framework 4.5 / Unity 5.x... | ||
del ZiosThemes.dll | ||
call "%programfiles%\Unity\Editor\Data\MonoBleedingEdge\bin\xbuild.bat" ZiosThemes.sln | ||
rmdir /Q /S obj | ||
copy /Y 5.4\* . >NUL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@ECHO OFF | ||
copy /Y 5.4\* . >NUL | ||
del ZiosThemes.dll | ||
IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 | ||
IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 | ||
IF EXIST "%programfiles(x86)%\MSBuild\15.0\Bin" GOTO USE_VS15_X64 | ||
GOTO CLOSE | ||
:USE_VS14_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 32-bit host)... | ||
"%programfiles%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS14_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 2015 / MSBuild 2015 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X32 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 32-bit host)... | ||
"%programfiles%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:USE_VS15_X64 | ||
echo Compiling ZiosThemes.dll - Visual Studio 15 / MSBuild 15 (on 64-bit host)... | ||
"%programfiles(x86)%\MSBuild\15.0\Bin\MSBuild.exe" ZiosThemes.sln | ||
GOTO CLOSE | ||
:CLOSE | ||
copy /Y 5.4\* . >NUL | ||
rmdir /Q /S obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
rm ZiosThemes.dll | ||
/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/bin/xbuild ZiosThemesMono.sln | ||
rm -R obj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[InternetShortcut] | ||
URL=https://go.microsoft.com/fwlink/?LinkId=615458 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
// General Information about an assembly is controlled through the following | ||
// set of attributes. Change these attribute values to modify the information | ||
// associated with an assembly. | ||
[assembly: AssemblyTitle("Zios Themes")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("Zios")] | ||
[assembly: AssemblyProduct("ZiosThemes")] | ||
[assembly: AssemblyCopyright("Copyright © Zios 2016")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
|
||
// Setting ComVisible to false makes the types in this assembly not visible | ||
// to COM components. If you need to access a type in this assembly from | ||
// COM, set the ComVisible attribute to true on that type. | ||
[assembly: ComVisible(false)] | ||
|
||
// The following GUID is for the ID of the typelib if this project is exposed to COM | ||
[assembly: Guid("90c40447-c2b4-4725-9cea-9e0e8199eefc")] | ||
|
||
// Version information for an assembly consists of the following four values: | ||
// | ||
// Major Version | ||
// Minor Version | ||
// Build Number | ||
// Revision | ||
// | ||
// You can specify all the values or you can default the Build and Revision Numbers | ||
// by using the '*' as shown below: | ||
// [assembly: AssemblyVersion("1.0.*")] | ||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{90C40447-C2B4-4725-9CEA-9E0E8199EEFC}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>ZiosThemes</RootNamespace> | ||
<AssemblyName>ZiosThemes</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<Optimize>true</Optimize> | ||
<OutputPath>.</OutputPath> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DefineConstants>UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_STANDALONE;UNITY_THEMES</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEditor"> | ||
<HintPath>UnityEditor.dll</HintPath> | ||
</Reference> | ||
<Reference Include="UnityEngine"> | ||
<HintPath>UnityEngine.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="..\Containers\Container.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\Color.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\ComponentExtensions.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\EditorGUI.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\EditorGUILayout.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\Editor\GenericMenu.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\GameObject.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\GUIContent.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\GUISkin.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\GUIStyle.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\Rect.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\RectOffset.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\Texture.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\UnityObjectExtensions.cs" /> | ||
<Compile Include="..\Extensions\%40Unity\Vector3.cs" /> | ||
<Compile Include="..\Extensions\Array.cs" /> | ||
<Compile Include="..\Extensions\BitArray.cs" /> | ||
<Compile Include="..\Extensions\BitStream.cs" /> | ||
<Compile Include="..\Extensions\Bool.cs" /> | ||
<Compile Include="..\Extensions\Byte.cs" /> | ||
<Compile Include="..\Extensions\ByteArray.cs" /> | ||
<Compile Include="..\Extensions\DateTime.cs" /> | ||
<Compile Include="..\Extensions\Decimal.cs" /> | ||
<Compile Include="..\Extensions\Delegate.cs" /> | ||
<Compile Include="..\Extensions\Dictionary.cs" /> | ||
<Compile Include="..\Extensions\Double.cs" /> | ||
<Compile Include="..\Extensions\Enum.cs" /> | ||
<Compile Include="..\Extensions\Float.cs" /> | ||
<Compile Include="..\Extensions\IEnumerable.cs" /> | ||
<Compile Include="..\Extensions\Int.cs" /> | ||
<Compile Include="..\Extensions\List.cs" /> | ||
<Compile Include="..\Extensions\Object\Object.cs" /> | ||
<Compile Include="..\Extensions\Object\ObjectReflection.cs" /> | ||
<Compile Include="..\Extensions\Serializable.cs" /> | ||
<Compile Include="..\Extensions\Short.cs" /> | ||
<Compile Include="..\Extensions\StringBuilder.cs" /> | ||
<Compile Include="..\Extensions\String\String.cs" /> | ||
<Compile Include="..\Extensions\Type.cs" /> | ||
<Compile Include="..\Supports\Button.cs" /> | ||
<Compile Include="..\Supports\Colors.cs" /> | ||
<Compile Include="..\Supports\Hook.cs" /> | ||
<Compile Include="..\Supports\Locate.cs" /> | ||
<Compile Include="..\Supports\Store.cs" /> | ||
<Compile Include="..\Supports\Utility\Utility.cs" /> | ||
<Compile Include="..\Supports\Utility\UtilityEditor.cs" /> | ||
<Compile Include="..\Supports\Utility\UtilityProxy.cs" /> | ||
<Compile Include="..\System Attributes\EnumMask.cs" /> | ||
<Compile Include="..\System Attributes\Internal.cs" /> | ||
<Compile Include="..\System Attributes\Unity\InitializeOnLoad.cs" /> | ||
<Compile Include="..\Systems\Event\Event.cs" /> | ||
<Compile Include="..\Systems\Event\EventDetector.cs" /> | ||
<Compile Include="..\Systems\Event\EventListener.cs" /> | ||
<Compile Include="..\Systems\Event\EventStepper.cs" /> | ||
<Compile Include="..\Systems\File\FileManager.cs" /> | ||
<Compile Include="..\Systems\Interface\Style\Style.cs" /> | ||
<Compile Include="..\Systems\Interface\Style\StyleCSS.cs" /> | ||
<Compile Include="..\Systems\Interface\Themes\Editor\ThemeVerticalSpace.cs" /> | ||
<Compile Include="..\Systems\Interface\Themes\Themes.cs" /> | ||
<Compile Include="..\Systems\Interface\Themes\ThemesLoading.cs" /> | ||
<Compile Include="..\Systems\Interface\Themes\ThemesSaving.cs" /> | ||
<Compile Include="..\Systems\Interface\Themes\ThemesUtility.cs" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZiosThemes", "ZiosThemes.csproj", "{90C40447-C2B4-4725-9CEA-9E0E8199EEFC}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{90C40447-C2B4-4725-9CEA-9E0E8199EEFC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{90C40447-C2B4-4725-9CEA-9E0E8199EEFC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEngine; | ||
namespace Zios.Containers{ | ||
[Serializable] | ||
public class Container<TKey,TValue>{ | ||
public List<TKey> keys = new List<TKey>(); | ||
public List<TValue> values = new List<TValue>(); | ||
public Dictionary<TKey,TValue> collection = new Dictionary<TKey,TValue>(); | ||
public int Count{ | ||
get{return this.collection.Count;} | ||
set{} | ||
} | ||
public TValue this[TKey key]{ | ||
get{ | ||
int index = this.keys.IndexOf(key); | ||
return this.values.ElementAt(index); | ||
} | ||
set{ | ||
int index = this.keys.IndexOf(key); | ||
if(index == -1){ | ||
this.keys.Add(key); | ||
this.values.Add(value); | ||
this.collection = this.keys.ToDictionary(x => x,x => this.values[this.keys.IndexOf(x)]); | ||
} | ||
else{ | ||
this.values[index] = value; | ||
} | ||
} | ||
} | ||
public void Clear(){ | ||
this.keys.Clear(); | ||
this.values.Clear(); | ||
this.collection.Clear(); | ||
} | ||
public IEnumerator<KeyValuePair<TKey,TValue>> GetEnumerator(){ | ||
return this.collection.GetEnumerator(); | ||
} | ||
} | ||
[Serializable] public class IntContainer : Container<string,int>{} | ||
[Serializable] public class StringContainer : Container<string,string>{} | ||
[Serializable] public class FloatContainer : Container<string,float>{} | ||
[Serializable] public class BoolContainer : Container<string,bool>{} | ||
[Serializable] public class GameObjectContainer : Container<string,GameObject>{} | ||
[Serializable] | ||
public class FixedContainer<TKey,TValue>{ | ||
public TKey[] keys; | ||
public TValue[] values; | ||
private int nextIndex = 0; | ||
public FixedContainer(int size){ | ||
this.keys = new TKey[size]; | ||
this.values = new TValue[size]; | ||
} | ||
public TValue this[TKey key]{ | ||
get{ | ||
int index = Array.IndexOf(this.keys,key); | ||
return this.values[index]; | ||
} | ||
set{ | ||
int index = Array.IndexOf(this.keys,key); | ||
if(index == -1){ | ||
this.keys[this.nextIndex] = key; | ||
this.values[this.nextIndex] = value; | ||
++this.nextIndex; | ||
} | ||
else{ | ||
this.values[index] = value; | ||
} | ||
} | ||
} | ||
} | ||
public class FixedList<T> : List<T>{ | ||
public int maxSize = 0; | ||
public FixedList(int size) : base(size){ | ||
this.maxSize = size; | ||
} | ||
public new void Add(T item){ | ||
if(this.Count >= this.maxSize){ | ||
this.RemoveAt(0); | ||
} | ||
base.Add(item); | ||
} | ||
} | ||
public class Hierarchy<Key,Value> : Dictionary<Key,Value>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,Value> : Dictionary<KeyA,Dictionary<KeyB,Value>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Value>>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,KeyD,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Dictionary<KeyD,Value>>>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,KeyD,KeyE,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Dictionary<KeyD,Value>>>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,KeyD,KeyE,KeyF,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Dictionary<KeyD,Dictionary<KeyF,Value>>>>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,KeyD,KeyE,KeyF,KeyG,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Dictionary<KeyD,Dictionary<KeyF,Dictionary<KeyG,Value>>>>>>{public Hierarchy():base(){}} | ||
public class Hierarchy<KeyA,KeyB,KeyC,KeyD,KeyE,KeyF,KeyG,KeyH,Value> : Dictionary<KeyA,Dictionary<KeyB,Dictionary<KeyC,Dictionary<KeyD,Dictionary<KeyF,Dictionary<KeyG,Dictionary<KeyH,Value>>>>>>>{public Hierarchy():base(){}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using UnityEngine; | ||
using System; | ||
using System.Text; | ||
using System.Collections.Generic; | ||
namespace Zios{ | ||
public static class AnimationCurveExtension{ | ||
public static string Serialize(this AnimationCurve current){ | ||
var output = new StringBuilder(); | ||
foreach(var key in current.keys){ | ||
output.Append(key.time); | ||
output.Append("-"); | ||
output.Append(key.value); | ||
output.Append("-"); | ||
output.Append(key.inTangent); | ||
output.Append("-"); | ||
output.Append(key.outTangent); | ||
output.Append("|"); | ||
} | ||
return output.ToString().TrimRight("|"); | ||
} | ||
public static AnimationCurve Deserialize(this AnimationCurve current,string value){ | ||
var keys = new List<Keyframe>(); | ||
foreach(var keyData in value.Split("|")){ | ||
var data = keyData.Split("-").Convert<float>(); | ||
keys.Add(new Keyframe(data[0],data[1],data[2],data[3])); | ||
} | ||
current.keys = keys.ToArray(); | ||
return current; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using UnityEngine; | ||
namespace Zios{ | ||
public static class AnimationExtension{ | ||
public static void Set(this Animation current,string name,bool state){ | ||
if(state){current.Play(name);} | ||
else{current.Stop(name);} | ||
} | ||
} | ||
} |
Oops, something went wrong.