コード例 #1
0
ファイル: PlayerAudio.cs プロジェクト: CaptainBateau/Guaishou
 private void OnPlayerGotHit(object sender, PlayerEvent.PlayerGotHitEventArgs e)
 {
     Play(playerHit);
 }
コード例 #2
0
ファイル: GameOver.cs プロジェクト: CaptainBateau/Guaishou
 private void OnPlayerHit(object sender, PlayerEvent.PlayerGotHitEventArgs e)
 {
     Invoke("EndGame", anim.clip.length - 0.2f);
     anim.Play();
 }
コード例 #3
0
ファイル: PlayerFX.cs プロジェクト: CaptainBateau/Guaishou
    private void OnPlayerGotHitHandler(object sender, PlayerEvent.PlayerGotHitEventArgs e)
    {
        ParticleSystem fx = Instantiate(playerHitParticles, e.collisionPosition, Quaternion.identity, transform);

        Destroy(fx, playerHitParticles.main.duration);
    }