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.
		
		
		
		
		
			
		
			
	
	
		
			33 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
		
		
			
		
	
	
			33 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			C#
		
	
| 
											2 years ago
										 | using UnityEngine; | ||
|  | using Articy.Unity; | ||
|  | using Articy.Touhou; | ||
|  | 
 | ||
|  | namespace Game | ||
|  | { | ||
|  |     public class ClipSound : TimelineClipBase | ||
|  |     { | ||
|  |         private SoundClip _mRealAsset; | ||
|  |         public override void OnEnter() | ||
|  |         { | ||
|  |             _mRealAsset = Asset as SoundClip; | ||
|  |             var skill = Owner.skill; | ||
|  |             var skillCfg = Util.GetSkillMasterConfig(skill.SkillId.Value); | ||
|  |             var soundList = skillCfg.Skill.SoundList; | ||
|  |             var index = _mRealAsset.template.soundIndex; | ||
|  |             if (soundList.Count < index - 1) | ||
|  |             { | ||
|  |                 return; | ||
|  |             } | ||
|  |             var sound = soundList[index] as IObjectWithFeatureSound; | ||
|  |             var soundPick = GameRandom.Pick<ArticyObject>(sound.GetFeatureSound().SoundGroup); | ||
|  |             var audioClip = Util.LoadDraft<AudioClip>(soundPick); | ||
|  |             Util.CreateSound(Owner, audioClip); | ||
|  |         } | ||
|  |         public override void OnStay() | ||
|  |         { | ||
|  |         } | ||
|  |         public override void OnLeave() | ||
|  |         { | ||
|  |         } | ||
|  |     } | ||
|  | } |