mirror of
https://github.com/boudji-ludwig-pett/cnam-geometry-dash.git
synced 2025-06-10 22:20:40 +02:00
feat: json loader (#37)
This commit is contained in:
18
Assets/Scripts/Level.cs
Normal file
18
Assets/Scripts/Level.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
[System.Serializable]
|
||||
public class Level
|
||||
{
|
||||
public string JsonName { get; set; }
|
||||
|
||||
public string name;
|
||||
public string musicName;
|
||||
public int totalJumps;
|
||||
public int totalAttempts;
|
||||
public int order;
|
||||
|
||||
public static Level CreateFromJSON(string jsonString)
|
||||
{
|
||||
return JsonUtility.FromJson<Level>(jsonString);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user