예제 #1
0
        private void CreateShaftHitSoundEffect(Vector3 position, ShaftHitSoundEffectComponent effectComponent)
        {
            GetInstanceFromPoolEvent eventInstance = new GetInstanceFromPoolEvent {
                Prefab          = effectComponent.Asset,
                AutoRecycleTime = effectComponent.Duration
            };

            base.ScheduleEvent(eventInstance, new EntityStub());
            eventInstance.Instance.position = position;
            eventInstance.Instance.rotation = Quaternion.identity;
        }
예제 #2
0
 private void CreateShaftHitSoundEffect(HitEvent evt, ShaftHitSoundEffectComponent effectComponent)
 {
     if (evt.Targets != null)
     {
         foreach (HitTarget target in evt.Targets)
         {
             this.CreateShaftHitSoundEffect(target.TargetPosition, effectComponent);
         }
     }
     if (evt.StaticHit != null)
     {
         this.CreateShaftHitSoundEffect(evt.StaticHit.Position, effectComponent);
     }
 }