Ejemplo n.º 1
0
    private void OnFrameUpSpawnAudioHandler(int timerSequence, object arg)
    {
        TimerManager.instance.RemoveTimer(OnFrameUpSpawnAudioHandler);

        SpawnAudioClass obj = arg as SpawnAudioClass;

        if (obj != null && obj.audio_info != null)
        {
            SpawnAudio(obj.audio_info, obj.audio_info._applyOnTargetList, obj.startTime);
        }
    }
Ejemplo n.º 2
0
    public void OnInflictAudioEx(MoveAnimationEvent ee)
    {
        HitEventInfo         event_info = ee.EventRef as MoveEditor.HitEventInfo;
        AudioEventProperties audio_info = event_info._audioProperties;
        SpawnAudioClass      arg        = new SpawnAudioClass();

        arg.audio_info = audio_info;
        arg.startTime  = 0;

        SpawnAudio(arg.audio_info, false, arg.startTime);
    }
Ejemplo n.º 3
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="particle_info"></param>
    /// <param name="audio_info"></param>
    /// <param name="startTime">这个时间主要是给编辑器用 因为编辑器时钟是一致 但是运行时态脚本初始化不一致所以无视这个时间</param>
    public void SpawnHit(ParticleEventProperties particle_info, AudioEventProperties audio_info, float startTime)
    {
        //ParticleEventProperties particle_info = ParticleEventProperties.Deserialize(particle_info_primal.Serialize());
        //particle_info._particleReference = particle_info_primal._particleReference;
        //particle_info._flippedParticleReference = particle_info_primal._flippedParticleReference;
        //AudioEventProperties audio_info = AudioEventProperties.Deserialize(audio_info_primal.Serialize());

        SpawnParitcle(particle_info, particle_info._applyOnTargetList, startTime);
        SpawnAudioClass arg = new SpawnAudioClass();

        arg.audio_info = audio_info;
        arg.startTime  = startTime;
        TimerManager.instance.AddFramer(2, 1, OnFrameUpSpawnAudioHandler, arg);
    }