You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
		
		
			
		
	
	
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			C#
		
	
| 
											2 years ago
										 | using System.Collections.Generic; | ||
|  | using UnityEngine; | ||
|  | using Articy.Unity; | ||
|  | using Articy.Touhou; | ||
|  | using Articy.Unity.Interfaces; | ||
|  | using Game; | ||
|  | 
 | ||
|  | public class ComboTreeFlowPlayer : MonoBehaviour, IArticyFlowPlayerCallbacks | ||
|  | { | ||
|  |     private Branch _firstBranch; | ||
|  |     public void OnFlowPlayerPaused(IFlowObject aObject) | ||
|  |     { | ||
|  |         var dialog = aObject as DialogueFragment; | ||
|  |         if (dialog != null) | ||
|  |         { | ||
|  |             var character = dialog.Speaker as DramaCharacterTemplete; | ||
|  |             var pic = character.Template.DramaCharacter.Icon as IAsset; | ||
|  |             Util.SendDialog(character.Template.DramaCharacter.Name, dialog.Text, character.Template.DramaCharacter.Icon); | ||
|  |         } | ||
|  |     } | ||
|  |     public void OnBranchesUpdated(IList<Branch> aBranches) | ||
|  |     { | ||
|  |         if (aBranches.Count > 0) | ||
|  |         { | ||
|  |             _firstBranch = aBranches[0]; | ||
|  |         } | ||
|  |         else | ||
|  |         { | ||
|  |             _firstBranch = null; | ||
|  |             Util.EndDrama(); | ||
|  |         } | ||
|  |     } | ||
|  |     public void Next() | ||
|  |     { | ||
|  |         if (_firstBranch != null) | ||
|  |         { | ||
|  |             GetComponent<ArticyFlowPlayer>().Play(_firstBranch); | ||
|  |         } | ||
|  |         else | ||
|  |         { | ||
|  |             Util.EndDrama(); | ||
|  |         } | ||
|  |     } | ||
|  | } |