mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2026-01-04 15:36:54 +07:00
Compare commits
41 Commits
versions/1
...
versions/1
| Author | SHA1 | Date | |
|---|---|---|---|
| df364244b4 | |||
| 5012b53ac1 | |||
| b7e026e8ff | |||
| 4df50242cc | |||
| 3f4fc9f8aa | |||
| 1976d315c4 | |||
| 1abb0878b9 | |||
| 294c6bba91 | |||
| df9d7ccd43 | |||
| 8981016d57 | |||
| bc8ea51463 | |||
| ce4c644ef2 | |||
| dc77088885 | |||
| ae5cc6de9f | |||
| a351e7352d | |||
| c607777454 | |||
| ce269317fc | |||
| 7e95d6b49a | |||
| f098bfc9bc | |||
| bee56e75a9 | |||
| 7ba00a7e9a | |||
| 545eacdaf8 | |||
| ad0e6251e8 | |||
| 6f4f11cc9d | |||
| 7e4bd5b159 | |||
| 2d8bd13384 | |||
| fa8a636d2e | |||
| 27bb4ef58d | |||
| ece15d9ada | |||
| bc8d6c890a | |||
| f12f2f9012 | |||
| c6f86098e2 | |||
| cc8677e61f | |||
| 0386992965 | |||
| a19ca2499f | |||
| ce4611e23b | |||
| 99d4236e13 | |||
| 04ddf0d08e | |||
| 77287a9b4a | |||
| 5b26becc27 | |||
| 1084c839a1 |
@@ -2,6 +2,9 @@ glob:obj/*
|
||||
glob:Temp/*
|
||||
glob:Library/*
|
||||
|
||||
glob:AssetStoreTools/*
|
||||
glob:AssetStoreTools.meta
|
||||
|
||||
glob:.DS_Store
|
||||
glob:unityflash.sln
|
||||
glob:unityflash.userprefs
|
||||
|
||||
0
.projectile
Normal file
0
.projectile
Normal file
BIN
Assets/DevTests/Animations/AlphaTests/Ducat/Shield.fla
Normal file
BIN
Assets/DevTests/Animations/AlphaTests/Ducat/Shield.fla
Normal file
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ffe731bf74d034b948a5ec392ba8e284
|
||||
timeCreated: 1476541234
|
||||
guid: 936cd155c254c405cbfaa7caf5447e69
|
||||
timeCreated: 1486882364
|
||||
licenseType: Free
|
||||
TextScriptImporter:
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e3bddf96333643c8a12fd862ebc9ec7
|
||||
guid: 2d8762b6bff92457aa59aaf03193018c
|
||||
folderAsset: yes
|
||||
timeCreated: 1480709542
|
||||
timeCreated: 1487860932
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Elefun/open.fla
Normal file
BIN
Assets/DevTests/Animations/AlphaTests/Elefun/open.fla
Normal file
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfa1591b561424bf6a952fcb68bebbc0
|
||||
timeCreated: 1472651507
|
||||
guid: d481c08b811dc41eda079968a32efbb9
|
||||
timeCreated: 1487860937
|
||||
licenseType: Free
|
||||
TextScriptImporter:
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
BIN
Assets/DevTests/Animations/AlphaTests/Tortuga/hero_pirate.fla
Normal file
BIN
Assets/DevTests/Animations/AlphaTests/Tortuga/hero_pirate.fla
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 55c438c941e894f25bb2b0527ee72f7c
|
||||
timeCreated: 1486989506
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/DevTests/Animations/AlphaTests/Tortuga/soulreaper.fla
Normal file
BIN
Assets/DevTests/Animations/AlphaTests/Tortuga/soulreaper.fla
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 672cf0095a3044ff298e605979974aa6
|
||||
timeCreated: 1486823787
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -145,7 +145,7 @@ Camera:
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 1.5
|
||||
orthographic size: 3
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
71
Assets/FlashTools/Docs/CHANGELOG.md
Normal file
71
Assets/FlashTools/Docs/CHANGELOG.md
Normal file
@@ -0,0 +1,71 @@
|
||||
###### Version 1.3.7
|
||||
* Fix multiple import
|
||||
* Fix single frame optimization
|
||||
|
||||
###### Version 1.3.6
|
||||
* Fix for scale very small vector items
|
||||
* Big vector item optimization
|
||||
* More yield instructions and extensions
|
||||
|
||||
###### Version 1.3.5
|
||||
* Fix sprite import problem
|
||||
|
||||
###### Version 1.3.4
|
||||
* Fix CS6 export problem
|
||||
* Fix unity postprocessor problems
|
||||
|
||||
###### Version 1.3.3
|
||||
* Fix undefined unusedItems in CS6
|
||||
|
||||
###### Version 1.3.2
|
||||
* Fix bug custom scale export with small items optimization
|
||||
|
||||
###### Version 1.3.1
|
||||
* Fix some Unity 5.5 deprecated functions
|
||||
|
||||
###### Version 1.3.0
|
||||
* ETC separated alpha support
|
||||
* Export animations with custom scale (for retina)
|
||||
* New small vector scaled items optimization
|
||||
|
||||
###### Version 1.2.0
|
||||
* Add Yield instructions for wait in coroutines(SwfWaitPlayStopped, SwfWaitRewindPlaying, SwfWaitStopPlaying)
|
||||
* Add unscaled delta time support(for separate animations, groups of animations or for all)
|
||||
* Fix guide type flash layers
|
||||
* Some fixes for reconvert asset problem
|
||||
|
||||
###### Version 1.1.1
|
||||
* Add conversion error by shape tween in CS6
|
||||
* Fix life after death (problem about destroying with big lag by frame event)
|
||||
|
||||
###### Version 1.1.0
|
||||
* Sequence separator is anchor frame label (not common frame label)
|
||||
* SwfClip access to frame labels (currentLabelCount, GetCurrentFrameLabel)
|
||||
* SwfClip events (OnChangeClipEvent, OnChangeSequenceEvent, OnChangeCurrentFrameEvent)
|
||||
|
||||
###### Version 1.0.0
|
||||
* Initial asset store version
|
||||
* Sources to dll
|
||||
* Palette bitmaps support
|
||||
|
||||
###### Version 0.5.0
|
||||
* Flash optimizer twicks
|
||||
* Blending modes (except Alpha and Erase)
|
||||
|
||||
###### Version 0.4.0
|
||||
* Clip groups
|
||||
* Fix move assets bug
|
||||
* Tint color for clips
|
||||
* Animation API improvements
|
||||
|
||||
###### Version 0.3.0
|
||||
* Preview for animation assets and clips
|
||||
* Animation API improvements
|
||||
* Memory optimizations
|
||||
|
||||
###### Version 0.2.0
|
||||
* Export optimizations
|
||||
* Export clips with export names
|
||||
|
||||
###### Version 0.1.0
|
||||
* Initial alpha version
|
||||
8
Assets/FlashTools/Docs/CHANGELOG.md.meta
Normal file
8
Assets/FlashTools/Docs/CHANGELOG.md.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 309e798efeb2741c6853f2402363a067
|
||||
timeCreated: 1487174180
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,68 +0,0 @@
|
||||
-------------------
|
||||
-- Version 1.2.0 --
|
||||
-------------------
|
||||
|
||||
Add Yield instructions for wait in coroutines(SwfWaitPlayStopped, SwfWaitRewindPlaying, SwfWaitStopPlaying)
|
||||
Add unscaled delta time support(for separate animations, groups of animations or for all)
|
||||
Fix guide type flash layers
|
||||
Some fixes for reconvert asset problem
|
||||
|
||||
-------------------
|
||||
-- Version 1.1.1 --
|
||||
-------------------
|
||||
|
||||
Add conversion error by shape tween in CS6
|
||||
Fix life after death (problem about destroying with big lag by frame event)
|
||||
|
||||
-------------------
|
||||
-- Version 1.1.0 --
|
||||
-------------------
|
||||
|
||||
Sequence separator is anchor frame label (not common frame label)
|
||||
SwfClip access to frame labels (currentLabelCount, GetCurrentFrameLabel)
|
||||
SwfClip events (OnChangeClipEvent, OnChangeSequenceEvent, OnChangeCurrentFrameEvent)
|
||||
|
||||
-------------------
|
||||
-- Version 1.0.0 --
|
||||
-------------------
|
||||
|
||||
Initial asset store version
|
||||
Sources to dll
|
||||
Palette bitmaps support
|
||||
|
||||
-------------------
|
||||
-- Version 0.5.0 --
|
||||
-------------------
|
||||
|
||||
Flash optimizer twicks
|
||||
Blending modes (except Alpha and Erase)
|
||||
|
||||
-------------------
|
||||
-- Version 0.4.0 --
|
||||
-------------------
|
||||
|
||||
Clip groups
|
||||
Fix move assets bug
|
||||
Tint color for clips
|
||||
Animation API improvements
|
||||
|
||||
-------------------
|
||||
-- Version 0.3.0 --
|
||||
-------------------
|
||||
|
||||
Preview for animation assets and clips
|
||||
Animation API improvements
|
||||
Memory optimizations
|
||||
|
||||
-------------------
|
||||
-- Version 0.2.0 --
|
||||
-------------------
|
||||
|
||||
Export optimizations
|
||||
Export clips with export names
|
||||
|
||||
-------------------
|
||||
-- Version 0.1.0 --
|
||||
-------------------
|
||||
|
||||
Initial alpha version
|
||||
33
Assets/FlashTools/Docs/README.md
Normal file
33
Assets/FlashTools/Docs/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
##### Flash Animation Toolset
|
||||
|
||||
Convert your flash animation for Unity easy!
|
||||
|
||||
* [Usage video](http://www.youtube.com/watch?v=uE_XRWZ5KHA)
|
||||
|
||||
* [Blog](http://matov.me)
|
||||
* [Site](http://matov.me/flash-animation-toolset)
|
||||
* [Web demo](http://matov.me/public/blog_share/flash_tools/web_demo)
|
||||
* [User guide](http://matov.me/flash-animation-toolset-user-guide)
|
||||
|
||||
* [Trial version](https://www.assetstore.unity3d.com/#!/content/73896)
|
||||
* [Full version](https://www.assetstore.unity3d.com/#!/content/73323)
|
||||
|
||||
###### Features
|
||||
* Support all transformations like 'rotation', 'skew' and 'scale' (except 3D)
|
||||
* Support all tweens(classic, motion and etc), keyframes and layers
|
||||
* Support mask layers
|
||||
* Support bitmap and vector graphics
|
||||
* Support all clip color effects like 'brightness', 'tint', 'alpha' and etc
|
||||
* Support most blending modes (all except Alpha and Erase)
|
||||
* Simple runtime API for controlling your animations in Unity
|
||||
* Automatic packing texture atlases of animations with different settings
|
||||
* Great performance with zero allocations in update loop
|
||||
* Frame labels to separate sequences in one timeline
|
||||
* Export marked "for export" clips and main timeline
|
||||
* Live preview of animations in the Unity editor
|
||||
|
||||
Supports Unity 5.3 and newer, both Personal and Pro. Full C# source code included.
|
||||
|
||||
Leave your rating for this Asset. It is very important for me and the development of the project :) Thank you!
|
||||
|
||||
Samples use "Creative Commons CC0 1.0 Universal License" animations from [Glitch game](http://www.glitchthegame.com/public-domain-game-art)
|
||||
8
Assets/FlashTools/Docs/README.md.meta
Normal file
8
Assets/FlashTools/Docs/README.md.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 67cb565c063ff409697ad8b538d2a46a
|
||||
timeCreated: 1487174181
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,35 +0,0 @@
|
||||
-----------------------------
|
||||
-- Flash Animation Toolset --
|
||||
-----------------------------
|
||||
|
||||
Convert your flash animation for Unity easy!
|
||||
|
||||
- Usage video "http://www.youtube.com/watch?v=uE_XRWZ5KHA"
|
||||
|
||||
- Blog "http://matov.me"
|
||||
- Site "http://matov.me/flash-animation-toolset"
|
||||
- Web demo "http://matov.me/public/blog_share/flash_tools/web_demo"
|
||||
- User guide "http://matov.me/flash-animation-toolset-user-guide"
|
||||
|
||||
- Trial version https://www.assetstore.unity3d.com/#!/content/73896
|
||||
- Full version https://www.assetstore.unity3d.com/#!/content/73323
|
||||
|
||||
Features
|
||||
- Support all transformations like 'rotation', 'skew' and 'scale' (except 3D)
|
||||
- Support all tweens(classic, motion and etc), keyframes and layers
|
||||
- Support mask layers
|
||||
- Support bitmap and vector graphics
|
||||
- Support all clip color effects like 'brightness', 'tint', 'alpha' and etc
|
||||
- Support most blending modes (all except Alpha and Erase)
|
||||
- Simple runtime API for controlling your animations in Unity
|
||||
- Automatic packing texture atlases of animations with different settings
|
||||
- Great performance with zero allocations in update loop
|
||||
- Frame labels to separate sequences in one timeline
|
||||
- Export marked "for export" clips and main timeline
|
||||
- Live preview of animations in the Unity editor
|
||||
|
||||
Supports Unity 5.3 and newer, both Personal and Pro. Full C# source code included.
|
||||
|
||||
Leave your rating for this Asset. It is very important for me and the development of the project :) Thank you!
|
||||
|
||||
Samples use "Creative Commons CC0 1.0 Universal License" animations from Glitch game "http://www.glitchthegame.com/public-domain-game-art"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e336e165518cf4d8680e2fff9c6b59ba
|
||||
timeCreated: 1476531185
|
||||
timeCreated: 1486894953
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,8 +37,7 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 2
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: npc_bureaucrat.fla._Stage_
|
||||
m_EditorClassIdentifier:
|
||||
Name: _Stage_
|
||||
Atlas: {fileID: 2800000, guid: e336e165518cf4d8680e2fff9c6b59ba, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: e336e165518cf4d8680e2fff9c6b59ba, type: 3}
|
||||
FrameRate: 24
|
||||
AssetGUID: a25723a1cd8b141a6b489606584a6f65
|
||||
Sequences:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: npc_bureaucrat.fla.bureaucrat
|
||||
m_EditorClassIdentifier:
|
||||
Name: bureaucrat
|
||||
Atlas: {fileID: 2800000, guid: e336e165518cf4d8680e2fff9c6b59ba, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: e336e165518cf4d8680e2fff9c6b59ba, type: 3}
|
||||
FrameRate: 24
|
||||
AssetGUID: a25723a1cd8b141a6b489606584a6f65
|
||||
Sequences:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1278c7f98af44db8a86e620305eb32b
|
||||
timeCreated: 1476531185
|
||||
timeCreated: 1486894967
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,8 +37,7 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 2
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: npc_smuggler.fla._Stage_
|
||||
m_EditorClassIdentifier:
|
||||
Name: _Stage_
|
||||
Atlas: {fileID: 2800000, guid: c1278c7f98af44db8a86e620305eb32b, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: c1278c7f98af44db8a86e620305eb32b, type: 3}
|
||||
FrameRate: 30
|
||||
AssetGUID: 91fc9b6bb83c645678686dbc06141d03
|
||||
Sequences:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: npc_smuggler.fla.smuggler
|
||||
m_EditorClassIdentifier:
|
||||
Name: smuggler
|
||||
Atlas: {fileID: 2800000, guid: c1278c7f98af44db8a86e620305eb32b, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: c1278c7f98af44db8a86e620305eb32b, type: 3}
|
||||
FrameRate: 30
|
||||
AssetGUID: 91fc9b6bb83c645678686dbc06141d03
|
||||
Sequences:
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a799322aa44e44b38980bc9d307f0c38
|
||||
timeCreated: 1476531185
|
||||
timeCreated: 1486894960
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,8 +37,7 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 2
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: purple_apparition.fla._Stage_
|
||||
m_EditorClassIdentifier:
|
||||
Name: _Stage_
|
||||
Atlas: {fileID: 2800000, guid: a799322aa44e44b38980bc9d307f0c38, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: a799322aa44e44b38980bc9d307f0c38, type: 3}
|
||||
FrameRate: 24
|
||||
AssetGUID: 0f54ba869440c48cd8d6c64e70c09b87
|
||||
Sequences:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: purple_apparition.fla.purpleFlower
|
||||
m_EditorClassIdentifier:
|
||||
Name: purpleFlower
|
||||
Atlas: {fileID: 2800000, guid: a799322aa44e44b38980bc9d307f0c38, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: a799322aa44e44b38980bc9d307f0c38, type: 3}
|
||||
FrameRate: 24
|
||||
AssetGUID: 0f54ba869440c48cd8d6c64e70c09b87
|
||||
Sequences:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47e46d443fd064d78ae33281e2840297
|
||||
timeCreated: 1476531184
|
||||
timeCreated: 1486894975
|
||||
licenseType: Free
|
||||
TextureImporter:
|
||||
fileIDToRecycleName: {}
|
||||
@@ -37,8 +37,7 @@ TextureImporter:
|
||||
lightmap: 0
|
||||
rGBM: 0
|
||||
compressionQuality: 50
|
||||
allowsAlphaSplitting: 0
|
||||
spriteMode: 2
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
|
||||
@@ -12,7 +12,7 @@ MonoBehaviour:
|
||||
m_Name: rainbow_100coinstoday.fla._Stage_
|
||||
m_EditorClassIdentifier:
|
||||
Name: _Stage_
|
||||
Atlas: {fileID: 2800000, guid: 47e46d443fd064d78ae33281e2840297, type: 3}
|
||||
Sprite: {fileID: 21300000, guid: 47e46d443fd064d78ae33281e2840297, type: 3}
|
||||
FrameRate: 30
|
||||
AssetGUID: 7cf612ae1f9fb4253bc5cff2800885e9
|
||||
Sequences:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -18,22 +18,25 @@ namespace FlashTools.Examples {
|
||||
|
||||
IEnumerator StartCoro(SwfClipController ctrl) {
|
||||
while ( true ) {
|
||||
ctrl.Play(_fadeInSequence);
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(_fadeInSequence);
|
||||
for ( var i = 0; i < 3; ++i ) {
|
||||
var last_seq = ctrl.clip.sequence;
|
||||
do {
|
||||
var seq_index = Random.Range(0, _idleSequences.Length);
|
||||
ctrl.Play(_idleSequences[seq_index]);
|
||||
} while ( last_seq == ctrl.clip.sequence );
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
var idle_seq = GetRandomIdleSequence(ctrl);
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(idle_seq);
|
||||
}
|
||||
|
||||
ctrl.Play(_fadeOutSequence);
|
||||
yield return new SwfWaitStopPlaying(ctrl);
|
||||
yield return ctrl.PlayAndWaitStopOrRewind(_fadeOutSequence);
|
||||
yield return new WaitForSeconds(2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
string GetRandomIdleSequence(SwfClipController ctrl) {
|
||||
var cur_seq = ctrl.clip.sequence;
|
||||
do {
|
||||
var seq_index = Random.Range(0, _idleSequences.Length);
|
||||
var new_sequence = _idleSequences[seq_index];
|
||||
if ( new_sequence != cur_seq ) {
|
||||
return new_sequence;
|
||||
}
|
||||
} while ( true );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,37 +7,31 @@
|
||||
};
|
||||
}
|
||||
|
||||
if (!Function.prototype.bind) {
|
||||
Function.prototype.bind = function (oThis) {
|
||||
if (typeof this !== 'function') {
|
||||
throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
|
||||
}
|
||||
var aArgs = Array.prototype.slice.call(arguments, 1);
|
||||
var fToBind = this;
|
||||
var fNOP = function () {};
|
||||
var fBound = function () {
|
||||
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis,
|
||||
aArgs.concat(Array.prototype.slice.call(arguments)));
|
||||
};
|
||||
fNOP.prototype = this.prototype;
|
||||
fBound.prototype = new fNOP();
|
||||
return fBound;
|
||||
};
|
||||
}
|
||||
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
//
|
||||
// ft
|
||||
// ft config
|
||||
//
|
||||
|
||||
var ft = {
|
||||
profile_mode : false,
|
||||
verbose_mode : false,
|
||||
|
||||
graphics_scale : 1.0,
|
||||
scale_precision : 0.01,
|
||||
|
||||
optimize_big_items : true,
|
||||
optimize_small_items : true,
|
||||
optimize_static_items : true,
|
||||
optimize_single_graphics : true
|
||||
optimize_single_graphics : true,
|
||||
|
||||
export_path_postfix : "_export"
|
||||
};
|
||||
|
||||
//
|
||||
// ft base functions
|
||||
//
|
||||
|
||||
ft.trace = function () {
|
||||
fl.outputPanel.trace(
|
||||
@@ -75,7 +69,7 @@ if (!Function.prototype.bind) {
|
||||
};
|
||||
|
||||
ft.type_assert_if_defined = function (item, type) {
|
||||
if (item !== undefined) {
|
||||
if (item && item !== undefined) {
|
||||
ft.type_assert(item, type);
|
||||
}
|
||||
};
|
||||
@@ -203,6 +197,13 @@ if (!Function.prototype.bind) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ft.approximately = function(a, b, precision) {
|
||||
ft.type_assert(a, 'number');
|
||||
ft.type_assert(b, 'number');
|
||||
ft.type_assert(precision, 'number');
|
||||
return Math.abs(b - a) < Math.abs(precision);
|
||||
};
|
||||
|
||||
ft.gen_unique_name = function () {
|
||||
if (!ft.gen_unique_name_index) {
|
||||
@@ -222,12 +223,68 @@ if (!Function.prototype.bind) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.profile_function(function() { ftdoc.prepare_folders(doc); }, "Prepare folders");
|
||||
ft.profile_function(function() { ftdoc.full_exit_edit_mode(doc); }, "Full exit edit mode");
|
||||
ft.profile_function(function() { ftdoc.remove_unused_items(doc); }, "Remove unused items");
|
||||
ft.profile_function(function() { ftdoc.prepare_all_bitmaps(doc); }, "Prepare all bitmaps");
|
||||
ft.profile_function(function() { ftdoc.unlock_all_timelines(doc); }, "Unlock all timelines");
|
||||
ft.profile_function(function() { ftdoc.calculate_item_scales(doc); }, "Calculate item scales");
|
||||
ft.profile_function(function() { ftdoc.optimize_all_timelines(doc); }, "Optimize all timelines");
|
||||
ft.profile_function(function() { ftdoc.rasterize_all_shapes(doc); }, "Rasterize all shapes");
|
||||
ft.profile_function(function() { ftdoc.export_swf(doc); }, "Export swf");
|
||||
};
|
||||
|
||||
ftdoc.get_temp = function (doc) {
|
||||
if (!ftdoc.hasOwnProperty("temp")) {
|
||||
ftdoc["temp"] = {
|
||||
max_scales : {}
|
||||
}
|
||||
}
|
||||
return ftdoc["temp"];
|
||||
};
|
||||
|
||||
ftdoc.calculate_item_final_scale = function (doc, optional_item) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert_if_defined(optional_item, LibraryItem);
|
||||
var final_scale = ft.graphics_scale;
|
||||
if (optional_item && (ft.optimize_big_items || ft.optimize_small_items)) {
|
||||
var item_name = optional_item.name;
|
||||
var max_scales = ftdoc.get_temp(doc).max_scales;
|
||||
if (max_scales.hasOwnProperty(item_name)) {
|
||||
var max_scale = max_scales[item_name];
|
||||
var big_item = ft.optimize_big_items && (max_scale - ft.scale_precision > 1.0);
|
||||
var small_item = ft.optimize_small_items && (max_scale + ft.scale_precision < 1.0);
|
||||
if (big_item || small_item) {
|
||||
final_scale *= max_scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
return final_scale;
|
||||
};
|
||||
|
||||
ftdoc.convert_selection_to_bitmap = function (doc, optional_item) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert_if_defined(optional_item, LibraryItem);
|
||||
var final_scale = ftdoc.calculate_item_final_scale(doc, optional_item);
|
||||
if (ft.approximately(final_scale, 1.0, ft.scale_precision)) {
|
||||
doc.convertSelectionToBitmap();
|
||||
} else {
|
||||
var wrapper_item_name = ft.gen_unique_name();
|
||||
var wrapper_item = doc.convertToSymbol("graphic", wrapper_item_name , "top left");
|
||||
fttim.recursive_scale_filters(doc, wrapper_item.timeline, final_scale);
|
||||
var elem = doc.selection[0];
|
||||
var elem_x = elem.x;
|
||||
var elem_y = elem.y;
|
||||
var elem_w = elem.width;
|
||||
var elem_h = elem.height;
|
||||
doc.scaleSelection(final_scale, final_scale);
|
||||
doc.convertSelectionToBitmap();
|
||||
doc.scaleSelection(1.0 / final_scale, 1.0 / final_scale);
|
||||
var new_elem = doc.selection[0];
|
||||
new_elem.x = elem_x;
|
||||
new_elem.y = elem_y;
|
||||
new_elem.width = elem_w;
|
||||
new_elem.height = elem_h;
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.prepare_folders = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
@@ -242,7 +299,7 @@ if (!Function.prototype.bind) {
|
||||
ft.type_assert(doc, Document);
|
||||
return ft.combine_path(
|
||||
ft.escape_path(doc.pathURI),
|
||||
"_export/");
|
||||
ft.export_path_postfix + "/");
|
||||
};
|
||||
|
||||
ftdoc.full_exit_edit_mode = function (doc) {
|
||||
@@ -251,12 +308,89 @@ if (!Function.prototype.bind) {
|
||||
doc.exitEditMode();
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.remove_unused_items = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
var unused_items = doc.library.unusedItems;
|
||||
if (unused_items && unused_items !== undefined) {
|
||||
ft.array_reverse_foreach(unused_items, function(item) {
|
||||
if (ft.verbose_mode) {
|
||||
ft.trace_fmt("Remove unused item: {0}", item.name);
|
||||
}
|
||||
doc.library.deleteItem(item.name);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.unlock_all_timelines = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
ftlib.unlock_all_timelines(doc, doc.library);
|
||||
fttim.unlock(doc.getTimeline());
|
||||
};
|
||||
|
||||
ftdoc.calculate_item_scales = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
|
||||
var max_scales = ftdoc.get_temp(doc).max_scales;
|
||||
|
||||
var walk_by_timeline = function(timeline, func, acc) {
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.type_assert(func, Function);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame) {
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
walk_by_timeline(
|
||||
elem.libraryItem.timeline,
|
||||
func,
|
||||
func(elem, acc));
|
||||
}, fttim.is_symbol_instance);
|
||||
}, fttim.is_keyframe);
|
||||
});
|
||||
};
|
||||
|
||||
var walk_by_library = function(lib, func, acc) {
|
||||
ft.type_assert(lib, Library);
|
||||
ft.type_assert(func, Function);
|
||||
ft.array_foreach(lib.items, function (item) {
|
||||
walk_by_timeline(item.timeline, func, acc)
|
||||
}, ftlib.is_symbol_item);
|
||||
};
|
||||
|
||||
var x_func = function(elem, acc) {
|
||||
var elem_sx = elem.scaleX * acc;
|
||||
var item_name = elem.libraryItem.name;
|
||||
max_scales[item_name] = Math.max(
|
||||
max_scales.hasOwnProperty(item_name) ? max_scales[item_name] : elem_sx,
|
||||
elem_sx);
|
||||
return elem_sx;
|
||||
};
|
||||
|
||||
var y_func = function(elem, acc) {
|
||||
var elem_sy = elem.scaleY * acc;
|
||||
var item_name = elem.libraryItem.name;
|
||||
max_scales[item_name] = Math.max(
|
||||
max_scales.hasOwnProperty(item_name) ? max_scales[item_name] : elem_sy,
|
||||
elem_sy);
|
||||
return elem_sy;
|
||||
};
|
||||
|
||||
walk_by_library(doc.library, x_func, 1.0);
|
||||
walk_by_timeline(doc.getTimeline(), x_func, 1.0);
|
||||
|
||||
walk_by_library(doc.library, y_func, 1.0);
|
||||
walk_by_timeline(doc.getTimeline(), y_func, 1.0);
|
||||
|
||||
if (ft.verbose_mode) {
|
||||
for (var item_name in max_scales) {
|
||||
var max_scale = max_scales.hasOwnProperty(item_name) ? max_scales[item_name] : 1.0;
|
||||
if (max_scale - ft.scale_precision > 1.0) {
|
||||
ft.trace_fmt("Big item for optimize: {0} - {1}", item_name, max_scale);
|
||||
} else if (max_scale + ft.scale_precision < 1.0) {
|
||||
ft.trace_fmt("Small item for optimize: {0} - {1}", item_name, max_scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ftdoc.optimize_all_timelines = function (doc) {
|
||||
ft.type_assert(doc, Document);
|
||||
@@ -429,7 +563,8 @@ if (!Function.prototype.bind) {
|
||||
new_item_elem.setTransformationPoint({x: 0, y: 0});
|
||||
new_item_elem.transformX = 0;
|
||||
new_item_elem.transformY = 0;
|
||||
doc.convertSelectionToBitmap();
|
||||
ftdoc.convert_selection_to_bitmap(doc, item);
|
||||
doc.exitEditMode();
|
||||
return true;
|
||||
} else {
|
||||
doc.exitEditMode();
|
||||
@@ -441,7 +576,6 @@ if (!Function.prototype.bind) {
|
||||
ftlib.optimize_single_graphics = function (doc, library) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(library, Library);
|
||||
|
||||
ft.array_reverse_foreach(library.items, function (item) {
|
||||
fttim.optimize_single_graphics(doc, item.timeline, item);
|
||||
}, ftlib.is_symbol_item);
|
||||
@@ -552,6 +686,26 @@ if (!Function.prototype.bind) {
|
||||
var frame_height = Math.max(0, bounds.bottom - bounds.top);
|
||||
return Math.round(frame_width) * Math.round(frame_height);
|
||||
}
|
||||
|
||||
fttim.recursive_scale_filters = function (doc, timeline, scale) {
|
||||
ft.type_assert(doc, Document);
|
||||
ft.type_assert(timeline, Timeline);
|
||||
ft.array_foreach(timeline.layers, function (layer) {
|
||||
ft.array_foreach(layer.frames, function (frame, frame_index) {
|
||||
ft.array_foreach(frame.elements, function (elem) {
|
||||
var elem_filters = elem.filters;
|
||||
if (elem_filters && elem_filters !== undefined) {
|
||||
ft.array_foreach(elem_filters, function (elem_filter, filter_index) {
|
||||
elem_filter.blurX *= scale;
|
||||
elem_filter.blurY *= scale;
|
||||
});
|
||||
elem.filters = elem_filters;
|
||||
}
|
||||
fttim.recursive_scale_filters(doc, elem.libraryItem.timeline, scale);
|
||||
}, fttim.is_symbol_instance);
|
||||
}, fttim.is_keyframe);
|
||||
}, fttim.is_not_guide_layer);
|
||||
};
|
||||
|
||||
fttim.replace_baked_symbols = function (doc, timeline, replaces) {
|
||||
ft.type_assert(doc, Document);
|
||||
@@ -648,7 +802,7 @@ if (!Function.prototype.bind) {
|
||||
doc.selectNone();
|
||||
doc.selection = ft.array_filter(frame.elements, fttim.is_shape_instance);
|
||||
if (doc.selection.length > 0) {
|
||||
doc.convertSelectionToBitmap();
|
||||
ftdoc.convert_selection_to_bitmap(doc, timeline.libraryItem);
|
||||
doc.arrange("back");
|
||||
any_rasterize = true;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,9 @@ inline swf_mask_v2f_t swf_mask_vert(swf_mask_appdata_t IN) {
|
||||
|
||||
inline fixed4 swf_frag(swf_v2f_t IN) : SV_Target {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv);
|
||||
if ( _ExternalAlpha ) {
|
||||
c.a *= tex2D(_AlphaTex, IN.uv).r;
|
||||
}
|
||||
if ( c.a > 0.01 ) {
|
||||
c = c * IN.mulcolor + IN.addcolor;
|
||||
}
|
||||
@@ -144,6 +147,9 @@ inline fixed4 swf_frag(swf_v2f_t IN) : SV_Target {
|
||||
|
||||
inline fixed4 swf_grab_frag(swf_grab_v2f_t IN) : SV_Target {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv);
|
||||
if ( _ExternalAlpha ) {
|
||||
c.a *= tex2D(_AlphaTex, IN.uv).r;
|
||||
}
|
||||
if ( c.a > 0.01 ) {
|
||||
c = c * IN.mulcolor + IN.addcolor;
|
||||
c = grab_blend(_GrabTexture, IN.screenpos, c);
|
||||
@@ -154,6 +160,9 @@ inline fixed4 swf_grab_frag(swf_grab_v2f_t IN) : SV_Target {
|
||||
|
||||
inline fixed4 swf_mask_frag(swf_mask_v2f_t IN) : SV_Target {
|
||||
fixed4 c = tex2D(_MainTex, IN.uv);
|
||||
if ( _ExternalAlpha ) {
|
||||
c.a *= tex2D(_AlphaTex, IN.uv).r;
|
||||
}
|
||||
if ( c.a < 0.01 ) {
|
||||
discard;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Shader "FlashTools/SwfDecrMask" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex("Main Texture", 2D) = "white" {}
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
@@ -28,7 +30,9 @@ Shader "FlashTools/SwfDecrMask" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "SwfBaseCG.cginc"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
Shader "FlashTools/SwfIncrMask" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex("Main Texture", 2D) = "white" {}
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
}
|
||||
|
||||
SubShader {
|
||||
@@ -28,7 +30,9 @@ Shader "FlashTools/SwfIncrMask" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "SwfBaseCG.cginc"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Shader "FlashTools/SwfMaskedGrab" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D ) = "white" {}
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
|
||||
_StencilID ("Stencil ID", Int) = 0
|
||||
[Enum(UnityEngine.Rendering.BlendOp )] _BlendOp ("BlendOp" , Int) = 0
|
||||
@@ -35,7 +37,9 @@ Shader "FlashTools/SwfMaskedGrab" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#pragma multi_compile SWF_DARKEN_BLEND SWF_DIFFERENCE_BLEND SWF_INVERT_BLEND SWF_OVERLAY_BLEND SWF_HARDLIGHT_BLEND
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Shader "FlashTools/SwfMasked" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D ) = "white" {}
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
|
||||
_StencilID ("Stencil ID", Int) = 0
|
||||
[Enum(UnityEngine.Rendering.BlendOp )] _BlendOp ("BlendOp" , Int) = 0
|
||||
@@ -33,7 +35,9 @@ Shader "FlashTools/SwfMasked" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "SwfBaseCG.cginc"
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Shader "FlashTools/SwfSimpleGrab" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D ) = "white" {}
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
|
||||
[Enum(UnityEngine.Rendering.BlendOp )] _BlendOp ("BlendOp" , Int) = 0
|
||||
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("SrcBlend", Int) = 1
|
||||
@@ -30,7 +32,9 @@ Shader "FlashTools/SwfSimpleGrab" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#pragma multi_compile SWF_DARKEN_BLEND SWF_DIFFERENCE_BLEND SWF_INVERT_BLEND SWF_OVERLAY_BLEND SWF_HARDLIGHT_BLEND
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
Shader "FlashTools/SwfSimple" {
|
||||
Properties {
|
||||
[PerRendererData] _MainTex ("Main Texture", 2D ) = "white" {}
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
[PerRendererData] _MainTex ("Main Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _AlphaTex ("Alpha Texture" , 2D ) = "white" {}
|
||||
[PerRendererData] _ExternalAlpha ("External Alpha", Float) = 0
|
||||
[PerRendererData] _Tint ("Tint" , Color) = (1,1,1,1)
|
||||
|
||||
[Enum(UnityEngine.Rendering.BlendOp )] _BlendOp ("BlendOp" , Int) = 0
|
||||
[Enum(UnityEngine.Rendering.BlendMode)] _SrcBlend ("SrcBlend", Int) = 1
|
||||
@@ -28,7 +30,9 @@ Shader "FlashTools/SwfSimple" {
|
||||
CGPROGRAM
|
||||
fixed4 _Tint;
|
||||
sampler2D _MainTex;
|
||||
sampler2D _AlphaTex;
|
||||
sampler2D _GrabTexture;
|
||||
float _ExternalAlpha;
|
||||
|
||||
#include "UnityCG.cginc"
|
||||
#include "SwfBaseCG.cginc"
|
||||
|
||||
@@ -42,8 +42,9 @@ namespace FTEditor.Editors {
|
||||
}
|
||||
|
||||
static void ReconvertAsset(SwfAsset asset) {
|
||||
AssetDatabase.ImportAsset(
|
||||
AssetDatabase.GetAssetPath(asset));
|
||||
asset.Atlas = null;
|
||||
EditorUtility.SetDirty(asset);
|
||||
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(asset));
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -80,17 +80,25 @@ namespace FTEditor.Editors {
|
||||
//
|
||||
|
||||
void CreateAllClipsPrefabs() {
|
||||
Selection.objects = _clips
|
||||
var objects = _clips
|
||||
.Select (p => CreateClipPrefab(p))
|
||||
.Where (p => !!p)
|
||||
.ToArray();
|
||||
Selection.objects = objects;
|
||||
foreach ( var obj in objects ) {
|
||||
EditorGUIUtility.PingObject(obj);
|
||||
}
|
||||
}
|
||||
|
||||
void CreateAllClipsOnScene() {
|
||||
Selection.objects = _clips
|
||||
var objects = _clips
|
||||
.Select (p => CreateClipOnScene(p))
|
||||
.Where (p => !!p)
|
||||
.ToArray();
|
||||
Selection.objects = objects;
|
||||
foreach ( var obj in objects ) {
|
||||
EditorGUIUtility.PingObject(obj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -146,6 +154,14 @@ namespace FTEditor.Editors {
|
||||
});
|
||||
}
|
||||
|
||||
void DrawGUINotes() {
|
||||
EditorGUILayout.Separator();
|
||||
EditorGUILayout.HelpBox(
|
||||
"Masks and blends of animation may not be displayed correctly in preview window. " +
|
||||
"Instance animation to the scene, to see how it will look like the animation in the game.",
|
||||
MessageType.Info);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Messages
|
||||
@@ -163,6 +179,7 @@ namespace FTEditor.Editors {
|
||||
DrawGUISequences();
|
||||
DrawGUISourceAsset();
|
||||
DrawGUIControls();
|
||||
DrawGUINotes();
|
||||
if ( GUI.changed ) {
|
||||
serializedObject.ApplyModifiedProperties();
|
||||
}
|
||||
|
||||
@@ -12,10 +12,24 @@ namespace FTEditor.Editors {
|
||||
static MaterialPropertyBlock _matPropBlock = null;
|
||||
static PreviewRenderUtility _previewUtils = null;
|
||||
|
||||
Texture2D targetAtlas {
|
||||
Sprite targetSprite {
|
||||
get {
|
||||
var clip = target as SwfClipAsset;
|
||||
return clip.Atlas;
|
||||
return clip ? clip.Sprite : null;
|
||||
}
|
||||
}
|
||||
|
||||
Texture2D targetAtlas {
|
||||
get {
|
||||
var sprite = targetSprite;
|
||||
return sprite ? sprite.texture : null;
|
||||
}
|
||||
}
|
||||
|
||||
Texture2D targetAtlasA {
|
||||
get {
|
||||
var sprite = targetSprite;
|
||||
return sprite ? sprite.associatedAlphaSplitTexture : null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +174,15 @@ namespace FTEditor.Editors {
|
||||
if ( isTargetValidForPreview ) {
|
||||
_previewUtils.BeginPreview(r, background);
|
||||
{
|
||||
_matPropBlock.SetTexture("_MainTex", targetAtlas);
|
||||
if ( targetAtlas ) {
|
||||
_matPropBlock.SetTexture("_MainTex", targetAtlas);
|
||||
}
|
||||
if ( targetAtlasA ) {
|
||||
_matPropBlock.SetTexture("_AlphaTex", targetAtlasA);
|
||||
_matPropBlock.SetFloat("_ExternalAlpha", 1.0f);
|
||||
} else {
|
||||
_matPropBlock.SetFloat("_ExternalAlpha", 0.0f);
|
||||
}
|
||||
ConfigureCameraForSequence(_previewUtils.m_Camera, targetSequence);
|
||||
var frame = targetFrame;
|
||||
for ( var i = 0; i < frame.Materials.Length; ++i ) {
|
||||
|
||||
@@ -10,8 +10,7 @@ using FTRuntime;
|
||||
|
||||
namespace FTEditor.Postprocessors {
|
||||
class SwfAssetPostprocessor : AssetPostprocessor {
|
||||
static SwfEditorUtils.ProgressBar _progressBar = new SwfEditorUtils.ProgressBar();
|
||||
static Queue<SwfAsset> _assetsForProcess = new Queue<SwfAsset>();
|
||||
static SwfEditorUtils.ProgressBar _progressBar = new SwfEditorUtils.ProgressBar();
|
||||
|
||||
static void OnPostprocessAllAssets(
|
||||
string[] imported_assets,
|
||||
@@ -25,38 +24,28 @@ namespace FTEditor.Postprocessors {
|
||||
.Select(p => AssetDatabase.LoadAssetAtPath<SwfAsset>(p))
|
||||
.Where(p => !!p);
|
||||
foreach ( var asset in assets ) {
|
||||
if ( !_assetsForProcess.Contains(asset) ) {
|
||||
_assetsForProcess.Enqueue(asset);
|
||||
}
|
||||
}
|
||||
if ( _assetsForProcess.Count > 0 ) {
|
||||
EditorApplication.update += ProcessAfterImport;
|
||||
}
|
||||
}
|
||||
|
||||
static void ProcessAfterImport() {
|
||||
EditorApplication.update -= ProcessAfterImport;
|
||||
if ( _assetsForProcess.Count > 0 ) {
|
||||
while ( _assetsForProcess.Count > 0 ) {
|
||||
SwfAssetProcess(_assetsForProcess.Dequeue());
|
||||
}
|
||||
AssetDatabase.SaveAssets();
|
||||
var asset_copy = asset;
|
||||
EditorApplication.delayCall += () => {
|
||||
SwfAssetProcess(asset_copy);
|
||||
AssetDatabase.SaveAssets();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
static void SwfAssetProcess(SwfAsset asset) {
|
||||
try {
|
||||
_progressBar.UpdateTitle(asset.name);
|
||||
var new_data = ConfigureBitmaps(
|
||||
asset,
|
||||
SwfEditorUtils.DecompressAsset<SwfAssetData>(asset.Data));
|
||||
asset.Data = SwfEditorUtils.CompressAsset(new_data);
|
||||
asset.Atlas = LoadAssetAtlas(asset);
|
||||
if ( asset.Atlas ) {
|
||||
ConfigureAtlas(asset);
|
||||
ConfigureClips(
|
||||
if ( !asset.Atlas ) {
|
||||
_progressBar.UpdateTitle(asset.name);
|
||||
var new_data = ConfigureBitmaps(
|
||||
asset,
|
||||
SwfEditorUtils.DecompressAsset<SwfAssetData>(asset.Data));
|
||||
asset.Data = SwfEditorUtils.CompressAsset(new_data);
|
||||
asset.Atlas = LoadAssetAtlas(asset);
|
||||
if ( asset.Atlas ) {
|
||||
ConfigureAtlas(asset);
|
||||
ConfigureClips(asset, new_data);
|
||||
}
|
||||
EditorUtility.SetDirty(asset);
|
||||
}
|
||||
} catch ( Exception e ) {
|
||||
Debug.LogErrorFormat(
|
||||
@@ -140,7 +129,6 @@ namespace FTEditor.Postprocessors {
|
||||
File.WriteAllBytes(atlas_path, atlas_info.Atlas.EncodeToPNG());
|
||||
GameObject.DestroyImmediate(atlas_info.Atlas, true);
|
||||
_progressBar.UpdateProgress("import atlas", 0.75f);
|
||||
//AssetDatabase.Refresh();
|
||||
AssetDatabase.ImportAsset(atlas_path);
|
||||
return atlas_info.Rects;
|
||||
}
|
||||
@@ -209,16 +197,18 @@ namespace FTEditor.Postprocessors {
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
static void ConfigureAtlas(SwfAsset asset) {
|
||||
var atlas_path = AssetDatabase.GetAssetPath(asset.Atlas);
|
||||
var atlas_importer = GetBitmapsAtlasImporter(asset);
|
||||
atlas_importer.spritesheet = new SpriteMetaData[0];
|
||||
atlas_importer.textureType = TextureImporterType.Sprite;
|
||||
atlas_importer.spriteImportMode = SpriteImportMode.Multiple;
|
||||
atlas_importer.spriteImportMode = SpriteImportMode.Single;
|
||||
atlas_importer.spritePixelsPerUnit = asset.Settings.PixelsPerUnit;
|
||||
atlas_importer.mipmapEnabled = asset.Settings.GenerateMipMaps;
|
||||
atlas_importer.filterMode = SwfAtlasFilterToImporterFilter(asset.Settings.AtlasTextureFilter);
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
atlas_importer.textureCompression = SwfAtlasFormatToImporterCompression(asset.Settings.AtlasTextureFormat);
|
||||
#else
|
||||
atlas_importer.textureFormat = SwfAtlasFormatToImporterFormat(asset.Settings.AtlasTextureFormat);
|
||||
AssetDatabase.WriteImportSettingsIfDirty(atlas_path);
|
||||
#endif
|
||||
atlas_importer.SaveAndReimport();
|
||||
}
|
||||
|
||||
static TextureImporter GetBitmapsAtlasImporter(SwfAsset asset) {
|
||||
@@ -249,24 +239,37 @@ namespace FTEditor.Postprocessors {
|
||||
}
|
||||
}
|
||||
|
||||
static TextureImporterFormat SwfAtlasFormatToImporterFormat(
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
static TextureImporterCompression SwfAtlasFormatToImporterCompression(
|
||||
SwfSettingsData.AtlasFormat format)
|
||||
{
|
||||
switch ( format ) {
|
||||
case SwfSettingsData.AtlasFormat.AutomaticCompressed:
|
||||
return TextureImporterFormat.AutomaticCompressed;
|
||||
case SwfSettingsData.AtlasFormat.Automatic16bit:
|
||||
return TextureImporterFormat.Automatic16bit;
|
||||
return TextureImporterCompression.Compressed;
|
||||
case SwfSettingsData.AtlasFormat.AutomaticTruecolor:
|
||||
return TextureImporterFormat.AutomaticTruecolor;
|
||||
case SwfSettingsData.AtlasFormat.AutomaticCrunched:
|
||||
return TextureImporterFormat.AutomaticCrunched;
|
||||
return TextureImporterCompression.Uncompressed;
|
||||
default:
|
||||
throw new UnityException(string.Format(
|
||||
"incorrect swf atlas format ({0})",
|
||||
format));
|
||||
}
|
||||
}
|
||||
#else
|
||||
static TextureImporterFormat SwfAtlasFormatToImporterFormat(
|
||||
SwfSettingsData.AtlasFormat format)
|
||||
{
|
||||
switch ( format ) {
|
||||
case SwfSettingsData.AtlasFormat.AutomaticCompressed:
|
||||
return TextureImporterFormat.AutomaticCompressed;
|
||||
case SwfSettingsData.AtlasFormat.AutomaticTruecolor:
|
||||
return TextureImporterFormat.AutomaticTruecolor;
|
||||
default:
|
||||
throw new UnityException(string.Format(
|
||||
"incorrect swf atlas format ({0})",
|
||||
format));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
@@ -306,10 +309,11 @@ namespace FTEditor.Postprocessors {
|
||||
SwfClipAsset clip_asset, SwfAsset asset, SwfAssetData data, SwfSymbolData symbol)
|
||||
{
|
||||
var asset_guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(asset));
|
||||
var asset_atlas = AssetDatabase.LoadAssetAtPath<Sprite>(AssetDatabase.GetAssetPath(asset.Atlas));
|
||||
clip_asset.Name = symbol.Name;
|
||||
clip_asset.Atlas = asset.Atlas;
|
||||
clip_asset.AssetGUID = asset_guid;
|
||||
clip_asset.Sprite = asset_atlas;
|
||||
clip_asset.FrameRate = data.FrameRate;
|
||||
clip_asset.AssetGUID = asset_guid;
|
||||
clip_asset.Sequences = LoadClipSequences(asset, data, symbol);
|
||||
EditorUtility.SetDirty(clip_asset);
|
||||
}
|
||||
|
||||
@@ -14,8 +14,7 @@ using FTSwfTools.SwfTypes;
|
||||
|
||||
namespace FTEditor.Postprocessors {
|
||||
class SwfPostprocessor : AssetPostprocessor {
|
||||
static SwfEditorUtils.ProgressBar _progressBar = new SwfEditorUtils.ProgressBar();
|
||||
static Queue<string> _assetsForProcess = new Queue<string>();
|
||||
static SwfEditorUtils.ProgressBar _progressBar = new SwfEditorUtils.ProgressBar();
|
||||
|
||||
static void OnPostprocessAllAssets(
|
||||
string[] imported_assets,
|
||||
@@ -33,23 +32,12 @@ namespace FTEditor.Postprocessors {
|
||||
EditorUtility.DisplayDialog(title, message, "Ok");
|
||||
} else {
|
||||
foreach ( var swf_path in swf_paths ) {
|
||||
if ( !_assetsForProcess.Contains(swf_path) ) {
|
||||
_assetsForProcess.Enqueue(swf_path);
|
||||
}
|
||||
var swf_path_copy = swf_path;
|
||||
EditorApplication.delayCall += () => {
|
||||
SwfFileProcess(swf_path_copy);
|
||||
AssetDatabase.SaveAssets();
|
||||
};
|
||||
}
|
||||
if ( _assetsForProcess.Count > 0 ) {
|
||||
EditorApplication.update += ProcessAfterImport;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ProcessAfterImport() {
|
||||
EditorApplication.update -= ProcessAfterImport;
|
||||
if ( _assetsForProcess.Count > 0 ) {
|
||||
while ( _assetsForProcess.Count > 0 ) {
|
||||
SwfFileProcess(_assetsForProcess.Dequeue());
|
||||
}
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,8 +56,10 @@ namespace FTEditor.Postprocessors {
|
||||
static bool SafeLoadSwfAsset(string swf_path, SwfAsset swf_asset) {
|
||||
try {
|
||||
_progressBar.UpdateTitle(Path.GetFileName(swf_path));
|
||||
var new_data = LoadSwfAssetData(swf_path);
|
||||
swf_asset.Data = SwfEditorUtils.CompressAsset(new_data);
|
||||
var new_data = LoadSwfAssetData(swf_path);
|
||||
swf_asset.Data = SwfEditorUtils.CompressAsset(new_data);
|
||||
swf_asset.Atlas = null;
|
||||
EditorUtility.SetDirty(swf_asset);
|
||||
return true;
|
||||
} catch ( Exception e ) {
|
||||
Debug.LogErrorFormat(
|
||||
|
||||
@@ -157,7 +157,6 @@ namespace FTEditor {
|
||||
asset = ScriptableObject.CreateInstance<T>();
|
||||
if ( act(asset, true) ) {
|
||||
AssetDatabase.CreateAsset(asset, asset_path);
|
||||
AssetDatabase.ImportAsset(asset_path);
|
||||
} else {
|
||||
ScriptableObject.DestroyImmediate(asset);
|
||||
}
|
||||
@@ -240,14 +239,19 @@ namespace FTEditor {
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
public class ProgressBar {
|
||||
string _title = "Flash Tools Process";
|
||||
string _title = string.Empty;
|
||||
|
||||
public void UpdateTitle(string title) {
|
||||
_title = string.Format("Flash Tools Process: {0}", title);
|
||||
_title = title;
|
||||
}
|
||||
|
||||
public void UpdateProgress(string info, float progress) {
|
||||
EditorUtility.DisplayProgressBar(_title, info, progress);
|
||||
var bar_title = string.IsNullOrEmpty(_title)
|
||||
? "Flash Tools Process"
|
||||
: string.Format("Flash Tools Process: {0}", _title);
|
||||
var bar_info = string.Format("{0}...", info);
|
||||
var bar_progress = Mathf.Clamp01(progress);
|
||||
EditorUtility.DisplayProgressBar(bar_title, bar_info, bar_progress);
|
||||
}
|
||||
|
||||
public void HideProgress() {
|
||||
@@ -265,6 +269,7 @@ namespace FTEditor {
|
||||
static void Tools_FlashTools_OpenSettings() {
|
||||
var settings_holder = SwfEditorUtils.GetSettingsHolder();
|
||||
Selection.objects = new Object[]{settings_holder};
|
||||
EditorGUIUtility.PingObject(settings_holder);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/FlashTools/Reimport all swf files")]
|
||||
|
||||
@@ -71,18 +71,18 @@
|
||||
// Fonts and Text
|
||||
// -----------------------------
|
||||
|
||||
//DefineFont = 10,
|
||||
//DefineFontInfo = 13,
|
||||
//DefineFontInfo2 = 62,
|
||||
//DefineFont2 = 48,
|
||||
//DefineFont3 = 75,
|
||||
//DefineFontAlignZones = 73,
|
||||
//DefineFontName = 88,
|
||||
//DefineText = 11,
|
||||
//DefineText2 = 33,
|
||||
//DefineEditText = 37,
|
||||
//CSMTextSettings = 74,
|
||||
//DefineFont4 = 91,
|
||||
DefineFont = 10,
|
||||
DefineFontInfo = 13,
|
||||
DefineFontInfo2 = 62,
|
||||
DefineFont2 = 48,
|
||||
DefineFont3 = 75,
|
||||
DefineFontAlignZones = 73,
|
||||
DefineFontName = 88,
|
||||
DefineText = 11,
|
||||
DefineText2 = 33,
|
||||
DefineEditText = 37,
|
||||
CSMTextSettings = 74,
|
||||
DefineFont4 = 91,
|
||||
|
||||
// -----------------------------
|
||||
// Sounds
|
||||
@@ -199,6 +199,19 @@
|
||||
// Shape Morphing
|
||||
case (int)SwfTagType.DefineMorphShape: return UnsupportedTag.Create(SwfTagType.DefineMorphShape);
|
||||
case (int)SwfTagType.DefineMorphShape2: return UnsupportedTag.Create(SwfTagType.DefineMorphShape2);
|
||||
// Fonts and Text
|
||||
case (int)SwfTagType.DefineFont: return UnsupportedTag.Create(SwfTagType.DefineFont);
|
||||
case (int)SwfTagType.DefineFontInfo: return UnsupportedTag.Create(SwfTagType.DefineFontInfo);
|
||||
case (int)SwfTagType.DefineFontInfo2: return UnsupportedTag.Create(SwfTagType.DefineFontInfo2);
|
||||
case (int)SwfTagType.DefineFont2: return UnsupportedTag.Create(SwfTagType.DefineFont2);
|
||||
case (int)SwfTagType.DefineFont3: return UnsupportedTag.Create(SwfTagType.DefineFont3);
|
||||
case (int)SwfTagType.DefineFontAlignZones: return UnsupportedTag.Create(SwfTagType.DefineFontAlignZones);
|
||||
case (int)SwfTagType.DefineFontName: return UnsupportedTag.Create(SwfTagType.DefineFontName);
|
||||
case (int)SwfTagType.DefineText: return UnsupportedTag.Create(SwfTagType.DefineText);
|
||||
case (int)SwfTagType.DefineText2: return UnsupportedTag.Create(SwfTagType.DefineText2);
|
||||
case (int)SwfTagType.DefineEditText: return UnsupportedTag.Create(SwfTagType.DefineEditText);
|
||||
case (int)SwfTagType.CSMTextSettings: return UnsupportedTag.Create(SwfTagType.CSMTextSettings);
|
||||
case (int)SwfTagType.DefineFont4: return UnsupportedTag.Create(SwfTagType.DefineFont4);
|
||||
// Sprites and Movie Clips
|
||||
case (int)SwfTagType.DefineSprite: return DefineSpriteTag.Create(reader);
|
||||
// Video
|
||||
|
||||
@@ -3,9 +3,6 @@ using FTRuntime.Internal;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FTRuntime {
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
[PreferBinarySerialization]
|
||||
#endif
|
||||
public class SwfAsset : ScriptableObject {
|
||||
[HideInInspector]
|
||||
public byte[] Data;
|
||||
|
||||
@@ -344,12 +344,19 @@ namespace FTRuntime {
|
||||
_curPropBlock = new MaterialPropertyBlock();
|
||||
}
|
||||
_meshRenderer.GetPropertyBlock(_curPropBlock);
|
||||
_curPropBlock.SetColor(
|
||||
"_Tint",
|
||||
tint);
|
||||
_curPropBlock.SetTexture(
|
||||
"_MainTex",
|
||||
clip && clip.Atlas ? clip.Atlas : Texture2D.whiteTexture);
|
||||
_curPropBlock.SetColor("_Tint", tint);
|
||||
var sprite = clip ? clip.Sprite : null;
|
||||
var atlas = sprite && sprite.texture ? sprite.texture : Texture2D.whiteTexture;
|
||||
var atlasA = sprite ? sprite.associatedAlphaSplitTexture : null;
|
||||
if ( atlas ) {
|
||||
_curPropBlock.SetTexture("_MainTex", atlas);
|
||||
}
|
||||
if ( atlasA ) {
|
||||
_curPropBlock.SetTexture("_AlphaTex", atlasA);
|
||||
_curPropBlock.SetFloat("_ExternalAlpha", 1.0f);
|
||||
} else {
|
||||
_curPropBlock.SetFloat("_ExternalAlpha", 0.0f);
|
||||
}
|
||||
_meshRenderer.SetPropertyBlock(_curPropBlock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,6 @@ using FTRuntime.Internal;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace FTRuntime {
|
||||
#if UNITY_5_5_OR_NEWER
|
||||
[PreferBinarySerialization]
|
||||
#endif
|
||||
public class SwfClipAsset : ScriptableObject {
|
||||
[System.Serializable]
|
||||
public class SubMeshData {
|
||||
@@ -61,7 +58,7 @@ namespace FTRuntime {
|
||||
[SwfReadOnly]
|
||||
public string Name;
|
||||
[SwfReadOnly]
|
||||
public Texture2D Atlas;
|
||||
public Sprite Sprite;
|
||||
[SwfReadOnly]
|
||||
public float FrameRate;
|
||||
[HideInInspector]
|
||||
@@ -71,7 +68,7 @@ namespace FTRuntime {
|
||||
|
||||
void Reset() {
|
||||
Name = string.Empty;
|
||||
Atlas = null;
|
||||
Sprite = null;
|
||||
FrameRate = 1.0f;
|
||||
AssetGUID = string.Empty;
|
||||
Sequences = new List<Sequence>();
|
||||
|
||||
@@ -11,10 +11,8 @@ namespace FTRuntime {
|
||||
}
|
||||
|
||||
public enum AtlasFormat {
|
||||
AutomaticCompressed,
|
||||
Automatic16bit,
|
||||
AutomaticTruecolor,
|
||||
AutomaticCrunched
|
||||
AutomaticCompressed = 0,
|
||||
AutomaticTruecolor = 2
|
||||
}
|
||||
|
||||
[SwfPowerOfTwoIfAttribute(5, 13, "AtlasPowerOfTwo")]
|
||||
|
||||
250
Assets/FlashTools/Scripts/FTRuntime/Yields/SwfWaitExtensions.cs
Normal file
250
Assets/FlashTools/Scripts/FTRuntime/Yields/SwfWaitExtensions.cs
Normal file
@@ -0,0 +1,250 @@
|
||||
namespace FTRuntime.Yields {
|
||||
public static class SwfWaitExtensions {
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// WaitFor[Event]
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// <summary>Yield instruction for wait animation stop event</summary>
|
||||
/// <returns>Yield instruction for wait animation stop event</returns>
|
||||
/// <param name="ctrl">The controller</param>
|
||||
public static SwfWaitStopPlaying WaitForStopPlaying(
|
||||
this SwfClipController ctrl)
|
||||
{
|
||||
return new SwfWaitStopPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Yield instruction for wait animation rewind event</summary>
|
||||
/// <returns>Yield instruction for wait animation rewind event</returns>
|
||||
/// <param name="ctrl">The controller</param>
|
||||
public static SwfWaitRewindPlaying WaitForRewindPlaying(
|
||||
this SwfClipController ctrl)
|
||||
{
|
||||
return new SwfWaitRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Yield instruction for wait animation stop or rewind event</summary>
|
||||
/// <returns>Yield instruction for wait animation stop or rewind event</returns>
|
||||
/// <param name="ctrl">The controller</param>
|
||||
public static SwfWaitStopOrRewindPlaying WaitForStopOrRewindPlaying(
|
||||
this SwfClipController ctrl)
|
||||
{
|
||||
return new SwfWaitStopOrRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Yield instruction for wait animation play event</summary>
|
||||
/// <returns>Yield instruction for wait animation play event</returns>
|
||||
/// <param name="ctrl">The controller</param>
|
||||
public static SwfWaitPlayStopped WaitForPlayStopped(
|
||||
this SwfClipController ctrl)
|
||||
{
|
||||
return new SwfWaitPlayStopped(ctrl);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// PlayAndWait[Event]
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// <summary>Play with specified rewind action</summary>
|
||||
/// <returns>Yield instruction for wait animation stop event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="rewind">If set to <c>true</c> rewind animation to begin frame</param>
|
||||
public static SwfWaitStopPlaying PlayAndWaitStop(
|
||||
this SwfClipController ctrl, bool rewind)
|
||||
{
|
||||
ctrl.Play(rewind);
|
||||
return WaitForStopPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and play controller with rewind</summary>
|
||||
/// <returns>Yield instruction for wait animation stop event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
public static SwfWaitStopPlaying PlayAndWaitStop(
|
||||
this SwfClipController ctrl, string sequence)
|
||||
{
|
||||
ctrl.Play(sequence);
|
||||
return WaitForStopPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Play with specified rewind action</summary>
|
||||
/// <returns>Yield instruction for wait animation rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="rewind">If set to <c>true</c> rewind animation to begin frame</param>
|
||||
public static SwfWaitRewindPlaying PlayAndWaitRewind(
|
||||
this SwfClipController ctrl, bool rewind)
|
||||
{
|
||||
ctrl.Play(rewind);
|
||||
return WaitForRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and play controller with rewind</summary>
|
||||
/// <returns>Yield instruction for wait animation rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
public static SwfWaitRewindPlaying PlayAndWaitRewind(
|
||||
this SwfClipController ctrl, string sequence)
|
||||
{
|
||||
ctrl.Play(sequence);
|
||||
return WaitForRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Play with specified rewind action</summary>
|
||||
/// <returns>Yield instruction for wait animation stop or rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="rewind">If set to <c>true</c> rewind animation to begin frame</param>
|
||||
public static SwfWaitStopOrRewindPlaying PlayAndWaitStopOrRewind(
|
||||
this SwfClipController ctrl, bool rewind)
|
||||
{
|
||||
ctrl.Play(rewind);
|
||||
return WaitForStopOrRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and play controller with rewind</summary>
|
||||
/// <returns>Yield instruction for wait animation stop or rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
public static SwfWaitStopOrRewindPlaying PlayAndWaitStopOrRewind(
|
||||
this SwfClipController ctrl, string sequence)
|
||||
{
|
||||
ctrl.Play(sequence);
|
||||
return WaitForStopOrRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// GotoAndPlayAndWait[Event]
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// <summary>Changes the animation frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation stop event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitStopPlaying GotoAndPlayAndWaitStop(
|
||||
this SwfClipController ctrl, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(frame);
|
||||
return WaitForStopPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation stop event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitStopPlaying GotoAndPlayAndWaitStop(
|
||||
this SwfClipController ctrl, string sequence, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(sequence, frame);
|
||||
return WaitForStopPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitRewindPlaying GotoAndPlayAndWaitRewind(
|
||||
this SwfClipController ctrl, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(frame);
|
||||
return WaitForRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitRewindPlaying GotoAndPlayAndWaitRewind(
|
||||
this SwfClipController ctrl, string sequence, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(sequence, frame);
|
||||
return WaitForRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation stop and rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitStopOrRewindPlaying GotoAndPlayAndWaitStopOrRewind(
|
||||
this SwfClipController ctrl, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(frame);
|
||||
return WaitForStopOrRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and frame with plays it</summary>
|
||||
/// <returns>Yield instruction for wait animation stop and rewind event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitStopOrRewindPlaying GotoAndPlayAndWaitStopOrRewind(
|
||||
this SwfClipController ctrl, string sequence, int frame)
|
||||
{
|
||||
ctrl.GotoAndPlay(sequence, frame);
|
||||
return WaitForStopOrRewindPlaying(ctrl);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// StopAndWait[Event]
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// <summary>Stop with specified rewind action</summary>
|
||||
/// <returns>Yield instruction for wait animation play event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="rewind">If set to <c>true</c> rewind animation to begin frame</param>
|
||||
public static SwfWaitPlayStopped StopAndWaitPlay(
|
||||
this SwfClipController ctrl, bool rewind)
|
||||
{
|
||||
ctrl.Stop(rewind);
|
||||
return WaitForPlayStopped(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and stop controller with rewind</summary>
|
||||
/// <returns>Yield instruction for wait animation play event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
public static SwfWaitPlayStopped StopAndWaitPlay(
|
||||
this SwfClipController ctrl, string sequence)
|
||||
{
|
||||
ctrl.Stop(sequence);
|
||||
return WaitForPlayStopped(ctrl);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// GotoAndStopAndWait[Event]
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
/// <summary>Changes the animation frame with stops it</summary>
|
||||
/// <returns>Yield instruction for wait animation play event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitPlayStopped GotoAndStopAndWaitPlay(
|
||||
this SwfClipController ctrl, int frame)
|
||||
{
|
||||
ctrl.GotoAndStop(frame);
|
||||
return WaitForPlayStopped(ctrl);
|
||||
}
|
||||
|
||||
/// <summary>Changes the animation sequence and frame with stops it</summary>
|
||||
/// <returns>Yield instruction for wait animation play event</returns>
|
||||
/// <param name="ctrl">The clip controller</param>
|
||||
/// <param name="sequence">The new sequence</param>
|
||||
/// <param name="frame">The new current frame</param>
|
||||
public static SwfWaitPlayStopped GotoAndStopAndWaitPlay(
|
||||
this SwfClipController ctrl, string sequence, int frame)
|
||||
{
|
||||
ctrl.GotoAndStop(sequence, frame);
|
||||
return WaitForPlayStopped(ctrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: da7412b1ce89b4952869f7a85515b954
|
||||
timeCreated: 1487268103
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitPlayStopped : IEnumerator {
|
||||
public class SwfWaitPlayStopped : CustomYieldInstruction {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitPlayStopped(SwfClipController ctrl) {
|
||||
@@ -12,12 +12,20 @@ namespace FTRuntime.Yields {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public override bool keepWaiting {
|
||||
get {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Private
|
||||
// Internal
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
SwfWaitPlayStopped Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
Unsubscribe();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnPlayStoppedEvent += OnPlayStopped;
|
||||
@@ -25,27 +33,15 @@ namespace FTRuntime.Yields {
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnPlayStopped(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
void Unsubscribe() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnPlayStoppedEvent -= OnPlayStopped;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
void OnPlayStopped(SwfClipController ctrl) {
|
||||
Unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitRewindPlaying : IEnumerator {
|
||||
public class SwfWaitRewindPlaying : CustomYieldInstruction {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitRewindPlaying(SwfClipController ctrl) {
|
||||
@@ -12,12 +12,20 @@ namespace FTRuntime.Yields {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public override bool keepWaiting {
|
||||
get {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Private
|
||||
// Internal
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
SwfWaitRewindPlaying Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
Unsubscribe();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnRewindPlayingEvent += OnRewindPlaying;
|
||||
@@ -25,27 +33,15 @@ namespace FTRuntime.Yields {
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnRewindPlaying(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
void Unsubscribe() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnRewindPlayingEvent -= OnRewindPlaying;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
void OnRewindPlaying(SwfClipController ctrl) {
|
||||
Unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitStopOrRewindPlaying : CustomYieldInstruction {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitStopOrRewindPlaying(SwfClipController ctrl) {
|
||||
Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public SwfWaitStopOrRewindPlaying Reuse(SwfClipController ctrl) {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public override bool keepWaiting {
|
||||
get {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Internal
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
SwfWaitStopOrRewindPlaying Subscribe(SwfClipController ctrl) {
|
||||
Unsubscribe();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnStopPlayingEvent += OnStopOrRewindPlaying;
|
||||
ctrl.OnRewindPlayingEvent += OnStopOrRewindPlaying;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void Unsubscribe() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnStopPlayingEvent -= OnStopOrRewindPlaying;
|
||||
_waitCtrl.OnRewindPlayingEvent -= OnStopOrRewindPlaying;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
void OnStopOrRewindPlaying(SwfClipController ctrl) {
|
||||
Unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7fb55d9b749a4fae9c1598651878ea9
|
||||
timeCreated: 1487272051
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitStopPlaying : IEnumerator {
|
||||
public class SwfWaitStopPlaying : CustomYieldInstruction {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitStopPlaying(SwfClipController ctrl) {
|
||||
@@ -12,12 +12,20 @@ namespace FTRuntime.Yields {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public override bool keepWaiting {
|
||||
get {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Private
|
||||
// Internal
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
SwfWaitStopPlaying Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
Unsubscribe();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnStopPlayingEvent += OnStopPlaying;
|
||||
@@ -25,27 +33,15 @@ namespace FTRuntime.Yields {
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnStopPlaying(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
void Unsubscribe() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnStopPlayingEvent -= OnStopPlaying;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
void OnStopPlaying(SwfClipController ctrl) {
|
||||
Unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,10 +28,6 @@
|
||||
<DefineConstants>FT_VERSION_FULL</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Sources\" />
|
||||
<Folder Include="FTEditor\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib">
|
||||
<HintPath>..\DLLs\mscorlib.dll</HintPath>
|
||||
@@ -66,6 +62,9 @@
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="FTEditor\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\Editor\FTEditor\Editors.meta">
|
||||
<Link>FTEditor\Editors.meta</Link>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<DefineConstants>FT_VERSION_DEMO</DefineConstants>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DocumentationFile>..\..\Assets\FlashTools\Docs\FTRuntime.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_FULL|AnyCPU' ">
|
||||
<Optimize>true</Optimize>
|
||||
@@ -26,6 +27,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<DefineConstants>FT_VERSION_FULL</DefineConstants>
|
||||
<DocumentationFile>..\..\Assets\FlashTools\Docs\FTRuntime.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
@@ -39,7 +41,6 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Sources\" />
|
||||
<Folder Include="FTRuntime\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -49,9 +50,6 @@
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfAsset.cs.meta">
|
||||
<Link>FTRuntime\SwfAsset.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfAttributes.cs.meta">
|
||||
<Link>FTRuntime\SwfAttributes.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfClip.cs.meta">
|
||||
<Link>FTRuntime\SwfClip.cs.meta</Link>
|
||||
</None>
|
||||
@@ -67,23 +65,41 @@
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfSettings.cs.meta">
|
||||
<Link>FTRuntime\SwfSettings.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields.meta">
|
||||
<Link>FTRuntime\Yields.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfAssocList.cs.meta">
|
||||
<Link>FTRuntime\Internal\SwfAssocList.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfAttributes.cs.meta">
|
||||
<Link>FTRuntime\Internal\SwfAttributes.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfList.cs.meta">
|
||||
<Link>FTRuntime\Internal\SwfList.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfUtils.cs.meta">
|
||||
<Link>FTRuntime\Internal\SwfUtils.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitExtensions.cs.meta">
|
||||
<Link>FTRuntime\Yields\SwfWaitExtensions.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitPlayStopped.cs.meta">
|
||||
<Link>FTRuntime\Yields\SwfWaitPlayStopped.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitRewindPlaying.cs.meta">
|
||||
<Link>FTRuntime\Yields\SwfWaitRewindPlaying.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitStopOrRewindPlaying.cs.meta">
|
||||
<Link>FTRuntime\Yields\SwfWaitStopOrRewindPlaying.cs.meta</Link>
|
||||
</None>
|
||||
<None Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitStopPlaying.cs.meta">
|
||||
<Link>FTRuntime\Yields\SwfWaitStopPlaying.cs.meta</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfAsset.cs">
|
||||
<Link>FTRuntime\SwfAsset.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfAttributes.cs">
|
||||
<Link>FTRuntime\SwfAttributes.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\SwfClip.cs">
|
||||
<Link>FTRuntime\SwfClip.cs</Link>
|
||||
</Compile>
|
||||
@@ -102,11 +118,29 @@
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfAssocList.cs">
|
||||
<Link>FTRuntime\Internal\SwfAssocList.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfAttributes.cs">
|
||||
<Link>FTRuntime\Internal\SwfAttributes.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfList.cs">
|
||||
<Link>FTRuntime\Internal\SwfList.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Internal\SwfUtils.cs">
|
||||
<Link>FTRuntime\Internal\SwfUtils.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitExtensions.cs">
|
||||
<Link>FTRuntime\Yields\SwfWaitExtensions.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitPlayStopped.cs">
|
||||
<Link>FTRuntime\Yields\SwfWaitPlayStopped.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitRewindPlaying.cs">
|
||||
<Link>FTRuntime\Yields\SwfWaitRewindPlaying.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitStopOrRewindPlaying.cs">
|
||||
<Link>FTRuntime\Yields\SwfWaitStopOrRewindPlaying.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Assets\FlashTools\Scripts\FTRuntime\Yields\SwfWaitStopPlaying.cs">
|
||||
<Link>FTRuntime\Yields\SwfWaitStopPlaying.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Properties StartupItem="FTEditor/FTEditor.csproj">
|
||||
<MonoDevelop.Ide.Workbench />
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release_FULL" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release_DEMO" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<Folder Include="Sources\" />
|
||||
<Folder Include="FTSwfTools\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,4 +6,4 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/FlashTools/Example/Scene.unity
|
||||
path: Assets/DevTests/Scene.unity
|
||||
|
||||
@@ -93,7 +93,7 @@ PlayerSettings:
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleIdentifier: com.Company.ProductName
|
||||
bundleIdentifier: me.matov.ft_demo
|
||||
bundleVersion: 1.0
|
||||
preloadedAssets: []
|
||||
metroEnableIndependentInputSource: 0
|
||||
|
||||
Reference in New Issue
Block a user