protected override void OnDispose() { if (null != mNode) { mNode.Dispose(); mNode = null; } }
protected override void OnDispose() { if (null != _executeNode) { _executeNode.Dispose(); _executeNode = null; } }
protected override void ProcessMsg(int key, QMsg msg) { switch (msg.msgId) { case (int)AudioEvent.SoundSwitch: AudioMsgWithBool soundSwitchMsg = msg as AudioMsgWithBool; SoundOn = soundSwitchMsg.on; break; case (int)AudioEvent.MusicSwitch: AudioMsgWithBool musicSwitchMsg = msg as AudioMsgWithBool; MusicOn = musicSwitchMsg.on; if (!MusicOn) { StopMusic(); } break; case (int)AudioEvent.PlayMusic: Debug.LogFormat("play music msg: {0}, is musicOn: ", AudioEvent.PlayMusic.ToString(), MusicOn); PlayMusic(msg as AudioMusicMsg); break; case (int)AudioEvent.StopMusic: StopMusic(); break; case (int)AudioEvent.PlaySound: AudioSoundMsg audioSoundMsg = msg as AudioSoundMsg; PlaySound(audioSoundMsg); break; case (int)AudioEvent.PlayVoice: PlayVoice(msg as AudioVoiceMsg); break; case (int)AudioEvent.StopVoice: StopVoice(); break; case (int)AudioEvent.PlayNode: IExecuteNode msgPlayNode = (msg as AudioMsgWithNode).Node; StartCoroutine(msgPlayNode.Execute()); break; case (int)AudioEvent.AddRetainAudio: AddRetainAudioMsg addRetainAudioMsg = msg as AddRetainAudioMsg; AddRetainAudio(addRetainAudioMsg.AudioName); break; case (int)AudioEvent.RemoveRetainAudioAudio: RemoveRetainAudioMsg removeRetainAudioMsg = msg as RemoveRetainAudioMsg; RemoveRetainAudio(removeRetainAudioMsg.AudioName); break; } }
public static void RecordNode(IExecuteNode node) { if (Instance.mRecording) { Instance.mReplayTimelineNode.Append(Instance.mStartTime, node); } else { Log.E("is not recording when append"); } }
public static IEnumerator Execute(this IExecuteNode selfNode) { if (selfNode.Finished) { selfNode.Reset(); } while (!selfNode.Execute(Time.deltaTime)) { yield return(null); } }
public abstract IExecuteNodeChain Append(IExecuteNode node);
public SequenceNode Append(IExecuteNode appendedNode) { mNodes.Add(appendedNode); mExcutingNodes.Add(appendedNode); return(this); }
public override IExecuteNodeChain Append(IExecuteNode node) { mSequenceNode.Append(node); return(this); }
public TimelinePair(float time, IExecuteNode node) { Time = time; Node = node; }
public SequenceNode Append(IExecuteNode appendedNode) { mNodeQueue.Enqueue(appendedNode); mExcutingQueue.Enqueue(appendedNode); return(this); }
public RepeatNode(IExecuteNode node, int loopCount) { LoopCount = loopCount; mNode = node; }
public void Append(float time, IExecuteNode node) { TimelineQueue.Enqueue(new TimelinePair(time, node)); }
public RepeatNode(IExecuteNode node, int repeatCount) { RepeatCount = repeatCount; mNode = node; }
public SequenceNode Remove(IExecuteNode removedNode) { mNodes.Remove(removedNode); mExcutingNodes.Remove(removedNode); return(this); }
public static T ExecuteNode <T>(this T selBehaviour, IExecuteNode commandNode) where T : MonoBehaviour { selBehaviour.StartCoroutine(commandNode.Execute()); return(selBehaviour); }
public AudioMsgWithNode(IExecuteNode node) : base((int)AudioEvent.PlayNode) { Node = node; }
public void Append(float time, IExecuteNode node) { TimeLinePairList.Add(new TimelinePair(time, node)); }