コード例 #1
0
    public void ActivateMassEvent(PlayerVariables player, Text text)
    {
        switch (kindOfEvent)
        {
        case KindOfEvent.Nothing:
            //何もしない
            break;

        case KindOfEvent.HealthBenefit:
            player.UpdateLIfePoint(2);    //HPを2回復
            text.text = "回復した";
            break;

        case KindOfEvent.Damage:
            player.UpdateLIfePoint(-3);    //HPを-3
            text.text = "ダメージ受けた";
            break;

        case KindOfEvent.Warp2:
            player.UpdateCurrentCell(2);    //2マス先に進める
            text.text = "2マス進んだ";
            break;

        case KindOfEvent.ReturnToHuridashi:
            player.UpdateCurrentCell(-999);    //2マス先に進める
            text.text = "振出しに戻った";
            break;

        case KindOfEvent.Warp5:
            player.UpdateCurrentCell(5);    //5マス先に進める
            text.text = "5マス進んだ";
            break;

        default:
            break;
        }
    }