mirror of
https://github.com/BlackMATov/unity-flash-tools.git
synced 2025-12-16 14:11:19 +07:00
Yields instructions
This commit is contained in:
9
Assets/FlashTools/Scripts/FTRuntime/Yields.meta
Normal file
9
Assets/FlashTools/Scripts/FTRuntime/Yields.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 91d10069039ad437fbd214463d482c1c
|
||||
folderAsset: yes
|
||||
timeCreated: 1486819578
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitPlayStopped : IEnumerator {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitPlayStopped(SwfClipController ctrl) {
|
||||
Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public SwfWaitPlayStopped Reuse(SwfClipController ctrl) {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
//
|
||||
// Private
|
||||
//
|
||||
|
||||
SwfWaitPlayStopped Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnPlayStoppedEvent += OnPlayStopped;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnPlayStopped(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnPlayStoppedEvent -= OnPlayStopped;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 92ee4f87c0bcf4943abc9e5cdaffea72
|
||||
timeCreated: 1486821636
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitRewindPlaying : IEnumerator {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitRewindPlaying(SwfClipController ctrl) {
|
||||
Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public SwfWaitRewindPlaying Reuse(SwfClipController ctrl) {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
//
|
||||
// Private
|
||||
//
|
||||
|
||||
SwfWaitRewindPlaying Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnRewindPlayingEvent += OnRewindPlaying;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnRewindPlaying(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnRewindPlayingEvent -= OnRewindPlaying;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a489e38279e094af4b5ef8859282295f
|
||||
timeCreated: 1486819593
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,51 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace FTRuntime.Yields {
|
||||
public class SwfWaitStopPlaying : IEnumerator {
|
||||
SwfClipController _waitCtrl;
|
||||
|
||||
public SwfWaitStopPlaying(SwfClipController ctrl) {
|
||||
Subscribe(ctrl);
|
||||
}
|
||||
|
||||
public SwfWaitStopPlaying Reuse(SwfClipController ctrl) {
|
||||
return Subscribe(ctrl);
|
||||
}
|
||||
|
||||
//
|
||||
// Private
|
||||
//
|
||||
|
||||
SwfWaitStopPlaying Subscribe(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
if ( ctrl ) {
|
||||
_waitCtrl = ctrl;
|
||||
ctrl.OnStopPlayingEvent += OnStopPlaying;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
void OnStopPlaying(SwfClipController ctrl) {
|
||||
(this as IEnumerator).Reset();
|
||||
}
|
||||
|
||||
//
|
||||
// IEnumerator
|
||||
//
|
||||
|
||||
bool IEnumerator.MoveNext() {
|
||||
return _waitCtrl != null;
|
||||
}
|
||||
|
||||
void IEnumerator.Reset() {
|
||||
if ( _waitCtrl != null ) {
|
||||
_waitCtrl.OnStopPlayingEvent -= OnStopPlaying;
|
||||
_waitCtrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
object IEnumerator.Current {
|
||||
get { return null; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3be861087be4b442092da862ff38f151
|
||||
timeCreated: 1486819592
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user