YuminekoGame
1/25/2019 - 3:25 PM

MonsterParameterEntry

Unity Excel Impoterの解説記事(https://yumineko.com/game-create/unity/excel-parameter)で使用。 Excelデータの前に作るEntryクラス。本当は、enum型をここで一緒に定義せず別ファイルにしたほうが流用しやすいが、今回は簡略化のため一緒にしている。

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[System.Serializable]
public class MonsterParameterEntry {
    public string name;
    public Element element;
    public int maxhp;
    public int atk;
}

public enum Element {
    NONE,
    FIRE,
    WATER,
    WIND
}