Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using System;
- using MonsterSystem;
- using GameDatabase;
- [Serializable]
- public class MyMonsterDatabase
- {
- //[SerializeField]
- public static MonsterData[] db = new MonsterData[]
- {
- new MonsterData(0, new BaseStats(42, 32, 42, 32, 30, 52), 0, 1.5f, 10, 0)
- };
- public List<MonsterData> al = new List<MonsterData>();
- }
- public class DBTest : MonoBehaviour
- {
- // Start is called before the first frame update
- void Start()
- {
- Debug.Log("H");
- //string json = JsonUtility.ToJson(MyMonsterDatabase.db);
- MyMonsterDatabase tdb = new MyMonsterDatabase();
- tdb.al.Add(new MonsterData(0, new BaseStats(42, 32, 42, 32, 30, 52), 0, 1.5f, 10, 0));
- string json2 = JsonUtility.ToJson(tdb);
- Debug.Log(json2);
- }
- // Update is called once per frame
- void Update()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement