Skip to content

Instantly share code, notes, and snippets.

@usikundesu

usikundesu/Item Secret

Created December 22, 2020 11:23
Show Gist options
  • Save usikundesu/5cf654d9782537cc900d72b19170274e to your computer and use it in GitHub Desktop.
Save usikundesu/5cf654d9782537cc900d72b19170274e to your computer and use it in GitHub Desktop.
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
[CreateAssetMenu(fileName = "Item", menuName = "CreateItem")]
public class Item : ScriptableObject
{
public enum Type
{
WeaponAll,
ArmorAll
}
[SerializeField]
public Type itemType = Type.WeaponAll;
[SerializeField]
private string kanjiName = "";
[SerializeField]
private string hiraganaName = "";
[SerializeField]
private string information = "";
// アイテムの種類
public Type GetItemType()
{
return itemType;
}
// アイテムの漢字名
public string GetKanjiName()
{
return kanjiName;
}
// アイテムの平仮名
public string GetHiraganaName()
{
return hiraganaName;
}
// アイテム情報
public string GetInformation()
{
return information;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment