├── Library
├── BuildPlayer.prefs
├── AssetImportState
├── FailedAssetImports.txt
├── ScriptAssemblies
│ ├── CompilationCompleted.txt
│ ├── Assembly-CSharp-firstpass.dll
│ ├── Assembly-CSharp-firstpass.dll.mdb
│ ├── Assembly-CSharp-Editor-firstpass.dll
│ └── Assembly-CSharp-Editor-firstpass.dll.mdb
├── guidmapper
├── ScriptMapper
├── assetDatabase3
├── expandedItems
├── AnnotationManager
├── MonoManager.asset
├── AssetServerCacheV3
├── AssetVersioning.db
├── BuildSettings.asset
├── ProjectSettings.asset
├── EditorUserSettings.asset
├── EditorUserBuildSettings.asset
├── InspectorExpandedItems.asset
└── metadata
│ ├── 10
│ └── 1003c3e951ef02346ae2e1bb342657c1
│ ├── 21
│ └── 210fbfbe1ec974342bfffed3920cb215
│ ├── 22
│ └── 226cd442a7e375a448ebf5b10224f0b8
│ ├── 26
│ ├── 262cce81981986a4bbabc7a12fa82582
│ └── 262d9c7dbff1f6346bf13d8293edaf04
│ ├── 29
│ └── 2956bdcf1fab42144bd3d8fb6c2087a0
│ ├── 31
│ └── 3145eb6a1c559d94082cf4edf8d59472
│ ├── 32
│ └── 32b7ddfb3efd4634198aa8b62e1404cc
│ ├── 35
│ ├── 3520dd72433f66045ab02fe53fad3221
│ ├── 352a30ba84bada34db55ac125e8f3a2d
│ └── 3597041b4e0909f43a26421582497e0f
│ ├── 42
│ └── 4255c7ceb9a0bfc4fb816992f4cd3194
│ ├── 46
│ └── 46123eb3185eba544ba6b0ce3fe8a0c3
│ ├── 47
│ └── 47117bb6c7da5bf4ca47e8aa1f887f3d
│ ├── 50
│ ├── 5085a651a7bae60448e2c1f895e1395c
│ └── 50e41c3f3506e334c87161d1405c95b9
│ ├── 52
│ └── 52979745dab685b48a701e68264bd24d
│ ├── 54
│ └── 5475bccf723f7044ea5487931e61e6db
│ ├── 61
│ └── 616334333883a7047b551aed9599f981
│ ├── 63
│ └── 6376c4347b6fa4743b689bdf5fffcd32
│ ├── 64
│ └── 64b0a3efbdafbeb44975409e16eff754
│ ├── 65
│ └── 65620945c85562144a24194037b27d6f
│ ├── 67
│ └── 675d9ec96d7e0e44e88d62bbacbfee91
│ ├── 73
│ └── 73ede8e6c3657dc40ba79fc0621d4897
│ ├── 83
│ └── 8364add24d8ba4e4b9b11762ce0ba789
│ ├── 86
│ └── 86d7d0eac087182488f13b9a8e3723ff
│ ├── 92
│ └── 927a59d50fc90dd498f0e1462655b14e
│ ├── 00
│ ├── 00000000000000001000000000000000
│ ├── 00000000000000002000000000000000
│ ├── 00000000000000003000000000000000
│ ├── 00000000000000004000000000000000
│ ├── 00000000000000004100000000000000
│ ├── 00000000000000005000000000000000
│ ├── 00000000000000006000000000000000
│ ├── 00000000000000007000000000000000
│ ├── 00000000000000008000000000000000
│ ├── 00000000000000009000000000000000
│ ├── 0000000000000000a000000000000000
│ ├── 0000000000000000b000000000000000
│ └── 0000000000000000c000000000000000
│ ├── 02
│ └── 025d737194d6a9b4893cc701ea335181
│ ├── 05
│ └── 050eed9a3d86e474681cdafce0e9c136
│ ├── 0b
│ └── 0b78a69595630954bbb579955e8b959b
│ ├── 0f
│ └── 0ff381a0cb80aee4bbe42956fe15e092
│ ├── 1c
│ └── 1c11d92971aabe34d84a893e3929f5e3
│ ├── 2b
│ └── 2b6ca42133a809c47b32dd6942f91174
│ ├── 2c
│ └── 2c39531fef554a042897370a501119e3
│ ├── 2e
│ └── 2e8b2cf1d1ea8594d9e321def8c76b4a
│ ├── 2f
│ ├── 2f640b3fea67ca1419e69ddccbb3bee5
│ └── 2f85fedeb99e721439bae5e08c16634f
│ ├── 3d
│ └── 3dcb22cf075a39c48be96ce8cd1ce606
│ ├── 3f
│ └── 3f7277abd6787864298db8a1aac69439
│ ├── 4e
│ └── 4ebfc3440ba49e944ba90737a0c015dc
│ ├── 5a
│ └── 5ad00a5cebe4edd4699d1492e762d8a3
│ ├── 5b
│ └── 5b79bc1cdb05fc14da9c4c57bbdb0826
│ ├── 5c
│ ├── 5c4ebf381e0f9e348b255afc3eae4d17
│ └── 5cb254462db31db49855568db5096da1
│ ├── 6d
│ └── 6dbb92376568c3149ac36fcbb41b8a91
│ ├── 9f
│ └── 9fadabcb8a8723741be12f7d2f17516d
│ ├── a1
│ └── a12d22cd8ba63444ca643a95cbdadefd
│ ├── a5
│ └── a5c9fa12cb4f37f40a7c856e619bcdf0
│ ├── a9
│ └── a9ae2b2f9340f8d48a4643bd12f79e1d
│ ├── af
│ └── afac81009e0f6264f98a6488548f996f
│ ├── b0
│ ├── b009e7f193e45914ab127b0a64141879
│ └── b0d02140b6e685c41a9fab2ac14a6264
│ ├── b8
│ └── b823c77f341b0054bb6caaf0b04f261e
│ ├── bc
│ └── bce177919c60cf8439878a57887933b1
│ ├── c1
│ └── c1f28645331b29244beaf39116fbfe92
│ ├── c2
│ ├── c27e36b54df54eb439ebdaddfe421781
│ ├── c2d8e4bbd455e4542b55757512d093cc
│ └── c2e86bf7b32c8a34caf748919e08bfeb
│ ├── c7
│ └── c761bdd461713404ca4f24f46ff381b4
│ ├── c8
│ └── c8aecffce70d8514fa956dec197e3a2e
│ ├── cb
│ ├── cb5e13c0a85a4f24a8319bd2920c4b42
│ └── cb81a10f3996211458ad8d9dc84a11bb
│ ├── cf
│ └── cfb79c88b8e3d16489d04f3b7d889491
│ ├── d1
│ └── d10af1c072df2414db0eff758d0c83cb
│ ├── d3
│ └── d3cb13517eae3d444b2c210165d71349
│ ├── d9
│ └── d9d2d3e81f3d15d4c8a7d2657f313791
│ ├── db
│ └── db4ab1bfd18274049acc712283d959a3
│ ├── dc
│ └── dc306af9e7bb2d94eadc49f7609c96b5
│ ├── e6
│ └── e64e4cc9fea07f544b3c88959414f97e
│ ├── e7
│ └── e73a04e6a34aea047b0fb34d47c0cfd1
│ ├── e8
│ └── e8ad26c1c6cf40441b4e4c18053fdebf
│ ├── e9
│ └── e988b299f305dbb46a87de946ee24d1b
│ ├── ea
│ └── eadb525c750d01741a5e5843e5119fa9
│ ├── ee
│ └── eee8bc5cec8d23742868b2bcdf4e908d
│ ├── f2
│ └── f24f73aac0de5b649a094b830777ac36
│ ├── f6
│ └── f678c33859ee8994390db5464c225728
│ └── fa
│ └── fa3039a132111204c9c0890060824751
├── README.md
├── ProjectSettings
├── TagManager.asset
├── TimeManager.asset
├── AudioManager.asset
├── InputManager.asset
├── NavMeshLayers.asset
├── DynamicsManager.asset
├── EditorSettings.asset
├── NetworkManager.asset
├── ProjectSettings.asset
├── QualitySettings.asset
└── EditorBuildSettings.asset
├── Assets
├── Resources
│ └── Tang
│ │ └── Objects
│ │ └── SpriteAnimcation.prefab
└── Standard Assets
│ ├── UUnit
│ ├── UUnitTestAttribute.cs
│ ├── UUnitSelfTest
│ │ ├── TestCaseRunner.cs
│ │ ├── TestCaseDummy.cs
│ │ └── TestCaseTest.cs
│ ├── UUnitTestResult.cs
│ ├── UUnitAssertException.cs
│ ├── UUnitTestCase.cs
│ ├── UUnitTestSuite.cs
│ ├── UUnitTestRunner.cs
│ └── UUnitAssert.cs
│ ├── Editor
│ ├── Tang
│ │ ├── AtlasParser.cs
│ │ ├── MidFrame.cs
│ │ ├── AtlasData.cs
│ │ ├── AtlasXmlParser.cs
│ │ ├── Atlas.cs
│ │ ├── AnimationGenerator.cs
│ │ ├── TangEditorCommand.cs
│ │ ├── AtlasCocos2DParser.cs
│ │ └── Maker.cs
│ └── UUnit
│ │ └── UUnitTestRunner.cs
│ ├── Tang
│ ├── Sprite
│ │ ├── Frame.cs
│ │ ├── SingleFrameSprite.cs
│ │ ├── FrameSet.cs
│ │ ├── MultiFrameSprite.cs
│ │ ├── MultiSetSprite.cs
│ │ └── Sprite.cs
│ ├── Base
│ │ ├── Tang.cs
│ │ └── MeshOne.cs
│ └── Animation
│ │ ├── LayerID.cs
│ │ ├── BodyLayer.cs
│ │ ├── EffectLayer.cs
│ │ ├── WingLayer.cs
│ │ ├── ClothesLayer.cs
│ │ ├── WeaponLayer.cs
│ │ ├── MountLayer.cs
│ │ ├── CommonLayer.cs
│ │ ├── SpriteLayer.cs
│ │ └── SpriteAnimation.cs
│ └── Tang-Test
│ └── Scene
│ └── SpriteAnimationTest
│ ├── SpriteAnimationTestRunner.cs
│ └── SpriteAnimationTestCase.cs
├── Tang.sln
├── Tang-csharp.sln
├── .gitignore
├── Assembly-CSharp-Editor-firstpass.csproj
├── Assembly-CSharp-Editor-firstpass-vs.csproj
├── Assembly-CSharp.csproj
├── Assembly-CSharp-vs.csproj
├── Assembly-CSharp-firstpass-vs.csproj
├── Assembly-CSharp-firstpass.csproj
└── LICENSE
/Library/BuildPlayer.prefs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Library/AssetImportState:
--------------------------------------------------------------------------------
1 | 5;0;-1
--------------------------------------------------------------------------------
/Library/FailedAssetImports.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Library/ScriptAssemblies/CompilationCompleted.txt:
--------------------------------------------------------------------------------
1 | Completed
2 |
--------------------------------------------------------------------------------
/Library/guidmapper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/guidmapper
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Tang
2 | ====
3 |
4 | A simple sprite animation plugin for Unity3D
5 |
--------------------------------------------------------------------------------
/Library/ScriptMapper:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ScriptMapper
--------------------------------------------------------------------------------
/Library/assetDatabase3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/assetDatabase3
--------------------------------------------------------------------------------
/Library/expandedItems:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/expandedItems
--------------------------------------------------------------------------------
/Library/AnnotationManager:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/AnnotationManager
--------------------------------------------------------------------------------
/Library/MonoManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/MonoManager.asset
--------------------------------------------------------------------------------
/Library/AssetServerCacheV3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/AssetServerCacheV3
--------------------------------------------------------------------------------
/Library/AssetVersioning.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/AssetVersioning.db
--------------------------------------------------------------------------------
/Library/BuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/BuildSettings.asset
--------------------------------------------------------------------------------
/Library/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ProjectSettings.asset
--------------------------------------------------------------------------------
/Library/EditorUserSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/EditorUserSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/TagManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/TagManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/TimeManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/TimeManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/AudioManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/AudioManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/InputManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/InputManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/NavMeshLayers.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/NavMeshLayers.asset
--------------------------------------------------------------------------------
/Library/EditorUserBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/EditorUserBuildSettings.asset
--------------------------------------------------------------------------------
/Library/InspectorExpandedItems.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/InspectorExpandedItems.asset
--------------------------------------------------------------------------------
/ProjectSettings/DynamicsManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/DynamicsManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/EditorSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/EditorSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/NetworkManager.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/NetworkManager.asset
--------------------------------------------------------------------------------
/ProjectSettings/ProjectSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/ProjectSettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/QualitySettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/QualitySettings.asset
--------------------------------------------------------------------------------
/ProjectSettings/EditorBuildSettings.asset:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/ProjectSettings/EditorBuildSettings.asset
--------------------------------------------------------------------------------
/Assets/Resources/Tang/Objects/SpriteAnimcation.prefab:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Assets/Resources/Tang/Objects/SpriteAnimcation.prefab
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000001000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000001000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000002000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000002000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000003000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000003000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000004000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000004000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000004100000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000004100000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000005000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000005000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000006000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000006000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000007000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000007000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000008000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000008000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/00000000000000009000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/00000000000000009000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000a000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/0000000000000000a000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000b000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/0000000000000000b000000000000000
--------------------------------------------------------------------------------
/Library/metadata/00/0000000000000000c000000000000000:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/00/0000000000000000c000000000000000
--------------------------------------------------------------------------------
/Library/metadata/02/025d737194d6a9b4893cc701ea335181:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/02/025d737194d6a9b4893cc701ea335181
--------------------------------------------------------------------------------
/Library/metadata/05/050eed9a3d86e474681cdafce0e9c136:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/05/050eed9a3d86e474681cdafce0e9c136
--------------------------------------------------------------------------------
/Library/metadata/0b/0b78a69595630954bbb579955e8b959b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/0b/0b78a69595630954bbb579955e8b959b
--------------------------------------------------------------------------------
/Library/metadata/0f/0ff381a0cb80aee4bbe42956fe15e092:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/0f/0ff381a0cb80aee4bbe42956fe15e092
--------------------------------------------------------------------------------
/Library/metadata/10/1003c3e951ef02346ae2e1bb342657c1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/10/1003c3e951ef02346ae2e1bb342657c1
--------------------------------------------------------------------------------
/Library/metadata/1c/1c11d92971aabe34d84a893e3929f5e3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/1c/1c11d92971aabe34d84a893e3929f5e3
--------------------------------------------------------------------------------
/Library/metadata/21/210fbfbe1ec974342bfffed3920cb215:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/21/210fbfbe1ec974342bfffed3920cb215
--------------------------------------------------------------------------------
/Library/metadata/22/226cd442a7e375a448ebf5b10224f0b8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/22/226cd442a7e375a448ebf5b10224f0b8
--------------------------------------------------------------------------------
/Library/metadata/26/262cce81981986a4bbabc7a12fa82582:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/26/262cce81981986a4bbabc7a12fa82582
--------------------------------------------------------------------------------
/Library/metadata/26/262d9c7dbff1f6346bf13d8293edaf04:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/26/262d9c7dbff1f6346bf13d8293edaf04
--------------------------------------------------------------------------------
/Library/metadata/29/2956bdcf1fab42144bd3d8fb6c2087a0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/29/2956bdcf1fab42144bd3d8fb6c2087a0
--------------------------------------------------------------------------------
/Library/metadata/2b/2b6ca42133a809c47b32dd6942f91174:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/2b/2b6ca42133a809c47b32dd6942f91174
--------------------------------------------------------------------------------
/Library/metadata/2c/2c39531fef554a042897370a501119e3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/2c/2c39531fef554a042897370a501119e3
--------------------------------------------------------------------------------
/Library/metadata/2e/2e8b2cf1d1ea8594d9e321def8c76b4a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/2e/2e8b2cf1d1ea8594d9e321def8c76b4a
--------------------------------------------------------------------------------
/Library/metadata/2f/2f640b3fea67ca1419e69ddccbb3bee5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/2f/2f640b3fea67ca1419e69ddccbb3bee5
--------------------------------------------------------------------------------
/Library/metadata/2f/2f85fedeb99e721439bae5e08c16634f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/2f/2f85fedeb99e721439bae5e08c16634f
--------------------------------------------------------------------------------
/Library/metadata/31/3145eb6a1c559d94082cf4edf8d59472:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/31/3145eb6a1c559d94082cf4edf8d59472
--------------------------------------------------------------------------------
/Library/metadata/32/32b7ddfb3efd4634198aa8b62e1404cc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/32/32b7ddfb3efd4634198aa8b62e1404cc
--------------------------------------------------------------------------------
/Library/metadata/35/3520dd72433f66045ab02fe53fad3221:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/35/3520dd72433f66045ab02fe53fad3221
--------------------------------------------------------------------------------
/Library/metadata/35/352a30ba84bada34db55ac125e8f3a2d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/35/352a30ba84bada34db55ac125e8f3a2d
--------------------------------------------------------------------------------
/Library/metadata/35/3597041b4e0909f43a26421582497e0f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/35/3597041b4e0909f43a26421582497e0f
--------------------------------------------------------------------------------
/Library/metadata/3d/3dcb22cf075a39c48be96ce8cd1ce606:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/3d/3dcb22cf075a39c48be96ce8cd1ce606
--------------------------------------------------------------------------------
/Library/metadata/3f/3f7277abd6787864298db8a1aac69439:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/3f/3f7277abd6787864298db8a1aac69439
--------------------------------------------------------------------------------
/Library/metadata/42/4255c7ceb9a0bfc4fb816992f4cd3194:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/42/4255c7ceb9a0bfc4fb816992f4cd3194
--------------------------------------------------------------------------------
/Library/metadata/46/46123eb3185eba544ba6b0ce3fe8a0c3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/46/46123eb3185eba544ba6b0ce3fe8a0c3
--------------------------------------------------------------------------------
/Library/metadata/47/47117bb6c7da5bf4ca47e8aa1f887f3d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/47/47117bb6c7da5bf4ca47e8aa1f887f3d
--------------------------------------------------------------------------------
/Library/metadata/4e/4ebfc3440ba49e944ba90737a0c015dc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/4e/4ebfc3440ba49e944ba90737a0c015dc
--------------------------------------------------------------------------------
/Library/metadata/50/5085a651a7bae60448e2c1f895e1395c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/50/5085a651a7bae60448e2c1f895e1395c
--------------------------------------------------------------------------------
/Library/metadata/50/50e41c3f3506e334c87161d1405c95b9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/50/50e41c3f3506e334c87161d1405c95b9
--------------------------------------------------------------------------------
/Library/metadata/52/52979745dab685b48a701e68264bd24d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/52/52979745dab685b48a701e68264bd24d
--------------------------------------------------------------------------------
/Library/metadata/54/5475bccf723f7044ea5487931e61e6db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/54/5475bccf723f7044ea5487931e61e6db
--------------------------------------------------------------------------------
/Library/metadata/5a/5ad00a5cebe4edd4699d1492e762d8a3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/5a/5ad00a5cebe4edd4699d1492e762d8a3
--------------------------------------------------------------------------------
/Library/metadata/5b/5b79bc1cdb05fc14da9c4c57bbdb0826:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/5b/5b79bc1cdb05fc14da9c4c57bbdb0826
--------------------------------------------------------------------------------
/Library/metadata/5c/5c4ebf381e0f9e348b255afc3eae4d17:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/5c/5c4ebf381e0f9e348b255afc3eae4d17
--------------------------------------------------------------------------------
/Library/metadata/5c/5cb254462db31db49855568db5096da1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/5c/5cb254462db31db49855568db5096da1
--------------------------------------------------------------------------------
/Library/metadata/61/616334333883a7047b551aed9599f981:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/61/616334333883a7047b551aed9599f981
--------------------------------------------------------------------------------
/Library/metadata/63/6376c4347b6fa4743b689bdf5fffcd32:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/63/6376c4347b6fa4743b689bdf5fffcd32
--------------------------------------------------------------------------------
/Library/metadata/64/64b0a3efbdafbeb44975409e16eff754:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/64/64b0a3efbdafbeb44975409e16eff754
--------------------------------------------------------------------------------
/Library/metadata/65/65620945c85562144a24194037b27d6f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/65/65620945c85562144a24194037b27d6f
--------------------------------------------------------------------------------
/Library/metadata/67/675d9ec96d7e0e44e88d62bbacbfee91:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/67/675d9ec96d7e0e44e88d62bbacbfee91
--------------------------------------------------------------------------------
/Library/metadata/6d/6dbb92376568c3149ac36fcbb41b8a91:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/6d/6dbb92376568c3149ac36fcbb41b8a91
--------------------------------------------------------------------------------
/Library/metadata/73/73ede8e6c3657dc40ba79fc0621d4897:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/73/73ede8e6c3657dc40ba79fc0621d4897
--------------------------------------------------------------------------------
/Library/metadata/83/8364add24d8ba4e4b9b11762ce0ba789:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/83/8364add24d8ba4e4b9b11762ce0ba789
--------------------------------------------------------------------------------
/Library/metadata/86/86d7d0eac087182488f13b9a8e3723ff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/86/86d7d0eac087182488f13b9a8e3723ff
--------------------------------------------------------------------------------
/Library/metadata/92/927a59d50fc90dd498f0e1462655b14e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/92/927a59d50fc90dd498f0e1462655b14e
--------------------------------------------------------------------------------
/Library/metadata/9f/9fadabcb8a8723741be12f7d2f17516d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/9f/9fadabcb8a8723741be12f7d2f17516d
--------------------------------------------------------------------------------
/Library/metadata/a1/a12d22cd8ba63444ca643a95cbdadefd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/a1/a12d22cd8ba63444ca643a95cbdadefd
--------------------------------------------------------------------------------
/Library/metadata/a5/a5c9fa12cb4f37f40a7c856e619bcdf0:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/a5/a5c9fa12cb4f37f40a7c856e619bcdf0
--------------------------------------------------------------------------------
/Library/metadata/a9/a9ae2b2f9340f8d48a4643bd12f79e1d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/a9/a9ae2b2f9340f8d48a4643bd12f79e1d
--------------------------------------------------------------------------------
/Library/metadata/af/afac81009e0f6264f98a6488548f996f:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/af/afac81009e0f6264f98a6488548f996f
--------------------------------------------------------------------------------
/Library/metadata/b0/b009e7f193e45914ab127b0a64141879:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/b0/b009e7f193e45914ab127b0a64141879
--------------------------------------------------------------------------------
/Library/metadata/b0/b0d02140b6e685c41a9fab2ac14a6264:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/b0/b0d02140b6e685c41a9fab2ac14a6264
--------------------------------------------------------------------------------
/Library/metadata/b8/b823c77f341b0054bb6caaf0b04f261e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/b8/b823c77f341b0054bb6caaf0b04f261e
--------------------------------------------------------------------------------
/Library/metadata/bc/bce177919c60cf8439878a57887933b1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/bc/bce177919c60cf8439878a57887933b1
--------------------------------------------------------------------------------
/Library/metadata/c1/c1f28645331b29244beaf39116fbfe92:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c1/c1f28645331b29244beaf39116fbfe92
--------------------------------------------------------------------------------
/Library/metadata/c2/c27e36b54df54eb439ebdaddfe421781:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c2/c27e36b54df54eb439ebdaddfe421781
--------------------------------------------------------------------------------
/Library/metadata/c2/c2d8e4bbd455e4542b55757512d093cc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c2/c2d8e4bbd455e4542b55757512d093cc
--------------------------------------------------------------------------------
/Library/metadata/c2/c2e86bf7b32c8a34caf748919e08bfeb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c2/c2e86bf7b32c8a34caf748919e08bfeb
--------------------------------------------------------------------------------
/Library/metadata/c7/c761bdd461713404ca4f24f46ff381b4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c7/c761bdd461713404ca4f24f46ff381b4
--------------------------------------------------------------------------------
/Library/metadata/c8/c8aecffce70d8514fa956dec197e3a2e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/c8/c8aecffce70d8514fa956dec197e3a2e
--------------------------------------------------------------------------------
/Library/metadata/cb/cb5e13c0a85a4f24a8319bd2920c4b42:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/cb/cb5e13c0a85a4f24a8319bd2920c4b42
--------------------------------------------------------------------------------
/Library/metadata/cb/cb81a10f3996211458ad8d9dc84a11bb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/cb/cb81a10f3996211458ad8d9dc84a11bb
--------------------------------------------------------------------------------
/Library/metadata/cf/cfb79c88b8e3d16489d04f3b7d889491:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/cf/cfb79c88b8e3d16489d04f3b7d889491
--------------------------------------------------------------------------------
/Library/metadata/d1/d10af1c072df2414db0eff758d0c83cb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/d1/d10af1c072df2414db0eff758d0c83cb
--------------------------------------------------------------------------------
/Library/metadata/d3/d3cb13517eae3d444b2c210165d71349:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/d3/d3cb13517eae3d444b2c210165d71349
--------------------------------------------------------------------------------
/Library/metadata/d9/d9d2d3e81f3d15d4c8a7d2657f313791:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/d9/d9d2d3e81f3d15d4c8a7d2657f313791
--------------------------------------------------------------------------------
/Library/metadata/db/db4ab1bfd18274049acc712283d959a3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/db/db4ab1bfd18274049acc712283d959a3
--------------------------------------------------------------------------------
/Library/metadata/dc/dc306af9e7bb2d94eadc49f7609c96b5:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/dc/dc306af9e7bb2d94eadc49f7609c96b5
--------------------------------------------------------------------------------
/Library/metadata/e6/e64e4cc9fea07f544b3c88959414f97e:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/e6/e64e4cc9fea07f544b3c88959414f97e
--------------------------------------------------------------------------------
/Library/metadata/e7/e73a04e6a34aea047b0fb34d47c0cfd1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/e7/e73a04e6a34aea047b0fb34d47c0cfd1
--------------------------------------------------------------------------------
/Library/metadata/e8/e8ad26c1c6cf40441b4e4c18053fdebf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/e8/e8ad26c1c6cf40441b4e4c18053fdebf
--------------------------------------------------------------------------------
/Library/metadata/e9/e988b299f305dbb46a87de946ee24d1b:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/e9/e988b299f305dbb46a87de946ee24d1b
--------------------------------------------------------------------------------
/Library/metadata/ea/eadb525c750d01741a5e5843e5119fa9:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/ea/eadb525c750d01741a5e5843e5119fa9
--------------------------------------------------------------------------------
/Library/metadata/ee/eee8bc5cec8d23742868b2bcdf4e908d:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/ee/eee8bc5cec8d23742868b2bcdf4e908d
--------------------------------------------------------------------------------
/Library/metadata/f2/f24f73aac0de5b649a094b830777ac36:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/f2/f24f73aac0de5b649a094b830777ac36
--------------------------------------------------------------------------------
/Library/metadata/f6/f678c33859ee8994390db5464c225728:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/f6/f678c33859ee8994390db5464c225728
--------------------------------------------------------------------------------
/Library/metadata/fa/fa3039a132111204c9c0890060824751:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/metadata/fa/fa3039a132111204c9c0890060824751
--------------------------------------------------------------------------------
/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
--------------------------------------------------------------------------------
/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll.mdb
--------------------------------------------------------------------------------
/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll
--------------------------------------------------------------------------------
/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll.mdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lite/Tang/master/Library/ScriptAssemblies/Assembly-CSharp-Editor-firstpass.dll.mdb
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitTestAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | [AttributeUsage(AttributeTargets.Method)]
4 | public class UUnitTestAttribute : Attribute
5 | {
6 | }
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitSelfTest/TestCaseRunner.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class TestCaseRunner : MonoBehaviour
4 | {
5 |
6 | public void Start ()
7 | {
8 | UUnitTestSuite suite = new UUnitTestSuite ();
9 | suite.AddAll (typeof(TestCaseTest));
10 | UUnitTestResult result = suite.Run ();
11 | Debug.Log (result.Summary ());
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitTestResult.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class UUnitTestResult
4 | {
5 | private int runCount = 0;
6 | private int failedCount = 0;
7 |
8 | public void TestStarted ()
9 | {
10 | runCount += 1;
11 | }
12 |
13 | public void TestFailed ()
14 | {
15 | failedCount += 1;
16 | }
17 |
18 | public string Summary ()
19 | {
20 | return runCount + " run, " + failedCount + " failed";
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/AtlasParser.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 22:16
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of AtlasImporter.
15 | ///
16 | public interface AtlasParser
17 | {
18 | Atlas Parse();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/Frame.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using UnityEngine;
3 |
4 | namespace Tang {
5 |
6 | [Serializable]
7 | public class Frame {
8 |
9 | public Vector2 size;
10 | public Vector2 offset;
11 | public Vector2[] uv;
12 |
13 | public Frame(){
14 | }
15 |
16 | public Frame(Vector2 size, Vector2 offset, Vector2[] uv){
17 | this.size = size;
18 | this.offset = offset;
19 | this.uv = uv;
20 | }
21 | }
22 |
23 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/SingleFrameSprite.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace Tang {
5 |
6 | [ExecuteInEditMode]
7 | public class SingleFrameSprite : Sprite {
8 |
9 | public Frame fr;
10 |
11 | // Use this for initialization
12 | void Start () {
13 | if(fr != null){
14 | base.Init();
15 | CurrentFrame = fr;
16 | }
17 | }
18 |
19 | void Update(){
20 | // do nothing
21 | }
22 |
23 | }
24 |
25 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Base/Tang.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 15:08
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of Tang.
15 | ///
16 | public class Tang
17 | {
18 | ///
19 | /// Common FPS
20 | ///
21 | public const int FPS = 12;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/LayerID.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/5
5 | * Time: 23:14
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of Layer.
15 | ///
16 | public class LayerID
17 | {
18 | public const int CLOTHES = 0;
19 | public const int MOUNT = 1;
20 | public const int WEAPON = 2;
21 | public const int WING = 3;
22 | public const int EFFECT = 4;
23 | public const int BODY = 5;
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/FrameSet.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/29
5 | * Time: 23:35
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of FrameSet.
15 | ///
16 | [Serializable]
17 | public class FrameSet
18 | {
19 | public string name;
20 |
21 | public Frame[] frames;
22 |
23 | public FrameSet(string name, Frame[] frames)
24 | {
25 | this.name = name;
26 | this.frames = frames;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/MidFrame.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 |
4 |
5 | namespace Tang {
6 |
7 | public class MidFrame : Frame
8 | {
9 |
10 | ///
11 | /// This frame's name
12 | ///
13 | public string name;
14 | ///
15 | /// This frame's world rotation modifier
16 | ///
17 | public float rotation;
18 | ///
19 | /// The index of the frame
20 | ///
21 | public int index;
22 |
23 | public MidFrame(){
24 | }
25 |
26 | public MidFrame(Vector2 size, Vector2 offset, Vector2[] uv) : base(size, offset, uv)
27 | {
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/BodyLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/13
5 | * Time: 15:45
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of BodyLayer.
15 | ///
16 | public class BodyLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.BODY;
19 | public const string NAME = "body";
20 |
21 | public BodyLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public BodyLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab){
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/EffectLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 15:22
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of EffectLayer.
15 | ///
16 | public class EffectLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.EFFECT;
19 | public const string NAME = "effect";
20 |
21 | public EffectLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public EffectLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab){
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/WingLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 15:21
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of WingLayer.
15 | ///
16 | public class WingLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.WING;
19 | public const string NAME = "wing";
20 |
21 | public WingLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public WingLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab)
26 | {
27 | }
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/ClothesLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 15:18
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of ClothesLayer.
15 | ///
16 | public class ClothesLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.CLOTHES;
19 | public const string NAME = "clothes";
20 |
21 | public ClothesLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public ClothesLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab){
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/WeaponLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 15:20
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of WeaponLayer.
15 | ///
16 | public class WeaponLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.WEAPON;
19 | public const string NAME = "weapon";
20 |
21 | public WeaponLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public WeaponLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab){
26 | }
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/MountLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 15:12
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of MountLayer.
15 | ///
16 | public class MountLayer : CommonLayer
17 | {
18 | public const int ID = LayerID.MOUNT;
19 | public const string NAME = "mount";
20 |
21 | public MountLayer() : base(ID, NAME)
22 | {
23 | }
24 |
25 | public MountLayer(Sprite spritePrefab) : base(ID, NAME, spritePrefab)
26 | {
27 | }
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitSelfTest/TestCaseDummy.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class TestCaseDummy : UUnitTestCase
4 | {
5 | public bool wasRun;
6 | public bool wasSetUp;
7 | public string log;
8 |
9 | public TestCaseDummy ()
10 | {
11 | }
12 |
13 | public TestCaseDummy (string testMethodName) : base(testMethodName)
14 | {
15 | }
16 |
17 | [UUnitTest]
18 | public void TestMethod ()
19 | {
20 | wasRun = true;
21 | }
22 |
23 | protected override void SetUp ()
24 | {
25 | wasRun = false;
26 | wasSetUp = true;
27 | log = "setUp ";
28 | }
29 |
30 | [UUnitTest]
31 | public void TestFail ()
32 | {
33 | UUnitAssert.True (false, "Expected Fail Result");
34 | }
35 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang-Test/Scene/SpriteAnimationTest/SpriteAnimationTestRunner.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/9
5 | * Time: 14:07
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using UnityEngine;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of MultiLayerAnimcationTestRunner.
15 | ///
16 | public class SpriteAnimationTestRunner : MonoBehaviour
17 | {
18 | void Start() {
19 |
20 | UUnitTestSuite suite = new UUnitTestSuite();
21 | suite.AddAll(typeof(SpriteAnimationTestCase));
22 | UUnitTestResult result = suite.Run ();
23 | Debug.Log (result.Summary ());
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitAssertException.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 |
4 | public class UUnitAssertException : Exception
5 | {
6 | public object expected;
7 | public object received;
8 | public string message;
9 |
10 | public UUnitAssertException (string message) : base(message)
11 | {
12 | this.message = message;
13 | }
14 |
15 | public UUnitAssertException (object expected, object received, string message) : base("[UUnit] - Assert Failed - Expected: " + expected + " Received: " + received + "\n\t\t(" + message + ")")
16 | {
17 | this.expected = (expected == null) ? "null" : expected;
18 | this.received = (received == null) ? "null" : received;
19 | this.message = (message == null) ? "" : message;
20 | }
21 |
22 | public UUnitAssertException (object expected, object received) : base("[UUnit] - Assert Failed - Expected: " + expected + " Received: " + received)
23 | {
24 | this.expected = (expected == null) ? "null" : expected;
25 | this.received = (received == null) ? "null" : received;
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/CommonLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 16:08
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 |
11 | namespace Tang
12 | {
13 | ///
14 | /// Description of CommonLayer.
15 | ///
16 | public class CommonLayer : SpriteLayer
17 | {
18 |
19 | public const int FRAME_DELAY = 0;
20 | public const bool HIDDEN_BEFORE_BEGIN = true;
21 | public const bool HIDDEN_AFTER_END = true;
22 |
23 |
24 | public CommonLayer(int id, string name) : base(id, name)
25 | {
26 | InitFields();
27 | }
28 |
29 | public CommonLayer(int id, string name, Sprite spritePrefab) : base(id, name){
30 | this.spritePrefab = spritePrefab;
31 | InitFields();
32 | }
33 |
34 | private void InitFields(){
35 | this.frameDelay = FRAME_DELAY;
36 | this.hiddenBeforeBegin = HIDDEN_BEFORE_BEGIN;
37 | this.hiddenAfterEnd = HIDDEN_AFTER_END;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/AtlasData.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 22:48
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using UnityEngine;
10 | using System.Collections;
11 |
12 | namespace Tang
13 | {
14 | ///
15 | /// Description of AtlasData.
16 | ///
17 | public class AtlasData
18 | {
19 | ///
20 | /// This frame's name
21 | ///
22 | public string name = "";
23 | ///
24 | /// This frame's atlas position
25 | ///
26 | public Vector2 position = Vector2.zero;
27 | ///
28 | /// This frame's position offset
29 | ///
30 | public Vector2 offset = Vector2.zero;
31 | ///
32 | /// if this image is rotated on Atlas
33 | ///
34 | public bool rotated = false;
35 | ///
36 | /// This frame's atlas size
37 | ///
38 | public Vector2 size = Vector2.zero;
39 | ///
40 | /// atlas frame size
41 | ///
42 | public Vector2 frameSize = Vector2.zero;
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Animation/SpriteLayer.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/6
5 | * Time: 17:23
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 | using UnityEngine;
11 |
12 | namespace Tang
13 | {
14 | ///
15 | /// Description of SpriteLayer.
16 | ///
17 | [Serializable]
18 | public class SpriteLayer
19 | {
20 |
21 | public int id; // ID
22 | public string name; // 名称
23 | public Sprite spritePrefab; // 精灵的 prefab
24 | public int frameDelay; // 延迟多少帧后开始播放,相对于上级动画
25 | public bool hiddenBeforeBegin; // 在开始之前隐藏
26 | public bool hiddenAfterEnd; // 该 sprite 播放完成后是否隐藏
27 |
28 | [HideInInspector]
29 | public Sprite spriteInstance = null; // 精灵的实例
30 | [HideInInspector]
31 | public bool hidden = false; // 目前是否处于隐藏的状态
32 | [HideInInspector]
33 | public int maxIndex = 0; // 帧(层)最大索引值
34 | [HideInInspector]
35 | public GameObject gameObject = null; // 层对应的 GameObject
36 |
37 | public SpriteLayer(int id, string name){
38 | this.id = id;
39 | this.name = name;
40 | }
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitTestCase.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 | using System.Reflection;
4 |
5 | public class UUnitTestCase
6 | {
7 | private string testMethodName;
8 |
9 | public UUnitTestCase ()
10 | {
11 | }
12 |
13 | public UUnitTestCase (String testMethodName)
14 | {
15 | this.testMethodName = testMethodName;
16 | }
17 |
18 | public void SetTest (string testMethodName)
19 | {
20 | this.testMethodName = testMethodName;
21 | }
22 |
23 | public UUnitTestResult Run ()
24 | {
25 | return Run (null);
26 | }
27 |
28 | public UUnitTestResult Run (UUnitTestResult testResult)
29 | {
30 | if (testResult == null) {
31 | testResult = new UUnitTestResult ();
32 | }
33 |
34 | SetUp ();
35 |
36 | testResult.TestStarted ();
37 | try {
38 | Type type = this.GetType ();
39 | MethodInfo method = type.GetMethod (testMethodName);
40 | method.Invoke (this, null);
41 | } catch (TargetInvocationException e) {
42 | testResult.TestFailed ();
43 | Debug.Log (e.InnerException);
44 | } finally {
45 | TearDown ();
46 | }
47 |
48 | return testResult;
49 | }
50 |
51 | protected virtual void SetUp ()
52 | {
53 | }
54 |
55 | protected virtual void TearDown ()
56 | {
57 | }
58 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitTestSuite.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Reflection;
3 | using System.Collections.Generic;
4 | using System;
5 |
6 | public class UUnitTestSuite
7 | {
8 |
9 | private List tests = new List ();
10 |
11 | public void Add (UUnitTestCase testCase)
12 | {
13 | tests.Add (testCase);
14 | }
15 |
16 | public UUnitTestResult Run ()
17 | {
18 | return Run (null);
19 | }
20 |
21 | public UUnitTestResult Run (UUnitTestResult testResult)
22 | {
23 | if (testResult == null) {
24 | testResult = new UUnitTestResult ();
25 | }
26 |
27 | foreach (UUnitTestCase test in tests) {
28 | testResult = test.Run (testResult);
29 | }
30 | return testResult;
31 | }
32 |
33 | public void AddAll (Type testCaseType)
34 | {
35 | foreach (MethodInfo method in testCaseType.GetMethods()) {
36 | foreach (Attribute attribute in method.GetCustomAttributes(false)) {
37 | if (attribute != null) {
38 | ConstructorInfo constructor = testCaseType.GetConstructors () [0];
39 | UUnitTestCase newTestCase = (UUnitTestCase)constructor.Invoke (null);
40 | newTestCase.SetTest (method.Name);
41 | Add (newTestCase);
42 | }
43 | }
44 | }
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitTestRunner.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Reflection;
7 |
8 | public class UUnitTestRunner
9 | {
10 | private static void FindAndAddAllTestCases (UUnitTestSuite suite)
11 | {
12 | IEnumerable testCasesTypes = AppDomain.CurrentDomain.GetAssemblies ()
13 | .Select (x => x.GetTypes ())
14 | .SelectMany (x => x)
15 | .Where (c => !c.IsAbstract)
16 | .Where (c => c.IsSubclassOf (typeof(UUnitTestCase)));
17 |
18 | foreach (Type testCaseType in testCasesTypes) {
19 | suite.AddAll (testCaseType);
20 | }
21 | }
22 |
23 | private static void ClearDebugLog ()
24 | {
25 | Assembly assembly = Assembly.GetAssembly (typeof(SceneView));
26 | Type type = assembly.GetType ("UnityEditorInternal.LogEntries");
27 | MethodInfo method = type.GetMethod ("Clear");
28 | method.Invoke (new object (), null);
29 | }
30 |
31 | [MenuItem("UUnit/Run All Tests %#t")]
32 | private static void RunAllTests ()
33 | {
34 | ClearDebugLog ();
35 |
36 | UUnitTestSuite suite = new UUnitTestSuite ();
37 | FindAndAddAllTestCases (suite);
38 | UUnitTestResult result = suite.Run ();
39 |
40 | Debug.Log (result.Summary ());
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/UUnit/UUnitTestRunner.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Reflection;
7 |
8 | public class UUnitTestRunner
9 | {
10 | private static void FindAndAddAllTestCases (UUnitTestSuite suite)
11 | {
12 | IEnumerable testCasesTypes = AppDomain.CurrentDomain.GetAssemblies ()
13 | .Select (x => x.GetTypes ())
14 | .SelectMany (x => x)
15 | .Where (c => !c.IsAbstract)
16 | .Where (c => c.IsSubclassOf (typeof(UUnitTestCase)));
17 |
18 | foreach (Type testCaseType in testCasesTypes) {
19 | suite.AddAll (testCaseType);
20 | }
21 | }
22 |
23 | private static void ClearDebugLog ()
24 | {
25 | Assembly assembly = Assembly.GetAssembly (typeof(SceneView));
26 | Type type = assembly.GetType ("UnityEditorInternal.LogEntries");
27 | MethodInfo method = type.GetMethod ("Clear");
28 | method.Invoke (new object (), null);
29 | }
30 |
31 | [MenuItem("UUnit/Run All Tests %#t")]
32 | private static void RunAllTests ()
33 | {
34 | ClearDebugLog ();
35 |
36 | UUnitTestSuite suite = new UUnitTestSuite ();
37 | FindAndAddAllTestCases (suite);
38 | UUnitTestResult result = suite.Run ();
39 |
40 | Debug.Log (result.Summary ());
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Base/MeshOne.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/29
5 | * Time: 23:48
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 | using UnityEngine;
11 |
12 | namespace Tang
13 | {
14 | ///
15 | /// Description of MeshOne.
16 | ///
17 | public class MeshOne
18 | {
19 |
20 |
21 | private static Vector3[] vertices = new Vector3[]{
22 | new Vector3(-0.5F,0F,0.5F),
23 | new Vector3(0.5F,0F,0.5F),
24 | new Vector3(0.5F,0F,-0.5F),
25 | new Vector3(-0.5F,0F,-0.5F)
26 | };
27 | private static Vector2[] uv = new Vector2[]{
28 | new Vector2(0,1),
29 | new Vector2(1,1),
30 | new Vector2(1,0),
31 | new Vector2(0,0)
32 | };
33 | private static Vector3[] normals = new Vector3[]{
34 | Vector3.up,
35 | Vector3.up,
36 | Vector3.up,
37 | Vector3.up
38 | };
39 | private static int[] triangles = { 0,1,2,0,2,3 };
40 |
41 | public static Mesh NewMesh()
42 | {
43 | Mesh mesh = new Mesh();
44 | mesh.vertices = vertices;
45 | mesh.triangles = triangles;
46 | mesh.uv = uv;
47 | mesh.normals = normals;
48 | return mesh;
49 | }
50 |
51 |
52 | public static void Fix(ref Mesh mesh){
53 | mesh.vertices = vertices;
54 | mesh.triangles = triangles;
55 | mesh.uv = uv;
56 | mesh.normals = normals;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/MultiFrameSprite.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 |
5 | namespace Tang {
6 |
7 | [ExecuteInEditMode]
8 | public class MultiFrameSprite : Sprite {
9 |
10 | #region Public Fields
11 | public Frame[] frames;
12 | #endregion
13 |
14 | #region Public Properties
15 | public override int currentIndex {
16 | get {
17 | return m_currentIndex;
18 | }
19 | set {
20 | if( value != m_currentIndex ) {
21 | if( value > m_maxIndex ){
22 | if( m_currentIndex != m_maxIndex ) {
23 | m_currentIndex = m_maxIndex;
24 | CurrentFrame = frames[currentIndex];
25 | }
26 | } else if( value < 0 ){
27 | if( m_currentIndex != 0 ){
28 | m_currentIndex = 0;
29 | CurrentFrame = frames[m_currentIndex];
30 | }
31 | } else {
32 | m_currentIndex = value;
33 | CurrentFrame = frames[m_currentIndex];
34 |
35 | }
36 | }
37 | }
38 | }
39 | #endregion
40 |
41 | #region Mono Methods
42 |
43 | // Use this for initialization
44 | void Awake () {
45 |
46 | if( frames != null && frames.Length > 0 ){
47 |
48 | // init ---
49 | base.Init();
50 |
51 | m_maxIndex = frames.Length - 1;
52 |
53 | if( m_currentIndex > m_maxIndex ){
54 | m_currentIndex = m_maxIndex;
55 | } else if(m_currentIndex < 0){
56 | m_currentIndex = 0;
57 | }
58 |
59 | CurrentFrame = frames[m_currentIndex];
60 | // ---
61 | }
62 | }
63 |
64 | #endregion
65 | }
66 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/AtlasXmlParser.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 22:18
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System.Xml;
10 | using UnityEngine;
11 |
12 | namespace Tang
13 | {
14 | ///
15 | /// Description of AtlasXmlImporter.
16 | ///
17 | public abstract class AtlasXmlParser : AtlasParser
18 | {
19 | protected string text;
20 | protected XmlDocument xml = new XmlDocument();
21 |
22 | protected string AttrS(XmlNode node, string field)
23 | {
24 | try
25 | {
26 | return node.Attributes[field].InnerText;
27 | }
28 | catch (System.Exception)
29 | {
30 | return "";
31 | }
32 | }
33 |
34 | protected int AttrI(XmlNode node, string field)
35 | {
36 | try
37 | {
38 | return System.Convert.ToInt16(node.Attributes[field].InnerText);
39 | }
40 | catch (System.Exception)
41 | {
42 | return -1;
43 | }
44 | }
45 |
46 |
47 | ///
48 | /// Check if xml provided is valid
49 | ///
50 | /// Array with atlas frame data
51 | protected bool ValidXML()
52 | {
53 | try
54 | {
55 | xml.LoadXml(text);
56 | return true;
57 | }
58 | catch (System.Exception err)
59 | {
60 | Debug.LogError("Orthello : Atlas XML file could not be read!");
61 | Debug.LogError(err.Message);
62 | }
63 | return false;
64 | }
65 |
66 |
67 | public abstract Atlas Parse();
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/Atlas.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections.Generic;
3 |
4 |
5 | namespace Tang {
6 |
7 | public class Atlas {
8 |
9 | public string name;
10 | public Vector2 sheetSize = Vector2.zero;
11 | public AtlasData[] atlasData = null;
12 |
13 |
14 | public MidFrame[] GetMidFrames() {
15 |
16 | MidFrame[] frames = new MidFrame[atlasData.Length];
17 |
18 | for (int i = 0; i < atlasData.Length; i++)
19 | {
20 | AtlasData data = atlasData[i];
21 | MidFrame frame = new MidFrame();
22 | frame.name = data.name;
23 | frame.offset = data.offset;
24 | frame.size = data.size;
25 | // uv ---
26 | frame.uv = new Vector2[4];
27 | float sx = data.position.x / sheetSize.x;
28 | float sy = 1 - ((data.position.y + data.size.y) / sheetSize.y);
29 | float scx = data.size.x / sheetSize.x;
30 | float scy = data.size.y / sheetSize.y;
31 | if ( data.rotated )
32 | {
33 | sy = 1 - ((data.position.y + data.size.x) / sheetSize.y);
34 | scx = data.size.y / sheetSize.x;
35 | scy = data.size.x / sheetSize.y;
36 | frame.uv[3] = new Vector2(sx, sy + scy);
37 | frame.uv[0] = new Vector2(sx + scx, sy + scy);
38 | frame.uv[1] = new Vector2(sx + scx, sy);
39 | frame.uv[2] = new Vector2(sx, sy);
40 | } else {
41 | frame.uv[0] = new Vector2(sx, sy + scy);
42 | frame.uv[1] = new Vector2(sx + scx, sy + scy);
43 | frame.uv[2] = new Vector2(sx + scx, sy);
44 | frame.uv[3] = new Vector2(sx, sy);
45 | }
46 | // ---
47 |
48 | frames[i] = frame;
49 | }
50 | return frames;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/AnimationGenerator.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/8/12
5 | * Time: 17:24
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 | using UnityEngine;
11 | using UnityEditor;
12 |
13 | namespace Tang
14 | {
15 | ///
16 | /// Description of AnimationGenerator.
17 | ///
18 | public class AnimationGenerator
19 | {
20 |
21 | private const string npcPrefabDirPath = "Assets/Resources/Tang/Objects/Animations";
22 |
23 | ///
24 | /// 生成 NPC 动画
25 | ///
26 | /// npc 的 prefab
27 | public static void GenerateAnimation(GameObject obj){
28 |
29 |
30 | // 判断该对象是不是
31 | Sprite sprite = obj.GetComponent();
32 | Debug.Log(sprite);
33 | if(sprite != null) {
34 |
35 | GameObject animationObj = new GameObject();
36 | animationObj.name = obj.name + "-animation";
37 | SpriteAnimation animation = animationObj.AddComponent();
38 |
39 | // animation.
40 | SpriteLayer clothesLayer = new ClothesLayer(obj.GetComponent());
41 | animation.PutLayer(clothesLayer);
42 |
43 | string prefabPath = npcPrefabDirPath + "/" + animationObj.name + ".prefab";
44 | UnityEngine.Object prefab = PrefabUtility.CreateEmptyPrefab(prefabPath);
45 | PrefabUtility.ReplacePrefab(animationObj, prefab, ReplacePrefabOptions.ConnectToPrefab);
46 |
47 | // destory game object
48 | GameObject.DestroyImmediate(animationObj);
49 |
50 | }
51 |
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitSelfTest/TestCaseTest.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 |
3 | public class TestCaseTest : UUnitTestCase
4 | {
5 |
6 | [UUnitTest]
7 | public void TestRunning ()
8 | {
9 | TestCaseDummy local = new TestCaseDummy ("TestMethod");
10 | UUnitAssert.False (local.wasRun, " not wasRun");
11 | local.Run ();
12 | UUnitAssert.True (local.wasRun, "wasRun");
13 | }
14 |
15 | [UUnitTest]
16 | void TestSetUp ()
17 | {
18 | TestCaseDummy local = new TestCaseDummy ("TestMethod");
19 | local.Run ();
20 | UUnitAssert.True (local.wasSetUp, "wasSetUp");
21 | UUnitAssert.Equals (local.log, "setUp ", "setup");
22 | }
23 |
24 | [UUnitTest]
25 | public void TestResult ()
26 | {
27 | TestCaseDummy local = new TestCaseDummy ("TestMethod");
28 | UUnitTestResult result = local.Run ();
29 | UUnitAssert.Equals ("1 run, 0 failed", result.Summary (), "testResult");
30 | }
31 |
32 | [UUnitTest]
33 | public void TestFailure ()
34 | {
35 | TestCaseDummy local = new TestCaseDummy ("TestFail");
36 | UUnitTestResult result = local.Run ();
37 | UUnitAssert.Equals ("1 run, 1 failed", result.Summary (), "Failure");
38 | }
39 |
40 | [UUnitTest]
41 | public void TestTestSuiteAdd ()
42 | {
43 | UUnitTestSuite suite = new UUnitTestSuite ();
44 | suite.Add (new TestCaseDummy ("TestMethod"));
45 | suite.Add (new TestCaseDummy ("TestFail"));
46 | UUnitTestResult result = suite.Run ();
47 | UUnitAssert.Equals ("2 run, 1 failed", result.Summary (), "Suite");
48 | }
49 |
50 | [UUnitTest]
51 | public void TestTestSuiteAddAll ()
52 | {
53 | UUnitTestSuite suite = new UUnitTestSuite ();
54 | suite.AddAll (typeof(TestCaseDummy));
55 | UUnitTestResult result = suite.Run ();
56 | UUnitAssert.Equals ("2 run, 1 failed", result.Summary (), "Suite");
57 | }
58 |
59 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/MultiSetSprite.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections.Generic;
3 |
4 | namespace Tang {
5 |
6 | [ExecuteInEditMode]
7 | public class MultiSetSprite : MultiFrameSprite {
8 |
9 | #region Public Fields
10 | public FrameSet[] frameSets;
11 | public string m_currentSetName = null;
12 | #endregion
13 |
14 | #region Private Fields
15 | private Dictionary frameSetTable = new Dictionary();
16 | #endregion
17 |
18 | #region Public Properties
19 | public string currentSetName {
20 | get{
21 | return m_currentSetName;
22 | }
23 | set{
24 | if( frameSetTable.ContainsKey(value) && m_currentSetName != value ){
25 | m_currentSetName = value;
26 | frames = frameSetTable[m_currentSetName].frames;
27 | CurrentFrame = frames[0];
28 | }
29 | }
30 | }
31 | #endregion
32 |
33 | #region Mono Method
34 | // Use this for initialization
35 | void Awake () {
36 |
37 | if( frameSets != null && frameSets.Length > 0 ) {
38 |
39 | // init ---
40 | base.Init();
41 |
42 | foreach ( FrameSet frameSet in frameSets ) {
43 | frameSetTable.Add(frameSet.name, frameSet);
44 | }
45 |
46 | if ( m_currentSetName == null || !frameSetTable.ContainsKey(m_currentSetName) ) {
47 | m_currentSetName = frameSets[0].name;
48 | }
49 |
50 | frames = frameSetTable[m_currentSetName].frames;
51 |
52 | m_maxIndex = frames.Length - 1;
53 |
54 | if( m_currentIndex > m_maxIndex ){
55 | m_currentIndex = m_maxIndex;
56 | } else if( m_currentIndex < 0 ){
57 | m_currentIndex = 0;
58 | }
59 |
60 | CurrentFrame = frames[m_currentIndex];
61 |
62 | // ---
63 | }
64 | }
65 | #endregion
66 |
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/Tang.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 11.00
2 | # Visual Studio 2008
3 |
4 | Project("{F7F873BE-EF2F-6B2E-FC35-3CDB25DA76D0}") = "Tang", "Assembly-CSharp-firstpass.csproj", "{268B973C-9BCD-9946-9C18-9C10ABB81B5C}"
5 | EndProject
6 | Project("{F7F873BE-EF2F-6B2E-FC35-3CDB25DA76D0}") = "Tang", "Assembly-CSharp-Editor-firstpass.csproj", "{FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | GlobalSection(MonoDevelopProperties) = preSolution
27 | StartupItem = Assembly-CSharp.csproj
28 | Policies = $0
29 | $0.TextStylePolicy = $1
30 | $1.inheritsSet = null
31 | $1.scope = text/x-csharp
32 | $0.CSharpFormattingPolicy = $2
33 | $2.inheritsSet = Mono
34 | $2.inheritsScope = text/x-csharp
35 | $2.scope = text/x-csharp
36 | $0.TextStylePolicy = $3
37 | $3.FileWidth = 120
38 | $3.TabWidth = 4
39 | $3.EolMarker = Unix
40 | $3.inheritsSet = Mono
41 | $3.inheritsScope = text/plain
42 | $3.scope = text/plain
43 | EndGlobalSection
44 |
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/Tang-csharp.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 11.00
2 | # Visual Studio 2008
3 |
4 | Project("{F7F873BE-EF2F-6B2E-FC35-3CDB25DA76D0}") = "Tang", "Assembly-CSharp-firstpass-vs.csproj", "{268B973C-9BCD-9946-9C18-9C10ABB81B5C}"
5 | EndProject
6 | Project("{F7F873BE-EF2F-6B2E-FC35-3CDB25DA76D0}") = "Tang", "Assembly-CSharp-Editor-firstpass-vs.csproj", "{FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | GlobalSection(MonoDevelopProperties) = preSolution
27 | StartupItem = Assembly-CSharp.csproj
28 | Policies = $0
29 | $0.TextStylePolicy = $1
30 | $1.inheritsSet = null
31 | $1.scope = text/x-csharp
32 | $0.CSharpFormattingPolicy = $2
33 | $2.inheritsSet = Mono
34 | $2.inheritsScope = text/x-csharp
35 | $2.scope = text/x-csharp
36 | $0.TextStylePolicy = $3
37 | $3.FileWidth = 120
38 | $3.TabWidth = 4
39 | $3.EolMarker = Unix
40 | $3.inheritsSet = Mono
41 | $3.inheritsScope = text/plain
42 | $3.scope = text/plain
43 | EndGlobalSection
44 |
45 | EndGlobal
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 | Library/
5 | Temp/
6 |
7 | # mstest test results
8 | TestResults
9 |
10 | ## Ignore Visual Studio temporary files, build results, and
11 | ## files generated by popular Visual Studio add-ons.
12 |
13 | # User-specific files
14 | *.suo
15 | *.user
16 | *.sln.docstates
17 |
18 | # Build results
19 | [Dd]ebug/
20 | [Rr]elease/
21 | x64/
22 | *_i.c
23 | *_p.c
24 | *.ilk
25 | *.meta
26 | *.obj
27 | *.pch
28 | *.pdb
29 | *.pgc
30 | *.pgd
31 | *.rsp
32 | *.sbr
33 | *.tlb
34 | *.tli
35 | *.tlh
36 | *.tmp
37 | *.log
38 | *.vspscc
39 | *.vssscc
40 | .builds
41 |
42 | # Visual C++ cache files
43 | ipch/
44 | *.aps
45 | *.ncb
46 | *.opensdf
47 | *.sdf
48 |
49 | # Visual Studio profiler
50 | *.psess
51 | *.vsp
52 | *.vspx
53 |
54 | # Guidance Automation Toolkit
55 | *.gpState
56 |
57 | # ReSharper is a .NET coding add-in
58 | _ReSharper*
59 |
60 | # NCrunch
61 | *.ncrunch*
62 | .*crunch*.local.xml
63 |
64 | # Installshield output folder
65 | [Ee]xpress
66 |
67 | # DocProject is a documentation generator add-in
68 | DocProject/buildhelp/
69 | DocProject/Help/*.HxT
70 | DocProject/Help/*.HxC
71 | DocProject/Help/*.hhc
72 | DocProject/Help/*.hhk
73 | DocProject/Help/*.hhp
74 | DocProject/Help/Html2
75 | DocProject/Help/html
76 |
77 | # Click-Once directory
78 | publish
79 |
80 | # Publish Web Output
81 | *.Publish.xml
82 |
83 | # NuGet Packages Directory
84 | packages
85 |
86 | # Windows Azure Build Output
87 | csx
88 | *.build.csdef
89 |
90 | # Windows Store app package directory
91 | AppPackages/
92 |
93 | # Others
94 | [Bb]in
95 | [Oo]bj
96 | sql
97 | TestResults
98 | [Tt]est[Rr]esult*
99 | *.Cache
100 | ClientBin
101 | [Ss]tyle[Cc]op.*
102 | ~$*
103 | *.dbmdl
104 | Generated_Code #added for RIA/Silverlight projects
105 |
106 | # Backup & report files from converting an old project file to a newer
107 | # Visual Studio version. Backup files are not needed, because we have git ;-)
108 | _UpgradeReport_Files/
109 | Backup*/
110 | UpgradeLog*.XML
111 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/TangEditorCommand.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using UnityEditor;
3 | using System.Collections;
4 |
5 | namespace Tang {
6 |
7 | public class EditorCommand {
8 |
9 | [MenuItem ("Tang/1. Make Sprites From Selection")]
10 | public static void MakePrefabs(){
11 |
12 | foreach(Object obj in Selection.objects){
13 | if(obj is TextAsset){
14 | Maker.Make(obj as TextAsset);
15 | }
16 | }
17 | }
18 |
19 | [MenuItem("Tang/2. Generate Animations From Selection")]
20 | public static void GenerateAnimation(){
21 |
22 | foreach(Object obj in Selection.objects){
23 | AnimationGenerator.GenerateAnimation(obj as GameObject);
24 | }
25 | }
26 |
27 | [MenuItem("Tang/3.0 Build AssetBundles From - Track dependencies Selection - Android")]
28 | public static void BuildAssetBundlesAndroid(){
29 |
30 | string dirPath = EditorUtility.SaveFolderPanel("Save AssetBundles to directory", "", "");
31 | if (dirPath.Length != 0) {
32 |
33 | foreach(UnityEngine.Object obj in Selection.objects){
34 |
35 | string filepath = dirPath + "/" + obj.name + ".assetbundle";
36 |
37 | BuildPipeline.BuildAssetBundle(obj, null, filepath
38 | , BuildAssetBundleOptions.CollectDependencies
39 | | BuildAssetBundleOptions.CompleteAssets
40 | ,BuildTarget.Android);
41 |
42 | }
43 |
44 | }
45 | }
46 |
47 | [MenuItem("Tang/3.1 Build AssetBundles From - Track dependencies Selection - WebPlayerStreamed")]
48 | public static void BuildAssetBundlesWebPlayer(){
49 |
50 | string dirPath = EditorUtility.SaveFolderPanel("Save AssetBundles to directory", "", "");
51 | if (dirPath.Length != 0) {
52 |
53 | foreach(UnityEngine.Object obj in Selection.objects){
54 |
55 | string filepath = dirPath + "/" + obj.name + ".assetbundle";
56 |
57 | BuildPipeline.BuildAssetBundle(obj, null, filepath
58 | , BuildAssetBundleOptions.CollectDependencies
59 | | BuildAssetBundleOptions.CompleteAssets
60 | ,BuildTarget.WebPlayerStreamed);
61 | }
62 | }
63 | }
64 | }
65 | }
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang-Test/Scene/SpriteAnimationTest/SpriteAnimationTestCase.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace Tang
5 | {
6 |
7 | public class SpriteAnimationTestCase : UUnitTestCase {
8 |
9 | private string clothesPath = "Tang-Test/Output/MultiSet/Prefab/player_lygf0";
10 | private string weaponPath = "Tang-Test/Output/MultiSet/Prefab/weapon_hf3";
11 | private string clothesPath1 = "Tang-Test/Output/MultiSet/Prefab/player_lygf1";
12 |
13 | private Sprite clothesPrefab = null;
14 | private Sprite weaponPrefab = null;
15 | private Sprite clothesPrefab1 = null;
16 |
17 | private SpriteAnimation animation = null;
18 |
19 | protected override void SetUp(){
20 |
21 | animation = GameObject.FindObjectOfType(typeof(SpriteAnimation)) as SpriteAnimation;
22 | UUnitAssert.NotNull(Resources.Load(clothesPath));
23 | GameObject clothesGo = Resources.Load(clothesPath) as GameObject;
24 | GameObject weaponGo = Resources.Load(weaponPath) as GameObject;
25 | GameObject clothesGo1 = Resources.Load(clothesPath1) as GameObject;
26 |
27 | clothesPrefab = clothesGo.GetComponent();
28 | weaponPrefab = weaponGo.GetComponent();
29 | clothesPrefab1 = clothesGo1.GetComponent();
30 |
31 | }
32 |
33 | [UUnitTest]
34 | public void TestAllMethods(){
35 |
36 | PrefixTest();
37 |
38 | SpriteLayer clothesLayer = new ClothesLayer();
39 |
40 | SpriteLayer weaponLayer = new WeaponLayer();
41 |
42 | animation.PutLayer(clothesLayer);
43 | animation.PutLayer(weaponLayer);
44 |
45 |
46 | if(animation.IsPlaying){
47 | animation.Stop();
48 | UUnitAssert.False(animation.IsPlaying);
49 | animation.Play();
50 | UUnitAssert.True(animation.IsPlaying);
51 | } else {
52 | animation.Play();
53 | UUnitAssert.True(animation.IsPlaying);
54 | animation.Stop();
55 | UUnitAssert.False(animation.IsPlaying);
56 | }
57 |
58 | weaponLayer = animation.GetLayer(LayerID.WEAPON);
59 | UUnitAssert.NotNull(weaponLayer);
60 | animation.Clear(weaponLayer);
61 |
62 | weaponLayer = animation.GetLayer(weaponLayer.id);
63 | UUnitAssert.NotNull(weaponLayer);
64 | weaponLayer.spritePrefab = weaponPrefab;
65 | animation.PutLayer(weaponLayer);
66 |
67 | animation.Open(clothesPrefab1, LayerID.CLOTHES);
68 |
69 |
70 | }
71 |
72 |
73 |
74 | private void PrefixTest(){
75 |
76 | UUnitAssert.NotNull(animation);
77 | UUnitAssert.NotNull(clothesPrefab);
78 | UUnitAssert.NotNull(weaponPrefab);
79 |
80 | }
81 |
82 |
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Tang/Sprite/Sprite.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System.Collections;
3 |
4 | namespace Tang {
5 |
6 | public class Sprite : MonoBehaviour {
7 |
8 | #region Public Fields
9 | public bool m_flipHorizontal = false;
10 | public bool m_flipVertical = false;
11 | public int m_currentIndex = 0;
12 | #endregion
13 |
14 | #region Protected Fields
15 | protected int m_maxIndex = 0;
16 | #endregion
17 |
18 | #region Private Fields
19 | private MeshFilter mf = null;
20 | private bool frameUpdated = false;
21 | private Frame m_currentFrame = null;
22 | #endregion
23 |
24 | #region Public Properties
25 | public int maxIndex {
26 | get { return m_maxIndex;}
27 | }
28 | public virtual int currentIndex {
29 | get { return m_currentIndex; }
30 | set { m_currentIndex = value; }
31 | }
32 | public Frame CurrentFrame {
33 | get {
34 | return m_currentFrame;
35 | }
36 | set {
37 | if(value != null){
38 | m_currentFrame = value;
39 | frameUpdated = true;
40 | }
41 | }
42 | }
43 | public bool flipHorizontal {
44 | get { return m_flipHorizontal; }
45 | set {
46 | if( m_flipHorizontal != value ) {
47 | m_flipHorizontal = value;
48 | frameUpdated = true;
49 | }
50 | }
51 | }
52 | public bool flipVertical {
53 | get { return m_flipVertical; }
54 | set {
55 | if( m_flipVertical != value ){
56 | m_flipVertical = value;
57 | frameUpdated = true;
58 | }
59 | }
60 | }
61 | #endregion
62 |
63 | #region Protected Methods
64 | protected void Init(){
65 | InitComponents();
66 | }
67 |
68 | protected void InitComponents(){
69 |
70 | mf = gameObject.GetComponent();
71 | if(mf == null)
72 | mf = gameObject.AddComponent();
73 | Mesh mesh = MeshOne.NewMesh();
74 | mf.mesh = mesh;
75 |
76 | }
77 |
78 | protected void UpdateMesh(Frame fr){
79 |
80 | Vector2[] uv = fr.uv;
81 |
82 | if( flipHorizontal ){
83 | uv = new Vector2[fr.uv.Length];
84 | for(int i=0; i
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp-Editor-firstpass
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll
59 |
60 |
61 |
62 |
63 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C} Assembly-CSharp-firstpass
64 |
65 |
66 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Assembly-CSharp-Editor-firstpass-vs.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {FFA8E0F0-89AF-52B5-3DD4-2E3FA2C3005E}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp-Editor-firstpass
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | C:\Program Files (x86)\Unity\Editor\Data\Managed\UnityEditor.Graphs.dll
59 |
60 |
61 |
62 |
63 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C} Assembly-CSharp-firstpass-vs
64 |
65 |
66 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/UUnit/UUnitAssert.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using System;
3 |
4 | public class UUnitAssert
5 | {
6 | public static double DEFAULT_DOUBLE_PRECISION = 0.000001;
7 |
8 | private UUnitAssert ()
9 | {
10 | }
11 |
12 | public static void Fail ()
13 | {
14 | throw new UUnitAssertException ("fail");
15 | }
16 |
17 | public static void True (bool boolean, string message)
18 | {
19 | if (boolean) {
20 | return;
21 | }
22 | throw new UUnitAssertException (true, false, message);
23 | }
24 |
25 | public static void True (bool boolean)
26 | {
27 | if (boolean) {
28 | return;
29 | }
30 | throw new UUnitAssertException (true, false);
31 | }
32 |
33 | public static void False (bool boolean, string message)
34 | {
35 | if (!boolean) {
36 | return;
37 | }
38 | throw new UUnitAssertException (false, true, message);
39 | }
40 |
41 | public static void False (bool boolean)
42 | {
43 | if (!boolean) {
44 | return;
45 | }
46 | throw new UUnitAssertException (false, true);
47 | }
48 |
49 | public static void NotNull (object something)
50 | {
51 | if (something != null) {
52 | return;
53 | }
54 | throw new UUnitAssertException ("Null object");
55 | }
56 |
57 | public static void Null (object something)
58 | {
59 | if (something == null) {
60 | return;
61 | }
62 | throw new UUnitAssertException ("Not null object");
63 | }
64 |
65 | public static void Equals (string wanted, string got, string message)
66 | {
67 | if (wanted == got) {
68 | return;
69 | }
70 | throw new UUnitAssertException (wanted, got, message);
71 | }
72 |
73 | public static void Equals (string wanted, string got)
74 | {
75 | if (wanted == got)
76 | return;
77 | throw new UUnitAssertException (wanted, got);
78 | }
79 |
80 | public static void Equals (int wanted, int got, string message)
81 | {
82 | if (wanted == got) {
83 | return;
84 | }
85 | throw new UUnitAssertException (wanted, got, message);
86 | }
87 |
88 | public static void Equals (int wanted, int got)
89 | {
90 | if (wanted == got) {
91 | return;
92 | }
93 | throw new UUnitAssertException (wanted, got);
94 | }
95 |
96 | public static void Equals (double wanted, double got, double precision)
97 | {
98 | if (Math.Abs (wanted - got) < precision) {
99 | return;
100 | }
101 | throw new UUnitAssertException (wanted, got);
102 | }
103 |
104 | public static void Equals (double wanted, double got)
105 | {
106 | Equals (wanted, got, DEFAULT_DOUBLE_PRECISION);
107 | }
108 |
109 | public static void Equals (char wanted, char got)
110 | {
111 | if (wanted == got) {
112 | return;
113 | }
114 | throw new UUnitAssertException (wanted, got);
115 | }
116 |
117 | public static void Equals (Vector3 wanted, Vector3 got)
118 | {
119 | Equals (wanted, got, DEFAULT_DOUBLE_PRECISION);
120 | }
121 |
122 | public static void Equals (Vector3 wanted, Vector3 got, double precision)
123 | {
124 | if (Math.Abs (wanted.x - got.x) < precision &&
125 | Math.Abs (wanted.y - got.y) < precision &&
126 | Math.Abs (wanted.z - got.z) < precision)
127 | return;
128 | throw new UUnitAssertException (wanted, got);
129 | }
130 |
131 | public static void Equals (Vector3 wanted, Vector3 got, string message)
132 | {
133 | Equals (wanted, got, message, DEFAULT_DOUBLE_PRECISION);
134 | }
135 |
136 | public static void Equals (Vector3 wanted, Vector3 got, string message, double precision)
137 | {
138 | if (Math.Abs (wanted.x - got.x) < precision &&
139 | Math.Abs (wanted.y - got.y) < precision &&
140 | Math.Abs (wanted.z - got.z) < precision)
141 | return;
142 | throw new UUnitAssertException (wanted, got, message);
143 | }
144 |
145 | public static void Equals (object wanted, object got, string message)
146 | {
147 | if (wanted == got) {
148 | return;
149 | }
150 | throw new UUnitAssertException (wanted, got, message);
151 | }
152 |
153 | public new static void Equals (object wanted, object got)
154 | {
155 | if (wanted == got) {
156 | return;
157 | }
158 | throw new UUnitAssertException (wanted, got);
159 | }
160 |
161 | }
162 |
--------------------------------------------------------------------------------
/Assembly-CSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {DEA6BE0E-5DF3-A509-429F-1D54AAE83DAB}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C} Assembly-CSharp-firstpass
69 |
70 |
71 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/Assembly-CSharp-vs.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {DEA6BE0E-5DF3-A509-429F-1D54AAE83DAB}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C} Assembly-CSharp-firstpass-vs
69 |
70 |
71 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/AtlasCocos2DParser.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 22:31
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using UnityEngine;
10 | using System.Collections;
11 | using System.Collections.Generic;
12 | using System.Xml;
13 |
14 |
15 | namespace Tang
16 | {
17 | ///
18 | /// Description of AtlasCocos2DImporter.
19 | ///
20 | public class AtlasCocos2DParser : AtlasXmlParser
21 | {
22 |
23 | public XmlNode subTexture = null;
24 |
25 | public AtlasCocos2DParser(string text){
26 | this.text = text;
27 | }
28 |
29 | public override Atlas Parse() {
30 |
31 | if (!ValidXML())
32 | return null;
33 |
34 | Vector2 sheetSize = Vector2.zero;
35 | List data = new List();
36 | string name = null;
37 |
38 | if ( xml.DocumentElement.Name == "plist" ) {
39 | XmlNodeList nodeList = xml.DocumentElement.SelectNodes("dict/key");
40 | for (int i=0; i0)
89 | name = sa[0];
90 | }
91 | }
92 | }
93 | }
94 |
95 | Atlas atlas = new Atlas();
96 | atlas.atlasData = data.ToArray();
97 | atlas.sheetSize = sheetSize;
98 | atlas.name = name;
99 |
100 | return atlas;
101 | }
102 |
103 | private Vector2 StringToVector2(string s)
104 | {
105 | string _s = s.Substring(1, s.Length - 2);
106 | string[] sa = _s.Split(',');
107 | return new Vector2(System.Convert.ToSingle(sa[0]), System.Convert.ToSingle(sa[1]));
108 | }
109 |
110 | private Rect StringToRect(string s)
111 | {
112 | string _s = s.Substring(1, s.Length - 2);
113 | string[] sa = _s.Split(new string[] { "},{" }, System.StringSplitOptions.None);
114 | Vector2 v1 = StringToVector2(sa[0]+"}");
115 | Vector2 v2 = StringToVector2("{"+sa[1]);
116 | return new Rect(v1.x, v1.y, v2.x, v2.y);
117 | }
118 |
119 | private Rect GetRect(string name)
120 | {
121 | XmlNode nameNode = subTexture.SelectSingleNode("key[.='" + name + "']");
122 | if (nameNode != null)
123 | {
124 | XmlNode stringNode = nameNode.NextSibling;
125 | return StringToRect(stringNode.InnerText);
126 | }
127 | return new Rect(0, 0, 0, 0);
128 | }
129 |
130 | private Vector2 GetVector2(string name)
131 | {
132 | XmlNode nameNode = subTexture.SelectSingleNode("key[.='" + name + "']");
133 | if (nameNode != null)
134 | {
135 | XmlNode stringNode = nameNode.NextSibling;
136 | return StringToVector2(stringNode.InnerText);
137 | }
138 | return Vector2.zero;
139 | }
140 |
141 | private bool GetBool(string name)
142 | {
143 | XmlNode nameNode = subTexture.SelectSingleNode("key[.='" + name + "']");
144 | if (nameNode != null)
145 | {
146 | XmlNode boolNode = nameNode.NextSibling;
147 | return (boolNode.Name.ToLower() == "true");
148 | }
149 | return false;
150 | }
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/Assembly-CSharp-firstpass-vs.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp-firstpass
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Assembly-CSharp-firstpass.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {268B973C-9BCD-9946-9C18-9C10ABB81B5C}
9 | Library
10 | Properties
11 |
12 | Assembly-CSharp-firstpass
13 | v3.5
14 | 512
15 |
16 |
17 | true
18 | full
19 | false
20 | Temp\bin\Debug\
21 | DEBUG;TRACE;UNITY_STANDALONE_WIN;ENABLE_MICROPHONE;ENABLE_IMAGEEFFECTS;ENABLE_WEBCAM;ENABLE_AUDIO_FMOD;UNITY_STANDALONE;ENABLE_NETWORK;ENABLE_MONO;ENABLE_PHYSICS;ENABLE_TERRAIN;ENABLE_CACHING;ENABLE_SUBSTANCE;ENABLE_GENERICS;ENABLE_CLOTH;ENABLE_MOVIES;ENABLE_AUDIO;ENABLE_WWW;ENABLE_SHADOWS;ENABLE_DUCK_TYPING;UNITY_4_1_0;UNITY_4_1;ENABLE_PROFILER;UNITY_EDITOR;UNITY_TEAM_LICENSE
22 | prompt
23 | 4
24 | 0169
25 |
26 |
27 | pdbonly
28 | true
29 | Temp\bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 | 0169
34 |
35 |
36 |
37 |
38 |
39 |
40 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEngine.dll
41 |
42 |
43 | C:/Program Files (x86)/Unity/Editor/Data/Managed/UnityEditor.dll
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Assets/Standard Assets/Editor/Tang/Maker.cs:
--------------------------------------------------------------------------------
1 | /*
2 | * Created by SharpDevelop.
3 | * User: zzc
4 | * Date: 2013/7/30
5 | * Time: 23:40
6 | *
7 | * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 | */
9 | using System;
10 | using System.Collections.Generic;
11 | using UnityEngine;
12 | using UnityEditor;
13 |
14 | namespace Tang
15 | {
16 | ///
17 | /// Description of Maker.
18 | ///
19 | public class Maker
20 | {
21 |
22 |
23 | public static void Make(TextAsset textAsset){
24 |
25 | // input
26 | // Assets/Tang/Input/MultiSet/Data/mount_0.xml
27 | string textAssetPath = AssetDatabase.GetAssetPath(textAsset);
28 | string textAssetDirPath = textAssetPath.Substring(0,textAssetPath.LastIndexOf('/'));
29 | string texturePath = textAssetPath.Replace("Data","Textures").Replace(".xml",".png");
30 | // output
31 | string matAlphaPath = textAssetPath.Replace("Input","Output").Replace("Data","Materials").Replace(".xml","-alpha.mat");
32 | string prefabDirPath = textAssetDirPath.Replace("Input","Output").Replace("Data","Prefabs");
33 | // parameters
34 | string[] splits = textAssetPath.Split(new Char[]{'/'});
35 | string resName = splits[splits.Length - 1].Split(new Char[]{'.'})[0];
36 |
37 | // parse data
38 | AtlasParser parser = new AtlasCocos2DParser(textAsset.text);
39 | Atlas atls = parser.Parse();
40 | MidFrame[] midFrames = atls.GetMidFrames();
41 |
42 | // create material
43 | Material matAlpha = new Material(Shader.Find("Mobile/Particles/Alpha Blended"));
44 | matAlpha.name = resName + "_alpha";
45 | matAlpha.mainTexture = AssetDatabase.LoadAssetAtPath(texturePath, typeof(Texture)) as Texture;
46 | AssetDatabase.CreateAsset(matAlpha, matAlphaPath);
47 |
48 | string spriteType = splits[splits.Length-3];
49 |
50 | if( "MultiSet".Equals(spriteType) ){
51 |
52 | Dictionary> frameTable = new Dictionary>();
53 | foreach( MidFrame frame in midFrames ){
54 |
55 | string[] frameNamesplits = frame.name.Split(new Char[]{ '_' });
56 | string key = frameNamesplits[0];
57 | //string index = frameNamesplits[1];
58 |
59 | List frameList = null;
60 | if( !frameTable.ContainsKey(key) ) {
61 | frameList = new List();
62 | frameTable.Add(key, frameList);
63 | } else {
64 | frameList = frameTable[key];
65 | }
66 |
67 | frameList.Add(frame);
68 |
69 | }
70 |
71 | List