以下の内容はhttps://baba-s.hatenablog.com/entry/2021/11/03/080000より取得しました。


【Unity】Corgi Engine でブロックに潰されたらプレイヤーがやられるようにする方法

概要

f:id:baba_s:20211103083307g:plain

Corgi Engine でブロックに潰されたらプレイヤーがやられるようにしたい場合は

f:id:baba_s:20211103083312p:plain

「Character Crush Detection」と「Health」を使用する

if (DieWhenCrushed)
{
    // we kill the character
    _health.Kill ();
    CorgiEngineEvent.Trigger(CorgiEngineEventTypes.PlayerDeath);
}

LevelManager を使用していない場合は「CharacterCrushDetection.cs」の
148 行目付近を上記のように書き換える




以上の内容はhttps://baba-s.hatenablog.com/entry/2021/11/03/080000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14